/* Hotel Map - Wrapper Layout */
.hotel-map-wrapper {
    position: relative;
    display: flex;
    gap: 0;
    width: 100%;
    height: 520px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    margin: 24px 0;
}

/* Left Panel - hidden by default, overlays the map */
.hotel-map-card-panel {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    z-index: 9999;
    width: 340px;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    overflow-y: auto;
    background: #f9f9f9;
    border-right: 1px solid #e0e0e0;
}

.hotel-map-card-panel--active {
    transform: translateX(0);
}

/* Map Container - full width */
.hotel-map-container {
    width: 100%;
    min-height: 100%;
}

/* Marker styles */
.hotel-map-marker {
    background: none !important;
    border: none !important;
}

.hotel-map-marker svg {
    display: block;
    max-width: none !important;
    overflow: visible;
}

.hotel-map-marker--active {
    z-index: 1000 !important;
}

/* Price label markers */
.hotel-price-marker-wrapper {
    background: none !important;
    border: none !important;
}

.hotel-price-marker {
    background: #f2b203;
    color: #000;
    font-size: 12px;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 16px;
    white-space: nowrap;
    text-align: center;
    position: relative;
    transform: translate(-50%, -100%);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Triangle pointer */
.hotel-price-marker::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-top: 6px solid #f2b203;
}

/* Active/selected state */
.hotel-price-marker-wrapper--active .hotel-price-marker {
    background: #F3A600;
}

.hotel-price-marker-wrapper--active .hotel-price-marker::after {
    border-top-color: #F3A600;
}

/* Hotel Card inside panel */
.hotel-map-card {
    position: relative;
    padding: 0;
}

.hotel-map-card-close {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 18px;
    line-height: 25px;
    text-align: center;
    cursor: pointer;
    color: #333;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.hotel-map-card-close:hover {
    background: #fff;
    color: #000;
}

/* Card image */
.hotel-map-card-image {
    width: 100%;
    overflow: hidden;
}

.hotel-map-card-image img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

/* Reuse existing hotel card styles within the panel */
.hotel-map-card .content-hotels {
    padding: 14px 16px 16px;
}

.hotel-map-card .hotels_details h3 {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.3;
}

.hotel-map-card .hotel_head {
    color: #1a1a2e;
    text-decoration: none;
}

.hotel-map-card .hotel_head:hover {
    color: #F3A600;
}

.hotel-map-card .address-field {
    margin-bottom: 3px;
}

/* .hotel-map-card .hotel-highlights {
    font-size: 13px;
    color: #444;
    margin-bottom: 10px;
    line-height: 1.4;
} */

.hotel-map-card .custom-button {
    display: inline-block;
    background: #F3A600;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    margin-bottom: 12px;
    transition: background 0.2s;
}

.hotel-map-card .custom-button:hover {
    background: #d99200;
}

.hotel-map-card .card-info {
    flex-flow: row-reverse;
    align-items: flex-end;
    margin-top: 0;
}

.hotel-map-card .listing_rating {
    display: flex;
    align-items: center;
    gap: 6px;
}

.hotel-map-card .star-rating {
    font-size: 13px;
}

.hotel-map-card .rating-text {
    font-size: 13px;
    color: #555;
}

.hotel-map-card .price_dollar {
    font-weight: 700;
    color: #1a1a2e;
    font-size: 15px;
}

.hotel-map-card .highlight.price .text {
    font-size: 13px;
}

.hotel-map-card .contact_text {
    font-size: 12px;
    color: #888;
}

/* Desktop: hide mobile-only elements */
.hotel-map-modal-close,
.hotel-map-modal-btn {
    display: none;
}

.hotel-map-overlay {
    display: none;
}

/* Responsive: mobile map modal */
@media (max-width: 768px) {
    /* Hide inline map on mobile by default */
    .hotel-map-wrapper {
        display: none;
        height: auto;
    }

    h2.wp-block-heading:has(+ .hotel-map-overlay) {
        display: none !important;
    }

    /* Dark overlay backdrop */
    .hotel-map-overlay.active {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 9999;
    }

    /* Centered modal when open */
    .hotel-map-wrapper.hotel-map-modal-open {
        display: flex;
        position: fixed;
        top: 3%;
        bottom: 3%;
        left: 3%;
        right: 3%;
        width: auto;
        z-index: 10000;
        flex-direction: column;
        border-radius: 12px;
        overflow: hidden;
        margin: 0;
        background: #fff;
    }

    .hotel-map-modal-open .hotel-map-container {
        flex: 1;
        height: auto;
        min-height: 0;
    }

    /* Modal close button */
    .hotel-map-modal-close {
        display: block;
        position: absolute;
        top: 12px;
        right: 12px;
        z-index: 10001;
        background: rgba(255, 255, 255, 0.95);
        border: none;
        border-radius: 50%;
        width: 36px;
        height: 36px;
        font-size: 22px;
        line-height: 34px;
        text-align: center;
        cursor: pointer;
        color: #333;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    }

    .hotel-map-modal-close:hover {
        background: #fff;
        color: #000;
    }

    /* Floating map button */
    .hotel-map-modal-btn {
        display: flex;
        align-items: center;
        gap: 6px;
        position: fixed;
        bottom: 70px;
        left: 12px;
        z-index: 9999;
        background: #2FB576;
        color: #fff;
        border: none;
        border-radius: 28px;
        padding: 7px 14px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
        transition: background 0.2s;
    }

    .hotel-map-modal-btn:hover {
        background: #d99200;
    }

    .hotel-map-modal-btn svg {
        flex-shrink: 0;
    }

    /* Card panel: bottom bar that slides up from bottom of modal */
    .hotel-map-card-panel {
        position: absolute;
        bottom: 0;
        left: 0;
        right: 0;
        top: auto;
        width: 100%;
        height: auto;
        max-height: none;
        background: transparent;
        display: block;
        transform: translateY(100%);
        transition: transform 0.3s ease;
        border-right: none;
        border-top: none;
        z-index: 10002;
        pointer-events: none;
        opacity: 1;
        overflow: visible;
    }

    .hotel-map-card-panel--active {
        transform: translateY(0);
        pointer-events: auto;
    }

    /* Horizontal card layout */
    .hotel-map-card {
        display: flex;
        flex-direction: row;
        width: 100%;
        max-height: none;
        overflow: hidden;
        background: #f9f9f9;
        border-radius: 12px 12px 0 0;
        box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
        padding: 3px;
    }

    /* Image: left 50% */
    .hotel-map-card-image {
        width: 50%;
        flex-shrink: 0;
    }

    .hotel-map-card-image img {
        width: 100%;
        height: 100%;
        min-height: 120px;
        max-height: 160px;
        object-fit: cover;
        border-radius: 12px 0 0 0;
    }

    /* Content: right 50% */
    .hotel-map-card .content-hotels {
        width: 50%;
        padding: 0 6px;
        display: flex;
        flex-direction: column;
        justify-content: center;
    }

    /* Hide verbose elements */
    /* .hotel-map-card .address-field, */
    /* .hotel-map-card .hotel-highlights, */
    .hotel-map-card .postContent {
        display: none;
    }

    .hotels_details{
        display: flex;
        flex-flow: column;
    }

    /* Compact typography */
    .hotel-map-card .hotels_details h3 {
        font-size: 14px;
        margin: 0 16px 4px 0;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .hotel-map-card .custom-button {
        padding: 5px 10px;
        font-size: 12px;
        margin-top: 3px;
        margin-bottom: 3px;
        order: 3;
    }

    .hotel-map-card .card-info{
        display: block;
        margin-bottom: 0;
    }

    .hotel-map-card .address-field{
        line-height: 1.2;
    }

    /* Compact close button */
    .hotel-map-card-close {
        width: 24px;
        height: 24px;
        font-size: 17px;
        line-height: 17px;
        font-weight: bold;
        top: 0;
        right: 0px;
    }
}
