/* ==================== PROPERTY MAP - CLIENT BRAND THEME ==================== */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
}

.map-page {
    width: 100%;
    margin: 0;
    padding: 0;
    background: #0F2A24;
    padding-top: 100px; /* Account for fixed navbar */
}

/* Map Header - Branded */
.map-header {
    background: linear-gradient(135deg, #0F2A24 0%, #14362F 100%);
    padding: 40px 20px;
    text-align: center;
    border-bottom: 2px solid rgba(31, 166, 122, 0.25);
    position: relative;
}

.map-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, 
        rgba(20, 54, 47, 0.5) 0%, 
        rgba(31, 166, 122, 0.4) 50%, 
        rgba(20, 54, 47, 0.5) 100%);
}

.map-header h1 {
    margin: 0;
    padding: 0;
    font-family: 'Playfair Display', serif;
    color: #F4F3EF;
    font-size: clamp(1.75rem, 5vw, 3rem);
    font-weight: 700;
    letter-spacing: 2px;
    line-height: 1.3;
}

/* ========== MAP CONTAINER ========== */
#map-container {
    position: relative;
    width: 100%;
    height: 700px;
    min-height: 700px;
    background: #0F2A24;
}

#propertyMap {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    z-index: 1;
}

/* Loading Overlay - Branded */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(15, 42, 36, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    gap: 20px;
}

.loading-overlay.hidden {
    display: none;
}

.spinner {
    border: 4px solid rgba(31, 166, 122, 0.2);
    border-top: 4px solid #1FA67A;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-overlay p {
    font-family: 'Inter', sans-serif;
    color: #F4F3EF;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 1px;
}

/* ========== SEARCH PANEL - BRANDED ========== */
.map-search-container {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 1000;
    background: #14362F;
    border-radius: 4px;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(31, 166, 122, 0.25);
    max-width: 380px;
    width: 100%;
    overflow: hidden;
}

.search-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #1FA67A 0%, #168C68 100%);
    color: #F4F3EF;
}

.search-header h3 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 1px;
}

.toggle-btn {
    background: rgba(244, 243, 239, 0.15);
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #F4F3EF;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.3s ease;
    font-weight: 300;
}

.toggle-btn:hover {
    background: rgba(244, 243, 239, 0.25);
}

.search-content {
    padding: 24px;
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    background: #0F2A24;
}

.search-content.hidden {
    display: none;
}

/* Filter Groups */
.filter-group {
    margin-bottom: 20px;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.filter-group label {
    display: block;
    margin-bottom: 8px;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #F4F3EF;
    font-size: 14px;
    letter-spacing: 0.5px;
}

.filter-group select,
.filter-group input {
    width: 100%;
    font-family: 'Inter', sans-serif;
    padding: 12px 14px;
    border: 1px solid rgba(31, 166, 122, 0.25);
    border-radius: 4px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #14362F;
    color: #F4F3EF;
}

.filter-group select::placeholder,
.filter-group input::placeholder {
    color: #B8B8B3;
}

.filter-group select:hover,
.filter-group input:hover {
    border-color: #1FA67A;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #1FA67A;
    box-shadow: 0 0 0 3px rgba(31, 166, 122, 0.15);
}

/* Custom Select Arrow */
.filter-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L6 6L11 1' stroke='%23F4F3EF' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}

/* Filter Actions */
.filter-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
}

.apply-btn,
.reset-btn {
    font-family: 'Inter', sans-serif;
    padding: 12px 20px;
    border: 2px solid transparent;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: all 0.3s ease;
}

.apply-btn {
    background: #1FA67A;
    color: #F4F3EF;
    border-color: #1FA67A;
    box-shadow: 0 4px 12px rgba(31, 166, 122, 0.3);
}

.apply-btn:hover {
    background: #168C68;
    border-color: #168C68;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(31, 166, 122, 0.4);
}

.apply-btn:active {
    transform: translateY(0);
}

.reset-btn {
    background: transparent;
    color: #1FA67A;
    border-color: #1FA67A;
}

.reset-btn:hover {
    background: rgba(31, 166, 122, 0.1);
}

/* Results Count */
.results-count {
    margin-top: 20px;
    padding: 12px;
    background: #14362F;
    border: 1px solid rgba(31, 166, 122, 0.25);
    border-radius: 4px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #F4F3EF;
    letter-spacing: 0.5px;
}

/* Scrollbar - Branded */
.search-content::-webkit-scrollbar {
    width: 6px;
}

.search-content::-webkit-scrollbar-track {
    background: #0F2A24;
}

.search-content::-webkit-scrollbar-thumb {
    background: #1FA67A;
    border-radius: 3px;
}

.search-content::-webkit-scrollbar-thumb:hover {
    background: #168C68;
}

/* ==================== PROPERTY POPUP - BRANDED (DARK THEME) ==================== */

/* Popup Container */


/* ==================== LEAFLET CUSTOM STYLES ==================== */

/* Leaflet Popup Wrapper - Dark Theme */
.leaflet-popup-content-wrapper {
    background: var(--color-bg-secondary, #14362F) !important;
    padding: 0 !important;
    border-radius: 4px !important;
    box-shadow: 0 12px 35px rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(31, 166, 122, 0.25) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
    min-width: 360px !important;
}

.leaflet-popup-tip {
    background: var(--color-bg-secondary, #14362F) !important;
}

/* Close Button */
.leaflet-container a.leaflet-popup-close-button {
    color: var(--color-text-primary, #F4F3EF) !important;
    font-size: 20px !important;
    padding: 8px 12px !important;
    transition: all 0.3s ease;
    background: transparent;
    border-radius: 4px;
}

.leaflet-container a.leaflet-popup-close-button:hover {
    color: var(--color-accent-jade, #1FA67A) !important;
    background: rgba(31, 166, 122, 0.1) !important;
}

/* Custom Marker Pin - Jade Green */
.custom-marker {
    background: none;
    border: none;
}

.marker-pin {
    width: 30px;
    height: 30px;
    border-radius: 50% 50% 50% 0;
    background: #1FA67A;
    position: absolute;
    transform: rotate(-45deg);
    left: 50%;
    top: 50%;
    margin: -20px 0 0 -15px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
}

.marker-pin::after {
    content: '';
    width: 20px;
    height: 20px;
    margin: 5px 0 0 5px;
    background: #F4F3EF;
    position: absolute;
    border-radius: 50%;
}

/* Marker Clusters - Jade Theme */
.marker-cluster-small {
    background-color: rgba(31, 166, 122, 0.5);
}

.marker-cluster-small div {
    background-color: rgba(31, 166, 122, 0.7);
}

.marker-cluster-medium {
    background-color: rgba(31, 166, 122, 0.6);
}

.marker-cluster-medium div {
    background-color: rgba(31, 166, 122, 0.8);
}

.marker-cluster-large {
    background-color: rgba(194, 161, 77, 0.5);
}

.marker-cluster-large div {
    background-color: rgba(194, 161, 77, 0.7);
}

.marker-cluster {
    background-clip: padding-box;
    border-radius: 50%;
}

.marker-cluster div {
    width: 40px;
    height: 40px;
    margin-left: 5px;
    margin-top: 5px;
    text-align: center;
    border-radius: 50%;
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    color: #F4F3EF;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-cluster span {
    line-height: 40px;
    font-size: 16px;
}

/* Leaflet Controls - Branded */
.leaflet-control-attribution {
    background: rgba(15, 42, 36, 0.8) !important;
    color: #B8B8B3 !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 10px !important;
}

.leaflet-control-attribution a {
    color: #1FA67A !important;
}

.leaflet-bar a {
    background-color: #14362F !important;
    color: #F4F3EF !important;
    border-bottom: 1px solid rgba(31, 166, 122, 0.25) !important;
}

.leaflet-bar a:hover {
    background-color: #1FA67A !important;
}

.leaflet-popup-tip {
    background: #fff;
}
.property-popup {
    max-width: 360px;
    font-family: 'Inter', sans-serif;
    background: #14362F;
    border-radius: 6px;
    overflow: hidden;
    color: #F4F3EF;
    padding: 20px;
}

.property-popup img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border-radius: 6px 6px 0 0;
}

.property-popup .no-image {
    width: 100%;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #0F2A24;
    color: #999;
    font-size: 13px;
    border-radius: 6px 6px 0 0;
}
.popup-cont{
    padding: 10px 15px;
}
.property-popup h3 {
    font-family: 'Playfair Display', serif;
    font-size: 16px;
    margin: 10px 0 6px;
}

.property-popup .price {
    font-size: 18px;
    font-weight: 700;
    color: #1FA67A;
}

.property-popup .details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    
    padding: 10px 0;
    border-top: 1px solid rgba(31,166,122,0.25);
    border-bottom: 1px solid rgba(31,166,122,0.25);
}

.property-popup .details div {
    font-size: 13px;
}

.property-popup .view-btn {
    display: block;
    width: 100%;
    text-align: center;
    background: #1FA67A;
    color: #F4F3EF;
    padding: 10px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 8px;
    transition: 0.3s;
}

.property-popup .view-btn:hover {
    background: #168C68;
    transform: translateY(-1px);
}

/* ==================== RESPONSIVE DESIGN ==================== */
@media (max-width: 768px) {
    .map-page {
        padding-top: 70px;
    }
    
    .map-header {
        padding: 30px 15px;
    }
    
    .map-header h1 {
        font-size: 1.75rem;
    }
    
    .map-search-container {
        max-width: calc(100% - 20px);
        left: 10px;
        top: 10px;
    }
    
    #map-container {
        height: calc(100vh - 180px);
    }
    
    .filter-row {
        grid-template-columns: 1fr;
    }
    
    .property-popup {
        max-width: 300px;
    }
    
    .leaflet-popup-content {
        min-width: 300px !important;
    }
    
    .property-popup .details {
        grid-template-columns: 1fr;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .map-page {
        padding-top: 60px;
    }
    
    .map-header {
        padding: 20px 15px;
    }
    
    .map-header h1 {
        font-size: 1.5rem;
    }
    
    .search-header h3 {
        font-size: 16px;
    }
    
    .search-content {
        padding: 20px;
    }
    
    .property-popup {
        max-width: 280px;
    }
    
    .leaflet-popup-content {
        min-width: 280px !important;
    }
    
    .property-popup .popup-image-container,
    .property-popup .no-image {
        height: 200px;
    }
    
    .property-popup .popup-content {
        padding: 16px;
    }
    
    .property-popup h3 {
        font-size: 16px;
    }
    
    .property-popup .price {
        font-size: 20px;
    }
}
