/* CSS Design System & Variables */
:root {
    --bg-main: #0a0b10;
    --bg-glass: rgba(18, 20, 32, 0.65);
    --bg-glass-hover: rgba(26, 29, 46, 0.8);
    --border-glass: rgba(255, 255, 255, 0.07);
    --border-glass-focus: rgba(255, 255, 255, 0.15);
    
    /* Harmonious Neon HSL Colors */
    --primary: hsl(265, 85%, 65%);      /* Amethyst Purple */
    --primary-glow: hsla(265, 85%, 65%, 0.35);
    --success: hsl(150, 80%, 50%);      /* Emerald Green */
    --success-glow: hsla(150, 80%, 50%, 0.25);
    --info: hsl(200, 85%, 55%);         /* Electric Blue */
    --info-glow: hsla(200, 85%, 55%, 0.25);
    --accent: hsl(330, 85%, 60%);       /* Magenta Pink */
    --accent-glow: hsla(330, 85%, 60%, 0.25);
    --warning: hsl(40, 90%, 55%);       /* Amber Gold */
    --danger: hsl(0, 85%, 60%);         /* Coral Red */
    
    /* Text Colors */
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    
    --sidebar-width: 260px;
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --border-radius: 12px;
}

/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', sans-serif;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* Premium Background Glow Blobs */
body::before, body::after {
    content: '';
    position: absolute;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    filter: blur(120px);
    z-index: -1;
    pointer-events: none;
    opacity: 0.45;
}

body::before {
    background: var(--primary);
    top: -100px;
    left: -100px;
}

body::after {
    background: var(--accent);
    bottom: -100px;
    right: -100px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(10, 11, 16, 0.5);
}

::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.2);
}

/* Layout Containers */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Navigation */
.sidebar {
    width: var(--sidebar-width);
    background: rgba(10, 11, 16, 0.85);
    backdrop-filter: blur(20px);
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    padding: 30px 20px;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
    padding-left: 10px;
}

.logo-icon {
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 2px 8px var(--primary-glow));
}

.logo-text {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
}

.logo-text span {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex-grow: 1;
}

.nav-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 500;
    border-radius: 12px;
    cursor: pointer;
    text-align: left;
    transition: var(--transition-smooth);
}

.nav-btn i {
    font-size: 18px;
    transition: var(--transition-smooth);
}

.nav-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.nav-btn.active {
    color: #fff;
    background: linear-gradient(135deg, var(--primary), hsla(265, 85%, 55%, 0.6));
    box-shadow: 0 4px 15px var(--primary-glow);
}

.nav-btn.active i {
    transform: scale(1.15);
}

.sidebar-footer {
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.status-indicator {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid var(--border-glass);
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 8px currentColor;
}

.status-dot.idle {
    background-color: var(--info);
    color: var(--info);
}

.status-dot.running {
    background-color: var(--success);
    color: var(--success);
    animation: pulse 1.5s infinite;
}

.status-dot.error {
    background-color: var(--danger);
    color: var(--danger);
}

/* Main Content Area */
.main-content {
    flex-grow: 1;
    margin-left: var(--sidebar-width);
    padding: 40px;
    max-width: 1400px;
    width: calc(100% - var(--sidebar-width));
}

.tab-content {
    display: none;
    animation: fadeIn 0.4s ease-out forwards;
}

.tab-content.active {
    display: block;
}

/* Headers */
.content-header {
    margin-bottom: 35px;
}

.content-header h1 {
    font-size: 32px;
    font-weight: 800;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #fff 60%, var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.content-header p {
    color: var(--text-secondary);
    font-size: 16px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 35px;
}

.stat-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    border-radius: var(--border-radius);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: var(--transition-smooth);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-glass-focus);
    background: var(--bg-glass-hover);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--primary);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.1);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.1);
}

.stat-icon.blue {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info);
    box-shadow: 0 0 15px rgba(59, 130, 246, 0.1);
}

.stat-icon.pink {
    background: rgba(236, 72, 153, 0.15);
    color: var(--accent);
    box-shadow: 0 0 15px rgba(236, 72, 153, 0.1);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-label {
    font-size: 14px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}

.stat-value {
    font-size: 26px;
    font-weight: 700;
}

/* Glass Panels */
.glass-panel {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    backdrop-filter: blur(16px);
    border-radius: var(--border-radius);
    padding: 30px;
    margin-bottom: 25px;
    transition: var(--transition-smooth);
}

.dashboard-row {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 25px;
    align-items: start;
}

.scraper-control-panel h2, .last-screenshot-panel h2, .settings-form h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.scraper-control-panel p, .last-screenshot-panel p {
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 25px;
}

.control-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.last-run-info {
    color: var(--text-secondary);
    font-size: 14px;
}

.last-run-info strong {
    color: var(--text-primary);
}

/* Buttons */
.btn {
    padding: 12px 24px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    outline: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    box-shadow: 0 4px 15px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--primary-glow);
    filter: brightness(1.1);
}

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

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
    border: 1px solid var(--border-glass);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.25);
    border-color: rgba(239, 68, 68, 0.4);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: 8px;
}

/* Screenshot panel styling */
.screenshot-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    aspect-ratio: 16/10;
    background: #11131e;
}

.screenshot-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition-smooth);
}

.screenshot-container:hover img {
    transform: scale(1.03);
}

.screenshot-overlay {
    position: absolute;
    bottom: 12px;
    right: 12px;
}

/* Alert Boxes */
.alert-box {
    margin-top: 20px;
    background: rgba(59, 130, 246, 0.1);
    border: 1px solid rgba(59, 130, 246, 0.15);
    color: var(--info);
    padding: 12px 18px;
    border-radius: 10px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Listings Tab */
.listings-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.filter-tabs {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    padding: 4px;
    border-radius: 12px;
    display: flex;
    gap: 4px;
}

.filter-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    padding: 10px 18px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition-smooth);
}

.filter-btn.active {
    background: rgba(255, 255, 255, 0.07);
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.badge {
    background: var(--primary);
    color: #fff;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    border-radius: 8px;
}

.filter-btn.active .badge {
    background: linear-gradient(135deg, var(--primary), var(--accent));
}

/* Listings grid & loader */
.listings-grid-container {
    min-height: 400px;
    position: relative;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.listings-loading, .listings-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.listings-empty i {
    font-size: 60px;
    color: var(--text-muted);
}

.listings-empty h3 {
    font-size: 18px;
    font-weight: 700;
}

.listings-empty p {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 320px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(255, 255, 255, 0.05);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

/* Apartment Listing Card */
.listing-card {
    background: var(--bg-glass);
    border: 1px solid var(--border-glass);
    border-radius: var(--border-radius);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: var(--transition-smooth);
}

.listing-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glass-focus);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
}

/* Carousel */
.card-media {
    position: relative;
    width: 100%;
    height: 215px; /* Taller image to occupy vertical space and balance proportions */
    background: #11131e;
    overflow: hidden;
}

.card-media-link {
    display: block;
    width: 100%;
    height: 100%;
}

.carousel-slides {
    width: 100%;
    height: 100%;
    display: flex;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(10, 11, 16, 0.6);
    backdrop-filter: blur(4px);
    color: #fff;
    border: none;
    outline: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition-smooth);
    opacity: 0;
    pointer-events: none;
}

.card-media:hover .carousel-control {
    opacity: 1;
    pointer-events: auto;
}

.carousel-control:hover {
    background: rgba(10, 11, 16, 0.9);
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev { left: 8px; }
.carousel-control.next { right: 8px; }

.price-tag {
    position: absolute;
    bottom: 12px;
    left: 12px;
    background: rgba(10, 11, 16, 0.75);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--success);
    font-size: 18px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 8px;
}

.card-body {
    padding: 8px; /* Extremely narrow padding to keep content close to the edges */
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 18px; /* Scaled up to occupy the card layout efficiently */
    font-weight: 700;
    line-height: 1.35;
    margin-bottom: 8px;
    color: var(--text-primary);
    /* Multi-line truncation */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    max-height: 50px;
}

.listing-title-link {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.listing-title-link:hover {
    color: var(--primary);
}

.card-details-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.detail-tag {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 5px 12px; /* Increased padding to use space effectively */
    border-radius: 6px;
    font-size: 13px; /* Scaled up details text */
    font-weight: 600;
    color: var(--text-secondary);
}

.card-address {
    font-size: 14px; /* Scaled up address text */
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 10px;
}

.card-address i {
    color: var(--primary);
}

.card-description {
    font-size: 14px; /* Scaled up description text */
    line-height: 1.45;
    color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
    position: relative;
    transition: all 0.3s ease;
}

.card-description-content {
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: all 0.3s ease;
}

.card-description.expanded .card-description-content {
    display: block;
    -webkit-line-clamp: unset;
}

.card-description-toggle {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 4px;
    font-size: 11px;
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
    margin-top: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    user-select: none;
    transition: color 0.2s ease;
}

.card-description-toggle:hover {
    color: var(--primary-hover, #6d66e5);
}

.card-description-toggle i {
    transition: transform 0.3s ease;
    font-size: 10px;
}

.card-description.expanded .card-description-toggle i {
    transform: rotate(180deg);
}

/* Lazy Load Spinners & Description Animations */

.desc-loading-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
    margin-right: 6px;
    vertical-align: middle;
}

.card-description.has-lazy-desc {
    border-color: rgba(109, 102, 229, 0.2);
    background: rgba(109, 102, 229, 0.02);
}

.card-description.has-lazy-desc:hover {
    border-color: rgba(109, 102, 229, 0.4);
    background: rgba(109, 102, 229, 0.04);
}

.card-description-toggle.error-state {
    color: var(--danger) !important;
}


.card-footer-row {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.publish-date {
    font-size: 13px; /* Scaled up publish date */
    color: var(--text-muted);
}

.card-actions {
    display: flex;
    gap: 6px;
}

.card-action-btn {
    width: 38px; /* Scaled up action buttons */
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-glass);
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 15px; /* Scaled up icons */
    transition: var(--transition-smooth);
}

.card-action-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.card-action-btn.like-btn:hover {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.3);
    color: var(--accent);
}

.card-action-btn.liked {
    background: rgba(236, 72, 153, 0.2);
    border-color: rgba(236, 72, 153, 0.4);
    color: var(--accent);
}

.card-action-btn.archive-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

/* Settings Form elements */
.settings-form {
    max-width: 800px;
}

.form-section {
    padding-bottom: 30px;
    margin-bottom: 30px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 10px;
    margin-bottom: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: var(--transition-smooth);
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    background: rgba(255, 255, 255, 0.06);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-tip {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}

.flex-row {
    flex-direction: row;
    align-items: center;
    gap: 15px;
    height: 100%;
}

/* Modern Switch Toggle */
.switch-container {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.switch-container input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.1);
    transition: .4s;
    border-radius: 34px;
    border: 1px solid var(--border-glass);
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: #fff;
    transition: .4s;
    border-radius: 50%;
}

.switch-container input:checked + .switch-slider {
    background-color: var(--primary);
}

.switch-container input:checked + .switch-slider:before {
    transform: translateX(24px);
}

.switch-label-group {
    display: flex;
    flex-direction: column;
}

.switch-title {
    font-size: 14px;
    font-weight: 600;
}

.switch-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
}

.test-result-indicator {
    font-size: 14px;
    font-weight: 500;
}

.test-result-indicator.success { color: var(--success); }
.test-result-indicator.error { color: var(--danger); }

.form-submit-row {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 10px;
}

.save-status {
    font-size: 14px;
    font-weight: 500;
    color: var(--success);
}

/* Logs Terminal View */
.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logs-container {
    padding: 0 !important;
    overflow: hidden;
    border: 1px solid var(--border-glass);
    background: #06070a;
}

.terminal-header {
    background: #0f111a;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding: 10px 20px;
    display: flex;
    align-items: center;
    position: relative;
}

.terminal-dots {
    display: flex;
    gap: 8px;
}

.terminal-dots .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.terminal-dots .dot.red { background: #ff5f56; }
.terminal-dots .dot.yellow { background: #ffbd2e; }
.terminal-dots .dot.green { background: #27c93f; }

.terminal-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Fira Code', monospace;
    font-size: 12px;
    color: var(--text-secondary);
}

.terminal-body {
    padding: 20px;
    height: 500px;
    overflow-y: auto;
    font-family: 'Fira Code', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #a6accd;
}

.log-line {
    margin-bottom: 4px;
    white-space: pre-wrap;
}

.log-line.error { color: #f07178; }
.log-line.warning { color: #f78c6c; }
.log-line.info { color: #c3e88d; }

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes pulse {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 10px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* Responsive adjust */
@media (max-width: 900px) {
    .app-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 20px;
    }
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 20px;
    }
    .dashboard-row {
        grid-template-columns: 1fr;
    }
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Custom Filter Builder & Select elements */
.form-group select {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 12px 16px;
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: var(--transition-smooth);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23ffffff' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
    cursor: pointer;
}

.form-group select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
    background-color: rgba(18, 20, 32, 0.95);
}

.form-group select option {
    background: #11131e;
    color: #fff;
}


.city-selector-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.city-pill {
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 8px 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    font-size: 13px;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    user-select: none;
}

.city-pill:hover {
    background: rgba(255, 255, 255, 0.07);
    color: var(--text-primary);
    border-color: rgba(255, 255, 255, 0.2);
}

.city-pill input[type="checkbox"] {
    display: none; /* Hide native checkbox */
}

.city-pill:has(input[type="checkbox"]:checked) {
    background: rgba(139, 92, 246, 0.15); /* Purple transparent glow */
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.25);
}

/* Compact pill variant for listings toolbar */
.city-pill-sm {
    padding: 5px 10px;
    font-size: 12px;
    border-radius: 16px;
}

.margin-bottom-md {
    margin-bottom: 20px !important;
}

/* Listings Toolbar & Checkbox Styling */

.checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    padding: 8px 16px;
    border-radius: 10px;
}

.checkbox-container:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.15);
}

.checkbox-container input[type="checkbox"] {
    display: none;
}

.checkbox-checkmark {
    width: 18px;
    height: 18px;
    border-radius: 6px;
    border: 1.5px solid var(--border-glass);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    background: rgba(10, 11, 16, 0.4);
}

.checkbox-container input:checked + .checkbox-checkmark {
    background: var(--info);
    border-color: var(--info);
    box-shadow: 0 0 10px var(--info-glow);
}

.checkbox-checkmark:after {
    content: "\f00c";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 10px;
    color: #fff;
    display: none;
}

.checkbox-container input:checked + .checkbox-checkmark:after {
    display: block;
}

.checkbox-container:has(input:checked) {
    border-color: var(--info);
    background: rgba(59, 130, 246, 0.08);
    color: #fff;
}

/* Sea Distance Badge on Listing Card */
.sea-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: rgba(59, 130, 246, 0.85); /* Ocean blue translucent */
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
    z-index: 2;
}

/* Map Header & Layout */
.map-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.map-toolbar {
    display: flex;
    align-items: center;
    gap: 15px;
}

.map-wrapper {
    padding: 12px;
    margin-top: 10px;
}

#map-container {
    background: #06070a;
}

/* Leaflet Dark styling overrides */
.leaflet-popup-content-wrapper {
    background: rgba(15, 17, 26, 0.95) !important;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: var(--text-primary) !important;
    border-radius: 14px !important;
    padding: 0 !important;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6) !important;
}

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

.leaflet-popup-tip {
    background: rgba(15, 17, 26, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.leaflet-container a.leaflet-popup-close-button {
    color: var(--text-secondary) !important;
    font-size: 16px !important;
    padding: 8px 8px 0 0 !important;
    transition: var(--transition-smooth);
}

.leaflet-container a.leaflet-popup-close-button:hover {
    color: #fff !important;
}

.leaflet-bar {
    border: 1px solid var(--border-glass) !important;
    box-shadow: none !important;
    border-radius: 8px !important;
    overflow: hidden;
}

.leaflet-bar a {
    background-color: rgba(18, 20, 32, 0.85) !important;
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-glass) !important;
    transition: var(--transition-smooth);
}

.leaflet-bar a:hover {
    background-color: rgba(26, 29, 46, 0.95) !important;
    color: #fff !important;
}

/* Custom Interactive popup content styling */
.map-popup-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    position: relative;
}

.map-popup-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.map-popup-noimage {
    width: 100%;
    height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #11131e;
    color: var(--text-muted);
    font-size: 28px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.map-popup-body {
    padding: 12px;
}

.map-popup-title {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.map-popup-price {
    color: var(--success);
    font-size: 15px;
    font-weight: 800;
    margin-bottom: 6px;
}

.map-popup-details {
    display: flex;
    gap: 6px;
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.map-popup-sea {
    color: var(--info);
    font-weight: 600;
    font-size: 11px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.map-popup-sea.far {
    color: var(--text-muted);
    font-weight: 500;
}

.map-popup-actions {
    display: flex;
    gap: 8px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
}

.map-popup-btn {
    flex-grow: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    padding: 6px 0;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.map-popup-btn:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.15);
}

.map-popup-btn.like-btn:hover, .map-popup-btn.like-btn.liked {
    background: rgba(236, 72, 153, 0.15);
    border-color: rgba(236, 72, 153, 0.3);
    color: var(--accent);
}

.map-popup-btn.like-btn.liked {
    background: rgba(236, 72, 153, 0.2);
}

.map-popup-btn.archive-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.3);
    color: var(--danger);
}

/* Custom Map Markers */
.custom-map-pin {
    background: transparent !important;
    border: none !important;
}

.custom-map-pin-marker {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    background: rgba(139, 92, 246, 0.85); /* Purple for new */
    backdrop-filter: blur(4px);
    border: 2px solid rgba(255, 255, 255, 0.8);
    border-radius: 50%;
    color: #fff;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    transition: var(--transition-smooth);
}

.custom-map-pin-marker i {
    font-size: 12px;
}

.custom-map-pin.near-sea .custom-map-pin-marker {
    background: rgba(59, 130, 246, 0.85); /* Blue */
    border-color: rgba(147, 197, 253, 0.9);
    box-shadow: 0 0 12px rgba(59, 130, 246, 0.6);
}

.custom-map-pin.liked .custom-map-pin-marker {
    background: rgba(236, 72, 153, 0.85); /* Pink */
    border-color: rgba(249, 168, 212, 0.9);
    box-shadow: 0 0 12px rgba(236, 72, 153, 0.6);
}

.custom-map-pin:hover .custom-map-pin-marker {
    transform: scale(1.2);
    border-color: #fff;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
}

/* Source Select Filter & Wrapper */
.select-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.glass-select {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-glass);
    border-radius: 8px;
    padding: 8px 32px 8px 12px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    outline: none;
    transition: var(--transition-smooth);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%2394a3b8' viewBox='0 0 16 16'><path fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    cursor: pointer;
}

.glass-select:focus {
    border-color: var(--primary);
    background-color: rgba(17, 19, 30, 0.95);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.2);
}

.glass-select option {
    background: #11131e;
    color: #fff;
}

/* Source Badges on Card Media */
.source-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    gap: 4px;
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.source-badge.yad2 {
    background: rgba(249, 115, 22, 0.85); /* orange */
    box-shadow: 0 4px 10px rgba(249, 115, 22, 0.3);
}

.source-badge.madlan {
    background: rgba(20, 184, 166, 0.85); /* teal */
    box-shadow: 0 4px 10px rgba(20, 184, 166, 0.3);
}

.source-badge.homeless {
    background: rgba(139, 92, 246, 0.85); /* violet */
    box-shadow: 0 4px 10px rgba(139, 92, 246, 0.3);
}

.source-badge.facebook {
    background: rgba(29, 78, 216, 0.85); /* blue */
    box-shadow: 0 4px 10px rgba(29, 78, 216, 0.3);
}

.source-badge.komo {
    background: rgba(132, 204, 22, 0.85); /* lime green */
    box-shadow: 0 4px 10px rgba(132, 204, 22, 0.3);
}

.source-badge.ad {
    background: rgba(244, 63, 94, 0.85); /* crimson rose */
    box-shadow: 0 4px 10px rgba(244, 63, 94, 0.3);
}

.source-badge.winwin {
    background: rgba(234, 179, 8, 0.85); /* amber gold */
    box-shadow: 0 4px 10px rgba(234, 179, 8, 0.3);
}

.source-badge.onmap {
    background: rgba(99, 102, 241, 0.85); /* indigo */
    box-shadow: 0 4px 10px rgba(99, 102, 241, 0.3);
}

.source-badge.janglo {
    background: rgba(14, 165, 233, 0.85); /* sky blue */
    box-shadow: 0 4px 10px rgba(14, 165, 233, 0.3);
}

.source-badge.другой {
    background: rgba(107, 114, 128, 0.85); /* gray */
    box-shadow: 0 4px 10px rgba(107, 114, 128, 0.3);
}

.source-badge.madas {
    background: rgba(16, 185, 129, 0.85); /* emerald */
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.source-badge.nadlan {
    background: rgba(217, 70, 239, 0.85); /* fuchsia */
    box-shadow: 0 4px 10px rgba(217, 70, 239, 0.3);
}

.source-badge.reshut {
    background: rgba(239, 68, 68, 0.85); /* red */
    box-shadow: 0 4px 10px rgba(239, 68, 68, 0.3);
}

.source-badge.homely {
    background: rgba(168, 85, 247, 0.85); /* purple */
    box-shadow: 0 4px 10px rgba(168, 85, 247, 0.3);
}

.source-badge.kones {
    background: rgba(202, 138, 4, 0.85); /* gold */
    box-shadow: 0 4px 10px rgba(202, 138, 4, 0.3);
}

.source-badge.zoome {
    background: rgba(6, 182, 212, 0.85); /* cyan */
    box-shadow: 0 4px 10px rgba(6, 182, 212, 0.3);
}

/* Map Popup Source Badge */
.map-popup-source-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 5px;
    text-transform: uppercase;
    z-index: 10;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.map-popup-source-badge.yad2 {
    background: rgba(249, 115, 22, 0.85);
}
.map-popup-source-badge.madlan {
    background: rgba(20, 184, 166, 0.85);
}
.map-popup-source-badge.homeless {
    background: rgba(139, 92, 246, 0.85);
}
.map-popup-source-badge.facebook {
    background: rgba(29, 78, 216, 0.85);
}
.map-popup-source-badge.komo {
    background: rgba(132, 204, 22, 0.85);
}
.map-popup-source-badge.ad {
    background: rgba(244, 63, 94, 0.85);
}
.map-popup-source-badge.winwin {
    background: rgba(234, 179, 8, 0.85);
}
.map-popup-source-badge.onmap {
    background: rgba(99, 102, 241, 0.85);
}
.map-popup-source-badge.janglo {
    background: rgba(14, 165, 233, 0.85);
}
.map-popup-source-badge.другой {
    background: rgba(107, 114, 128, 0.85);
}

.map-popup-source-badge.madas {
    background: rgba(16, 185, 129, 0.85);
}
.map-popup-source-badge.nadlan {
    background: rgba(217, 70, 239, 0.85);
}
.map-popup-source-badge.reshut {
    background: rgba(239, 68, 68, 0.85);
}
.map-popup-source-badge.homely {
    background: rgba(168, 85, 247, 0.85);
}
.map-popup-source-badge.kones {
    background: rgba(202, 138, 4, 0.85);
}
.map-popup-source-badge.zoome {
    background: rgba(6, 182, 212, 0.85);
}

/* Advanced Filter Layout Styling */
.listings-toolbar {
    display: flex;
    flex-direction: column;
    gap: 15px;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 12px;
}

.listings-toolbar .filter-row {
    display: flex;
    align-items: center;
    gap: 15px;
    width: 100%;
    flex-wrap: wrap;
}

.listings-toolbar .filter-row.second-row {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 15px;
}

.filter-input-group.search-group {
    position: relative;
    flex-grow: 2;
    min-width: 250px;
}

.filter-input-group.search-group .icon-left {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
    pointer-events: none;
}

.filter-input-group.search-group .glass-input {
    width: 100%;
    padding: 10px 16px 10px 40px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    color: #fff;
    font-family: inherit;
    font-size: 14px;
    outline: none;
    transition: var(--transition-smooth);
}

.filter-input-group.search-group .glass-input:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 15px rgba(139, 92, 246, 0.15);
}

.range-inputs {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    padding: 6px 14px;
    border-radius: 10px;
}

.range-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.range-dash {
    color: var(--text-muted);
    font-size: 12px;
}

.glass-input-sm {
    width: 80px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: 6px;
    padding: 6px 8px;
    color: #fff;
    font-size: 13px;
    outline: none;
    transition: var(--transition-smooth);
    text-align: center;
}

.glass-input-sm:focus {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.06);
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.15);
}

.glass-input-sm::-webkit-outer-spin-button,
.glass-input-sm::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.glass-input-sm {
    -moz-appearance: textfield;
}

.listings-toolbar .select-wrapper {
    flex-grow: 1;
    min-width: 180px;
}

.listings-toolbar .select-wrapper .glass-select {
    width: 100%;
}

/* Collapsible Advanced Settings Panel styling */
.advanced-settings-toggle:hover {
    background: rgba(255, 255, 255, 0.05) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
}

.advanced-settings-toggle:active {
    transform: scale(0.995);
}

/* Card & Map Comment Boxes */
.card-comment-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    padding: 0 10px;
    transition: var(--transition-smooth);
}

.card-comment-box:focus-within {
    border-color: var(--border-glass-focus);
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(108, 99, 255, 0.15);
}

.card-comment-box i.comment-icon {
    font-size: 13px;
    color: var(--text-muted);
    margin-right: 8px;
    transition: var(--transition-smooth);
}

.card-comment-box:focus-within i.comment-icon {
    color: var(--primary);
}

.card-comment-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 14px; /* Scaled up note font size */
    padding: 8px 0;
    font-family: inherit;
}

.card-comment-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}

.map-popup-comment-box {
    margin: 8px 0;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 0 8px;
    transition: var(--transition-smooth);
}

.map-popup-comment-box:focus-within {
    border-color: var(--border-glass-focus);
    background: rgba(0, 0, 0, 0.3);
}

.map-popup-comment-box i {
    font-size: 11px;
    color: var(--text-muted);
    margin-right: 6px;
}

.map-popup-comment-box:focus-within i {
    color: var(--primary);
}

.map-popup-comment-input {
    width: 100%;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 11px;
    padding: 6px 0;
    font-family: inherit;
}

.map-popup-comment-input::placeholder {
    color: var(--text-muted);
    font-style: italic;
}





/* View toggle (Grid / Map) */
.view-toggle-group {
    display: flex;
    gap: 3px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-glass);
    border-radius: 10px;
    padding: 3px;
}

.view-toggle-btn {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-muted);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.view-toggle-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.07);
}

.view-toggle-btn.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
}

/* ===== Map with Drawer Layout ===== */
.map-with-drawer {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    position: relative;
}

.map-card-drawer {
    width: 0;
    min-width: 0;
    overflow: hidden;
    transition: width 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    flex-shrink: 0;
    position: relative;
}

.map-card-drawer.open {
    width: 400px;
    opacity: 1;
}

.map-drawer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    background: rgba(255,255,255,0.08);
    border: 1px solid var(--border-glass);
    color: var(--text-secondary);
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition-smooth);
}

.map-drawer-close:hover {
    background: rgba(255,255,255,0.14);
    color: #fff;
}

.map-drawer-content {
    width: 400px;
    max-height: 640px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Drawer card: same as grid card but full width */
.map-drawer-content .listing-card {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    animation: none !important;
}

.map-drawer-content .card-media {
    height: 200px !important;
}

/* Scrollbar for drawer */
.map-drawer-content::-webkit-scrollbar {
    width: 4px;
}
.map-drawer-content::-webkit-scrollbar-track {
    background: transparent;
}
.map-drawer-content::-webkit-scrollbar-thumb {
    background: var(--border-glass);
    border-radius: 4px;
}

/* Map Popup Links styling */
.map-popup-media-link {
    display: block;
    width: 100%;
}

.map-popup-title-link {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-smooth);
}

.map-popup-title-link:hover {
    color: var(--primary);
    text-decoration: underline;
}
