/* Main Content */
.main-container {
    display: flex;
    height: 100vh;
    max-height: 100%;
}

/* Left Panel - Listings */
.listings-panel {
    width: 50%;
    overflow-y: auto;
    background: white;
}

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.results-count {
    font-size: 14px;
    color: #717171;
}


.listings-grid {
    display: grid;
    gap: 24px;
}

.listing-card {
    position: relative;
    display: flex;
    gap: 16px;
    padding: 16px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Inter';
}
.listing-card .listing-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.listing-card:hover {
    background: #f7f7f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.listing-image {
    width: 320px;
    height: 200px;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    position: relative;
    flex-shrink: 0;
}


.badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: white;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.superhost-badge {
    background: #222;
    color: white;
}

.guest-favorite-badge {
    background: white;
    color: #222;
}

.listing-info {
    flex: 1;
}

.listing-location {
    font-size: 16px;
    font-weight: 600;
    color: #222;
    margin-bottom: 4px;
}

.listing-type {
    font-size: 14px;
    color: #717171;
    margin-bottom: 8px;
}

.listing-features {
    font-size: 14px;
    color: #717171;
    margin-bottom: 8px;
}

.listing-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
}

.star {
    color: #ff385c;
    font-size: 12px;
}

.rating-text {
    font-size: 14px;
    font-weight: 600;
    color: #222;
}

.listing-price {
    font-size: 16px;
    font-weight: 600;
    color: #222;
}

.price-period {
    font-weight: normal;
    color: #717171;
}

/* Right Panel - Map */
.map-panel {
    width: 50%;
    position: relative;
    background: #e8f4f8;
}

.mapContainer {
    width: 100%;
    height: 100%;
    position: relative;
}

/* Removed .map-pin styling as it's replaced by image */

/* Map Controls */
.map-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.map-control-btn {
    width: 40px;
    height: 40px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.fullscreen-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 8px;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Responsive */
@media (max-width: 768px) {
    .main-container {
        flex-direction: column-reverse;
    }
    .listings-panel {
        display: none;
    }
    .listings-panel, .map-panel {
        width: 100%;
    }

    .map-panel {
        height: 100%;
    }

    .listing-card {
        flex-direction: column;
    }

    .listing-image {
        width: 100%;
    }
}

/* Popup Content Styling */
.leaflet-popup-content-wrapper {
    border-radius: 12px !important;
    padding: 0 !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    width: auto !important; /* Allow content to dictate width */
}

.popup-content {
    display: flex;
    flex-direction: column;
    width: 250px; /* Adjust as needed */
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.popup-image {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-top-left-radius: 12px!important;
    border-top-right-radius: 12px!important;
    margin-bottom: 8px;
}

.popup-info {
    padding: 8px 12px 12px 12px;
}

.popup-title {
    font-weight: 600;
    font-size: 15px;
    color: #222;
    margin-bottom: 4px;
}

.popup-price {
    font-weight: 600;
    font-size: 14px;
    color: #222;
    margin-top: 5px;
}

.popup-rating {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: #717171;
}

.popup-rating .star {
    color: #ff385c;
    font-size: 11px;
}

.leaflet-container a.leaflet-popup-close-button {
    top: 5px;
    right: 5px;
    font: 18px / 22px Tahoma, Verdana, sans-serif;
    background: #fff;
    border-radius: 50%;
}

.map-container {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 25px;
    left: 0;
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: hsl(0deg 0% 0% / 80%);
    padding: 30px;
}

.map-container .mauritius-map {
    width: 100%;
    max-width: 90vw;
    height: 90vh;
    padding: 20px;
    background-color: #fff;
    z-index: 2000;
    position: relative;
    border-radius: 5px;
    box-shadow: 0px 0px 10px #333;
}

.leaflet-control-attribution.leaflet-control {
    display: none;
}

a.popup-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}