/* Listing map popup */
.lm-popup {
    font-family: var(--ui-font), sans-serif;
    width: 220px;
}
.lm-popup-img {
    width: 100%;
    height: 130px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    display: block;
}
.lm-popup-placeholder {
    width: 100%;
    height: 130px;
    background: var(--ui-surface-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px 12px 0 0;
}
.lm-popup-body {
    padding: 10px 12px 12px;
}
.lm-popup-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--ui-text);
    line-height: 20px;
    margin-bottom: 6px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.lm-popup-rating {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 12px;
    font-weight: 600;
    color: var(--ui-text-muted);
    margin-bottom: 8px;
}
.lm-popup .lm-popup-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    text-align: center;
    background: var(--ui-primary);
    color: #fff;
    border-radius: 8px;
    padding: 9px 16px;
    font-size: 14px;
    line-height: 24px;
    font-weight: 600;
    text-decoration: none;
}
.lm-popup .lm-popup-btn:hover {
    background: var(--ui-primary-hover);
    color: #fff;
}
.lm-popup .lm-popup-btn:active { background: var(--ui-primary-active); }
.lm-popup .lm-popup-btn:focus-visible { outline: 2px solid var(--ui-focus); outline-offset: 2px; box-shadow: 0 0 0 2px var(--ui-surface); }


/* Photo marker for unclustered hotel points */
.lm-photo-marker {
    position: relative;
    width: 56px;
    height: 56px;
    border-radius: 12px;
    border: 2px solid #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    cursor: pointer;
    overflow: hidden;
    background: #e5e7eb;
    transition: box-shadow 0.15s;
}
.lm-photo-marker::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #fff;
    pointer-events: none;
}
.lm-photo-marker:hover,
.lm-photo-marker:focus {
    transform: scale(1.08);
    box-shadow: 0 4px 14px rgba(0,0,0,0.35);
    z-index: 1;
}
.lm-photo-marker__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.lm-photo-marker__placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
}
.lm-photo-marker__rating {
    position: absolute;
    bottom: 3px;
    right: 3px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 4px;
    line-height: 1.4;
}

/* Admin map coordinate picker */
.am-search-results {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1000;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    max-height: 220px;
    overflow-y: auto;
}
.am-search-item {
    padding: 8px 12px;
    font-size: 13px;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    line-height: 1.4;
}
.am-search-item:last-child {
    border-bottom: none;
}
.am-search-item:hover {
    background: #f0f7ff;
    color: #1d4ed8;
}
.am-marker {
    cursor: pointer;
    width: 28px;
    height: 36px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}
.am-marker:active {
    cursor: grabbing;
}

/* In-map search overlay (sibling of the map div, floated over it) */
.am-map-search-overlay {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    width: 280px;
}
.am-map-search-input {
    width: 100%;
    padding: 7px 32px 7px 10px;
    font-size: 13px;
    border: none;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0,0,0,.35);
    background: #fff;
    outline: none;
    box-sizing: border-box;
    line-height: 1.4;
}
.am-map-search-input::placeholder {
    color: #9ca3af;
}
/* DaData suggestions on address field */
.am-addr-wrapper {
    position: relative;
}

/* Remove default MapLibre popup tip/arrow for listing popups */
.maplibregl-popup-tip {
    display: none;
}
.lm-mapbox-popup .maplibregl-popup-content {
    padding: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 8px 24px rgb(25 47 64 / 12%);
}
