/* ===================================
   LUXURY GLASS THEME
   Premium glassmorphism throughout
   Rich, modern, intuitive
   =================================== */

:root {
    /* Glass Variables */
    --glass-bg: rgba(255, 255, 255, 0.08);
    --glass-bg-hover: rgba(255, 255, 255, 0.12);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    --glass-shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.3);

    /* Luxury Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 0.75rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 2.5rem;
}

/* ===================================
   SIDEBAR - MODERN GLASS REDESIGN
   =================================== */

.sidebar {
    background: rgba(10, 22, 40, 0.85) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-right: 1px solid var(--glass-border) !important;
    box-shadow:
        4px 0 24px rgba(0, 0, 0, 0.2),
        inset -1px 0 0 rgba(255, 255, 255, 0.05) !important;
}

/* Sidebar Header - Premium */
.sidebar-header {
    padding: var(--spacing-xl) var(--spacing-xl) var(--spacing-lg) !important;
    background: linear-gradient(135deg,
        rgba(37, 87, 167, 0.12) 0%,
        rgba(26, 75, 160, 0.08) 100%) !important;
    border-bottom: 1px solid var(--glass-border) !important;
    backdrop-filter: blur(12px);
}

.sidebar-header-title h2 {
    font-size: 1.5rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em !important;
    background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.8) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-icon {
    font-size: 1.5rem !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

/* Close Button - Glass */
.sidebar-close-btn {
    width: 40px !important;
    height: 40px !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 10px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.25rem !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
    backdrop-filter: blur(12px);
}

.sidebar-close-btn:hover {
    background: var(--glass-bg-hover) !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* Results Counter - Glass Badge */
.sidebar-results-counter {
    margin: var(--spacing-md) var(--spacing-xl) !important;
    padding: var(--spacing-md) var(--spacing-lg) !important;
    background: linear-gradient(135deg,
        rgba(100, 150, 220, 0.15) 0%,
        rgba(70, 120, 200, 0.1) 100%) !important;
    border: 1px solid rgba(100, 150, 220, 0.25) !important;
    border-radius: 12px !important;
    text-align: center !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    color: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 12px rgba(100, 150, 220, 0.1);
}

#resultsCount {
    font-weight: 800 !important;
    font-size: 1.25rem !important;
    background: linear-gradient(135deg, #6496dc 0%, #4678c8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Search Section - Glass Container */
.search-section {
    padding: var(--spacing-lg) var(--spacing-xl) !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border-bottom: 1px solid var(--glass-border) !important;
}

/* Type Toggle - Modern Pills */
.type-toggle {
    display: flex !important;
    gap: var(--spacing-sm) !important;
    margin-bottom: var(--spacing-lg) !important;
    padding: 0.4rem !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    backdrop-filter: blur(12px);
}

.type-btn {
    flex: 1 !important;
    padding: 0.85rem 1rem !important;
    background: transparent !important;
    border: none !important;
    border-radius: 8px !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.9rem !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.type-btn.active {
    background: linear-gradient(135deg,
        rgba(100, 150, 220, 0.25) 0%,
        rgba(70, 120, 200, 0.2) 100%) !important;
    border: 1px solid rgba(100, 150, 220, 0.3) !important;
    color: rgba(255, 255, 255, 1) !important;
    box-shadow: 0 4px 12px rgba(100, 150, 220, 0.15);
}

/* Search Box - Premium Glass */
.search-box {
    display: flex !important;
    gap: var(--spacing-sm) !important;
    margin-bottom: var(--spacing-md) !important;
}

#searchInput {
    flex: 1 !important;
    padding: 1rem 1.25rem !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 0.95rem !important;
    backdrop-filter: blur(12px);
    transition: all 0.2s !important;
}

#searchInput::placeholder {
    color: rgba(255, 255, 255, 0.4) !important;
}

#searchInput:focus {
    background: var(--glass-bg-hover) !important;
    border-color: rgba(100, 150, 220, 0.4) !important;
    box-shadow: 0 0 0 3px rgba(100, 150, 220, 0.1);
    outline: none !important;
}

.search-btn {
    padding: 1rem 1.75rem !important;
    background: linear-gradient(135deg,
        rgba(100, 150, 220, 0.3) 0%,
        rgba(70, 120, 200, 0.25) 100%) !important;
    border: 1px solid rgba(100, 150, 220, 0.4) !important;
    border-radius: 12px !important;
    color: rgba(255, 255, 255, 1) !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    backdrop-filter: blur(12px);
}

.search-btn:hover {
    background: linear-gradient(135deg,
        rgba(100, 150, 220, 0.4) 0%,
        rgba(70, 120, 200, 0.35) 100%) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(100, 150, 220, 0.2);
}

/* Location Button - Glass */
.location-btn {
    width: 100% !important;
    padding: 1rem !important;
    background: var(--glass-bg) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 12px !important;
    color: rgba(255, 255, 255, 0.9) !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
    backdrop-filter: blur(12px);
}

.location-btn:hover {
    background: var(--glass-bg-hover) !important;
    transform: translateY(-1px);
}

/* Filter Sections - Collapsible Glass Cards */
.filter-section {
    margin: var(--spacing-md) var(--spacing-xl) !important;
    background: var(--glass-bg) !important;
    border: 1.5px solid var(--glass-border) !important;
    border-radius: 16px !important;
    overflow: hidden !important;
    backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.filter-section:hover {
    background: var(--glass-bg-hover) !important;
    border-color: rgba(100, 150, 220, 0.25) !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

.filter-section.open {
    border-color: rgba(100, 150, 220, 0.3) !important;
    box-shadow: 0 8px 24px rgba(100, 150, 220, 0.15);
}

.filter-section-header {
    width: 100% !important;
    padding: 1.1rem 1.25rem !important;
    background: transparent !important;
    border: none !important;
    color: rgba(255, 255, 255, 0.95) !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    cursor: pointer !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.filter-section-header:hover {
    background: rgba(255, 255, 255, 0.06) !important;
}

.filter-section.open .filter-section-header {
    background: rgba(100, 150, 220, 0.08) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.filter-section-title {
    display: flex !important;
    align-items: center !important;
    gap: var(--spacing-sm) !important;
}

.filter-section-icon {
    font-size: 1.3rem !important;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.filter-section-toggle {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1) !important;
    opacity: 0.5;
    font-size: 1.1rem !important;
    display: flex !important;
    align-items: center !important;
}

.filter-section.open .filter-section-toggle {
    transform: rotate(180deg) !important;
    opacity: 0.8;
}

/* Filter Content */
.filter-section-content {
    padding: var(--spacing-md) var(--spacing-lg) var(--spacing-lg) !important;
    background: rgba(0, 0, 0, 0.12);
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.filter-section.open .filter-section-content {
    max-height: 800px;
    opacity: 1;
}

/* Filter Checkboxes - Premium Custom Design */
.filter-checkbox {
    display: flex !important;
    align-items: center !important;
    padding: 0.9rem 1.1rem !important;
    margin-bottom: var(--spacing-sm) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1.5px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 12px !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    overflow: hidden !important;
}

.filter-checkbox::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(100, 150, 220, 0.15), rgba(70, 120, 200, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.filter-checkbox:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(100, 150, 220, 0.4) !important;
    transform: translateX(3px) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
}

.filter-checkbox:hover::before {
    opacity: 1;
}

/* Custom Checkbox Styling */
.filter-checkbox input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px !important;
    height: 22px !important;
    margin-right: var(--spacing-md) !important;
    cursor: pointer !important;
    border: 2px solid rgba(255, 255, 255, 0.25) !important;
    border-radius: 6px !important;
    background: rgba(255, 255, 255, 0.05) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
    position: relative !important;
    flex-shrink: 0 !important;
    z-index: 1 !important;
}

.filter-checkbox input[type="checkbox"]:hover {
    border-color: rgba(100, 150, 220, 0.6) !important;
    background: rgba(100, 150, 220, 0.1) !important;
    transform: scale(1.05) !important;
}

.filter-checkbox input[type="checkbox"]:checked {
    background: linear-gradient(135deg, #6496dc 0%, #4678c8 100%) !important;
    border-color: #6496dc !important;
    box-shadow: 0 0 0 3px rgba(100, 150, 220, 0.2) !important;
}

.filter-checkbox input[type="checkbox"]:checked::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(1);
    color: white;
    font-size: 14px;
    font-weight: 700;
    animation: checkPop 0.3s cubic-bezier(0.68, -0.55, 0.27, 1.55);
}

@keyframes checkPop {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 0;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
    }
    100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
}

/* Checked state for entire label */
.filter-checkbox:has(input:checked) {
    background: rgba(100, 150, 220, 0.15) !important;
    border-color: rgba(100, 150, 220, 0.5) !important;
    box-shadow: 0 4px 16px rgba(100, 150, 220, 0.2) !important;
}

.filter-checkbox:has(input:checked)::before {
    opacity: 1;
}

.filter-checkbox span {
    color: rgba(255, 255, 255, 0.85) !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    letter-spacing: 0.01em !important;
    transition: all 0.2s !important;
    z-index: 1 !important;
    position: relative !important;
}

.filter-checkbox:has(input:checked) span {
    color: rgba(255, 255, 255, 0.98) !important;
    font-weight: 600 !important;
}

/* Filter Groups with better spacing */
.filter-group {
    display: flex !important;
    flex-direction: column !important;
    gap: var(--spacing-xs) !important;
}

/* Active Filters Chips - Enhanced */
.active-filters-container {
    padding: var(--spacing-md) var(--spacing-xl) !important;
    background: linear-gradient(135deg, rgba(251, 191, 36, 0.1), rgba(251, 191, 36, 0.06)) !important;
    border-bottom: 1.5px solid rgba(251, 191, 36, 0.25) !important;
    backdrop-filter: blur(8px);
}

.active-filters-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: var(--spacing-sm) !important;
    margin-bottom: var(--spacing-sm) !important;
}

.filter-chip {
    padding: 0.6rem 1rem !important;
    background: rgba(251, 191, 36, 0.18) !important;
    border: 1.5px solid rgba(251, 191, 36, 0.4) !important;
    border-radius: 10px !important;
    color: rgba(251, 191, 36, 1) !important;
    font-size: 0.85rem !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(251, 191, 36, 0.15);
}

.filter-chip:hover {
    background: rgba(251, 191, 36, 0.25) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 4px 12px rgba(251, 191, 36, 0.25);
}

.filter-chip button {
    background: rgba(251, 191, 36, 0.2) !important;
    border: none !important;
    border-radius: 6px !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    transition: all 0.2s !important;
}

.filter-chip button:hover {
    background: rgba(251, 191, 36, 0.35) !important;
    transform: rotate(90deg) scale(1.1) !important;
}

.clear-all-filters {
    padding: 0.65rem 1.1rem !important;
    background: rgba(239, 68, 68, 0.15) !important;
    border: 1.5px solid rgba(239, 68, 68, 0.3) !important;
    border-radius: 10px !important;
    color: rgba(239, 68, 68, 1) !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    letter-spacing: 0.01em !important;
    cursor: pointer !important;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1) !important;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.15);
}

.clear-all-filters:hover {
    background: rgba(239, 68, 68, 0.22) !important;
    border-color: rgba(239, 68, 68, 0.4) !important;
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.25);
}

/* ===================================
   PHOTO GALLERY - WIDER, LUXURY
   =================================== */

.location-photos {
    padding: 0 !important;
    background: transparent !important;
    border: none !important;
    margin: 0 0 var(--spacing-lg) 0 !important;
}

.photo-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0 !important;
    width: 100% !important;
}

.photo-grid img {
    width: 100% !important;
    height: 350px !important;
    object-fit: cover !important;
    border-radius: 0 !important;
    border: none !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
}

/* If 2 photos, side by side */
.photo-grid.two-photos {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 1px !important;
}

.photo-grid.two-photos img {
    height: 300px !important;
}

/* If 3 photos, 1 large + 2 small */
.photo-grid.three-photos {
    grid-template-columns: 2fr 1fr !important;
    grid-template-rows: repeat(2, 1fr) !important;
    gap: 1px !important;
    height: 400px !important;
}

.photo-grid.three-photos img:first-child {
    grid-row: 1 / 3 !important;
    height: 100% !important;
}

.photo-grid.three-photos img {
    height: 100% !important;
}

/* ===================================
   MAP CONTROLS - FLOATING GLASS
   =================================== */

/* Zoom Controls */
.leaflet-control-zoom {
    border: none !important;
    background: rgba(10, 22, 40, 0.85) !important;
    backdrop-filter: blur(24px) saturate(180%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
    border-radius: 14px !important;
    overflow: hidden !important;
    box-shadow: var(--glass-shadow) !important;
    border: 1px solid var(--glass-border) !important;
}

.leaflet-control-zoom a {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.9) !important;
    border: none !important;
    width: 40px !important;
    height: 40px !important;
    line-height: 40px !important;
    font-size: 1.25rem !important;
    font-weight: 700 !important;
    transition: all 0.2s !important;
}

.leaflet-control-zoom a:hover {
    background: var(--glass-bg-hover) !important;
    color: #fff !important;
}

.leaflet-control-zoom a:not(:last-child) {
    border-bottom: 1px solid var(--glass-border) !important;
}

/* Attribution - Glass */
.leaflet-control-attribution {
    background: rgba(10, 22, 40, 0.85) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border: 1px solid var(--glass-border) !important;
    border-radius: 8px !important;
    padding: 0.5rem 0.85rem !important;
    font-size: 0.75rem !important;
    color: rgba(255, 255, 255, 0.6) !important;
}

/* ===================================
   MOBILE RESPONSIVE
   =================================== */

@media (max-width: 768px) {
    .sidebar {
        width: 100% !important;
        max-width: 100% !important;
    }

    .sidebar-header {
        padding: var(--spacing-lg) var(--spacing-md) !important;
    }

    .search-section,
    .filter-section {
        margin: var(--spacing-md) !important;
        padding: var(--spacing-md) !important;
    }

    .photo-grid img {
        height: 250px !important;
    }

    .photo-grid.two-photos img {
        height: 200px !important;
    }

    .photo-grid.three-photos {
        height: 300px !important;
    }
}
