/* =========================================================================
   Linear Design System – NL Vastgoeddata Project
   ========================================================================= */

:root {
    /* Backgrounds */
    --bg-page: #FFFFFF;
    --bg-surface: #FFFFFF;
    --bg-sidebar: #F7F8FA;
    --bg-hover: #F1F2F4;
    --bg-overlay: rgba(255, 255, 255, 0.85);
    --bg-active: #ECEEF0;

    /* Borders */
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-strong: rgba(0, 0, 0, 0.15);
    
    /* Shadows - Linear style */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);

    /* Text */
    --text-primary: #11181C;
    --text-secondary: #687076;
    --text-tertiary: #8A8F98;

    /* Primary Actions */
    --accent-bg: #11181C;
    --accent-text: #FFFFFF;

    /* Semantic */
    --color-green: #29A366;
    --color-amber: #E57D00;
    --color-red: #E5484D;
    --color-blue: #0090FF;
    --color-purple: #8E4EC6;

    /* Spacing */
    --space-xs: 4px;
    --space-sm: 6px;
    --space-md: 8px;
    --space-lg: 12px;
    --space-xl: 16px;
    --space-2xl: 24px;

    /* Radius */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;

    /* Sidebar */
    --sidebar-width: 260px;
    --filter-width: 240px;

    /* Listing detail modal — one horizontal rhythm */
    --listing-modal-pad: var(--space-xl);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    min-height: 0;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 13px;
    letter-spacing: -0.01em;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--bg-page);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* -------------------------------------------------------------------------
   Layout
   ------------------------------------------------------------------------- */

.app-layout {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

/* -------------------------------------------------------------------------
   Sidebar Navigation
   ------------------------------------------------------------------------- */

.sidebar {
    width: var(--sidebar-width);
    min-width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    padding: var(--space-xl);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.sidebar-logo {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.sidebar-section-title {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    padding: var(--space-xl) var(--space-xl) var(--space-md);
}

.sidebar-nav {
    list-style: none;
    padding: 0 var(--space-md);
}

.sidebar-nav li a {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-sm) var(--space-lg);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.sidebar-nav li a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-nav li a.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-sm);
}

.sidebar-nav li a svg {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    stroke-width: 1.5;
    fill: none;
    flex-shrink: 0;
}

.sidebar-footer {
    margin-top: auto;
    padding: var(--space-xl);
    border-top: 1px solid var(--border-subtle);
    font-size: 11px;
    color: var(--text-tertiary);
}

/* Sidebar collapse */
.sidebar-collapse-btn {
    margin-left: auto;
    background: none;
    border: none;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.sidebar-collapse-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar-expand-btn {
    width: 28px;
    height: 28px;
    background: none;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    flex-shrink: 0;
    transition: color 0.15s, background 0.15s;
}

.sidebar-expand-btn:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.sidebar.collapsed {
    width: 0;
    min-width: 0;
    padding: 0;
    overflow: hidden;
    border-right: none;
}

.sidebar .nav-label {
    transition: opacity 0.15s;
}

/* -------------------------------------------------------------------------
   Main Content
   ------------------------------------------------------------------------- */

.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
}

.topbar {
    height: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--space-2xl);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}

.topbar-breadcrumb {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 13px;
    color: var(--text-secondary);
}

.topbar-breadcrumb span {
    color: var(--text-tertiary);
}

.topbar-breadcrumb strong {
    color: var(--text-primary);
    font-weight: 500;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

.page-body {
    flex: 1;
    display: flex;
    overflow: hidden;
}

.page-content {
    flex: 1;
    overflow-y: auto;
    padding: var(--space-2xl);
    min-width: 0;
}

/* -------------------------------------------------------------------------
   Filter Panel
   ------------------------------------------------------------------------- */

.filter-panel {
    width: var(--filter-width);
    min-width: var(--filter-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-subtle);
    overflow-y: auto;
    min-height: 0;
    overscroll-behavior: contain;
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.filter-section-title {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.mode-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2px;
    background: var(--bg-hover);
    padding: 2px;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 0 1px var(--border-subtle);
}

.mode-btn {
    height: 26px;
    font-size: 11px;
    font-weight: 500;
    font-family: inherit;
    background: transparent;
    border: none;
    border-radius: calc(var(--radius-sm) - 2px);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0 2px;
    white-space: nowrap;
}

.mode-btn:hover {
    color: var(--text-primary);
}

.mode-btn.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 0 0 1px var(--border-subtle);
}

.filter-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: var(--space-xs) 0;
}

.collapsible-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    padding: 2px 0;
    user-select: none;
}

.collapsible-header:hover .filter-section-title {
    color: var(--text-secondary);
}

.collapse-icon {
    font-size: 10px;
    color: var(--text-tertiary);
    transition: transform 0.2s ease;
}

.collapse-icon.collapsed {
    transform: rotate(-90deg);
}

.collapsible-body {
    display: none;
}

.collapsible-body.open {
    display: block;
}

/* -------------------------------------------------------------------------
   Form Controls
   ------------------------------------------------------------------------- */

.input, .select {
    width: 100%;
    height: 30px;
    padding: 0 var(--space-md);
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: none;
    box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-sm);
    border-radius: var(--radius-sm);
    outline: none;
    transition: box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.input:focus, .select:focus {
    box-shadow: inset 0 0 0 1px var(--text-primary), 0 0 0 2px rgba(17, 24, 28, 0.15), var(--shadow-sm);
}

.input::placeholder {
    color: var(--text-tertiary);
}

.select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238A8F98' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    padding-right: 28px;
}

label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* Range inputs */
.range-row {
    display: flex;
    gap: var(--space-md);
}

.range-row .input {
    flex: 1;
}

/* Toggle switches */
.toggle-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xs) 0;
}

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

.toggle {
    position: relative;
    width: 32px;
    height: 18px;
    appearance: none;
    background: var(--border-strong);
    border-radius: 9px;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    outline: none;
}

.toggle::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: white;
    border-radius: 50%;
    transition: transform 0.2s;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.toggle:checked {
    background: var(--accent-bg);
}

.toggle:checked::before {
    transform: translateX(14px);
}

/* -------------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-sm);
    height: 30px;
    padding: 0 var(--space-lg);
    font-size: 13px;
    font-family: inherit;
    font-weight: 500;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    text-decoration: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(180deg, #1f2937, #11181C);
    color: var(--accent-text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), var(--shadow-sm);
}

.btn-primary:hover {
    background: linear-gradient(180deg, #374151, #1f2937);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), var(--shadow-sm);
}

.btn-primary:active {
    background: #11181C;
    box-shadow: inset 0 1px 2px rgba(0,0,0,0.2);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-sm);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    box-shadow: inset 0 0 0 1px var(--border-strong), 0 2px 4px rgba(0,0,0,0.04);
}

.btn-secondary:active {
    background: var(--bg-active);
    box-shadow: inset 0 0 0 1px var(--border-strong), inset 0 1px 2px rgba(0,0,0,0.05);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}

.btn-ghost:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-block {
    width: 100%;
}

/* -------------------------------------------------------------------------
   Stat Cards
   ------------------------------------------------------------------------- */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-2xl);
}

.stat-card {
    background: var(--bg-surface);
    box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-sm);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    transition: box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.stat-card:hover {
    box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-md);
    transform: translateY(-1px);
}

.stat-label {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-xs);
}

.stat-value {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-value.green { color: var(--color-green); }
.stat-value.amber { color: var(--color-amber); }
.stat-value.red { color: var(--color-red); }
.stat-value.blue { color: var(--color-blue); }

.stat-sub {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: var(--space-xs);
}

/* -------------------------------------------------------------------------
   Data Overview Panel (Right side in screenshot)
   ------------------------------------------------------------------------- */

.data-panel {
    width: 320px;
    min-width: 320px;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    overflow-y: auto;
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-xl);
}

.data-panel-title {
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
}

.data-stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1px;
    background: var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: inset 0 0 0 1px var(--border-subtle);
}

.data-stat {
    background: var(--bg-surface);
    padding: var(--space-xl);
    transition: background 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.data-stat:hover {
    background: var(--bg-sidebar);
}

.data-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.data-stat-label {
    font-size: 11px;
    color: var(--text-tertiary);
}

/* Province breakdown bars */
.province-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.province-row {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    font-size: 12px;
}

.province-name {
    width: 120px;
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.province-bar-wrapper {
    flex: 1;
    height: 6px;
    background: var(--bg-hover);
    border-radius: 3px;
    overflow: hidden;
}

.province-bar {
    height: 100%;
    background: var(--accent-bg);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.province-value {
    width: 60px;
    text-align: right;
    color: var(--text-tertiary);
    font-size: 11px;
}

/* Top items list */
.top-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.top-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-xs) 0;
    font-size: 12px;
}

.top-item-name {
    color: var(--text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

.top-item-value {
    color: var(--text-primary);
    font-weight: 500;
    margin-left: var(--space-md);
}

/* -------------------------------------------------------------------------
   Map
   ------------------------------------------------------------------------- */

.map-container {
    flex: 1;
    min-height: 400px;
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
}

.map-container-full {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
}

.map-legend {
    position: absolute;
    bottom: var(--space-xl);
    left: var(--space-xl);
    background: var(--bg-overlay);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    z-index: 1000;
}

.map-controls {
    position: absolute;
    top: var(--space-xl);
    right: var(--space-xl);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

/* -------------------------------------------------------------------------
   Tab Group
   ------------------------------------------------------------------------- */

.tab-group {
    display: inline-flex;
    gap: 2px;
    background: var(--bg-hover);
    padding: 2px;
    border-radius: var(--radius-sm);
    box-shadow: inset 0 0 0 1px var(--border-subtle);
    overflow: hidden;
}

.tab-btn {
    flex: 1;
    height: 26px;
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0 var(--space-lg);
    border-radius: calc(var(--radius-sm) - 2px);
    white-space: nowrap;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 0 0 1px var(--border-subtle);
}

/* -------------------------------------------------------------------------
   Search
   ------------------------------------------------------------------------- */

.search-wrapper {
    position: relative;
    width: 280px;
}

.search-wrapper svg {
    position: absolute;
    left: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    stroke: var(--text-tertiary);
    stroke-width: 1.5;
    fill: none;
}

.search-input {
    width: 100%;
    height: 30px;
    padding: 0 var(--space-md) 0 28px;
    font-size: 13px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--bg-surface);
    border: none;
    box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-sm);
    border-radius: var(--radius-sm);
    outline: none;
    transition: box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-input:focus {
    background: var(--bg-surface);
    box-shadow: inset 0 0 0 1px var(--text-primary), 0 0 0 2px rgba(17, 24, 28, 0.15), var(--shadow-md);
}

.search-input::placeholder {
    color: var(--text-tertiary);
}

/* -------------------------------------------------------------------------
   Charts
   ------------------------------------------------------------------------- */

.chart-card {
    background: var(--bg-surface);
    box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-sm);
    border-radius: var(--radius-md);
    padding: var(--space-xl);
    transition: box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.chart-card:hover {
    box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-md);
    transform: translateY(-1px);
}

.chart-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.chart-subtitle {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-bottom: var(--space-lg);
}

.chart-container {
    position: relative;
    height: 240px;
}

.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: var(--space-xl);
}

/* -------------------------------------------------------------------------
   Tables
   ------------------------------------------------------------------------- */

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table th {
    text-align: left;
    font-size: 11px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-tertiary);
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    position: sticky;
    top: 0;
    background: var(--bg-surface);
}

.data-table td {
    padding: var(--space-md) var(--space-lg);
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}

.data-table tr:hover td {
    background: var(--bg-hover);
}

/* -------------------------------------------------------------------------
   Floating Panel (Map overlays)
   ------------------------------------------------------------------------- */

.floating-panel {
    background: var(--bg-overlay);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-lg);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    transition: box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* -------------------------------------------------------------------------
   Loading
   ------------------------------------------------------------------------- */

.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid var(--border-subtle);
    border-top-color: var(--text-primary);
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

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

/* Top progress bar */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #0090FF, #8E4EC6, #0090FF);
    background-size: 200% 100%;
    z-index: 9999;
    transition: width 0.3s ease;
    animation: progressShimmer 1.5s ease infinite;
    border-radius: 0 2px 2px 0;
}

@keyframes progressShimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Skeleton loading blocks */
.skeleton {
    background: linear-gradient(90deg, var(--bg-hover) 25%, var(--bg-active) 50%, var(--bg-hover) 75%);
    background-size: 200% 100%;
    animation: skeletonPulse 1.5s ease infinite;
    border-radius: var(--radius-sm);
}

@keyframes skeletonPulse {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.skeleton-text {
    height: 12px;
    margin-bottom: 8px;
    width: 100%;
}

.skeleton-text.short { width: 60%; }
.skeleton-text.medium { width: 80%; }

.skeleton-card {
    height: 56px;
    width: 100%;
}

.skeleton-chart {
    height: 200px;
    width: 100%;
}

/* Loading overlay for cards/sections */
.loading-overlay {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 40px 20px;
    color: var(--text-tertiary);
    font-size: 13px;
}

.loading-overlay .spinner {
    width: 28px;
    height: 28px;
    border: 2.5px solid var(--border-subtle);
    border-top-color: #0090FF;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* Pulsing dot loader (compact) */
.dot-loader {
    display: inline-flex;
    gap: 4px;
    align-items: center;
}

.dot-loader span {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--text-tertiary);
    animation: dotPulse 1.2s ease infinite;
}

.dot-loader span:nth-child(2) { animation-delay: 0.15s; }
.dot-loader span:nth-child(3) { animation-delay: 0.3s; }

@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
    40% { opacity: 1; transform: scale(1.2); }
}

/* -------------------------------------------------------------------------
   Scrollbar
   ------------------------------------------------------------------------- */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
    border: 1px solid var(--bg-surface);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--border-strong);
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------
   Detail Panel (right slide-out)
   ------------------------------------------------------------------------- */

.detail-panel {
    width: 340px;
    min-width: 340px;
    background: var(--bg-surface);
    border-left: 1px solid var(--border-subtle);
    overflow-y: auto;
    transition: margin-right 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -4px 0 24px rgba(0,0,0,0.02);
}

.detail-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-subtle);
    position: relative;
}

.detail-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.detail-subtitle {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.detail-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
}

.detail-close:hover {
    background: var(--bg-active);
    color: var(--text-primary);
}

.detail-section {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border-subtle);
}

.detail-section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.detail-collapsible {
    cursor: pointer;
    user-select: none;
}

.detail-collapsible:hover {
    color: var(--text-secondary);
}

.detail-collapsed-body {
    display: none;
}

.detail-section.expanded .detail-collapsed-body {
    display: block;
}

.detail-section.expanded .collapse-icon {
    transform: rotate(0deg);
}

.detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.metric-card {
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
}

.metric-value {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.metric-label {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 1px;
}

.age-bar {
    display: flex;
    height: 12px;
    border-radius: 6px;
    overflow: hidden;
    margin-top: 10px;
}

.age-legend {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 6px;
    font-size: 10px;
    color: var(--text-tertiary);
}

.age-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 2px;
    margin-right: 3px;
    vertical-align: middle;
}

.detail-prices, .detail-hospitals {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-secondary);
    padding: 3px 0;
}

.hospital-row {
    padding: 6px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.hospital-row:last-child {
    border-bottom: none;
}

.hospital-name {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-primary);
}

.hospital-meta {
    font-size: 11px;
    color: var(--text-tertiary);
}

.detail-actions {
    padding: 14px 20px;
}

/* -------------------------------------------------------------------------
   Search Dropdown
   ------------------------------------------------------------------------- */

.search-wrapper {
    position: relative;
}

.search-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 360px;
    overflow-y: auto;
    display: none;
    margin-top: 4px;
}

.search-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    cursor: pointer;
    transition: background 0.1s;
}

.search-result:hover {
    background: var(--bg-hover);
}

.search-icon {
    font-size: 16px;
    width: 24px;
    text-align: center;
}

.search-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.search-type {
    font-size: 11px;
    color: var(--text-tertiary);
}

.search-empty {
    padding: 16px;
    text-align: center;
    font-size: 12px;
    color: var(--text-tertiary);
}

/* -------------------------------------------------------------------------
   Address Search Dropdown
   ------------------------------------------------------------------------- */

.address-search-wrapper {
    position: relative;
}

.address-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    box-shadow: 0 8px 24px rgba(0,0,0,0.12);
    z-index: 1100;
    max-height: 260px;
    overflow-y: auto;
    margin-top: 2px;
}

.address-dropdown.open {
    display: block;
}

.address-dropdown-item {
    padding: 8px 10px;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    border-bottom: 1px solid var(--border-subtle);
    transition: background 0.1s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.address-dropdown-item:last-child {
    border-bottom: none;
}

.address-dropdown-item:hover,
.address-dropdown-item.active {
    background: var(--bg-hover);
}

.address-dropdown-empty {
    padding: 12px 10px;
    text-align: center;
    font-size: 11px;
    color: var(--text-tertiary);
}

.address-marker-popup {
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 1.5;
}

.address-marker-popup strong {
    font-size: 13px;
}

/* -------------------------------------------------------------------------
   Hover Tooltip
   ------------------------------------------------------------------------- */

.hover-tooltip {
    position: fixed;
    z-index: 900;
    background: rgba(17, 24, 28, 0.92);
    color: #fff;
    padding: 8px 12px;
    border-radius: var(--radius-sm);
    font-family: 'Inter', sans-serif;
    font-size: 12px;
    line-height: 1.5;
    pointer-events: none;
    max-width: 220px;
    box-shadow: var(--shadow-md);
}

/* -------------------------------------------------------------------------
   Map Spinner
   ------------------------------------------------------------------------- */

/* SVG path fade-in for smooth geo feature injection */
.geo-path {
    transition: fill-opacity 0.4s ease, opacity 0.4s ease, stroke-width 0.15s ease;
}

.map-loading-indicator {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 600;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 6px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-md);
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
}

.spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-subtle);
    border-top-color: #0090FF;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

/* -------------------------------------------------------------------------
   Compare Bar
   ------------------------------------------------------------------------- */

.compare-bar {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 600;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 8px 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: var(--shadow-lg);
}

.compare-label {
    font-size: 12px;
    color: var(--text-tertiary);
    font-weight: 500;
}

.compare-chip {
    font-size: 12px;
    background: var(--bg-hover);
    border-radius: var(--radius-sm);
    padding: 4px 8px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.compare-chip button {
    background: none;
    border: none;
    font-size: 14px;
    color: var(--text-tertiary);
    cursor: pointer;
    padding: 0 2px;
}

/* -------------------------------------------------------------------------
   Compare Table
   ------------------------------------------------------------------------- */

.compare-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    margin-top: 8px;
}

.compare-table th, .compare-table td {
    padding: 6px 10px;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.compare-table th {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 11px;
}

.compare-table td {
    color: var(--text-secondary);
}

.compare-best {
    font-weight: 600;
    color: var(--text-primary) !important;
}

/* -------------------------------------------------------------------------
   (Level indicator – auto-switches based on zoom)
   ------------------------------------------------------------------------- */

/* -------------------------------------------------------------------------
   Button sizes
   ------------------------------------------------------------------------- */

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* -------------------------------------------------------------------------
   Energy label badge
   ------------------------------------------------------------------------- */

.energy-label-wrap {
    display: inline-block;
    margin: 8px 0 0;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.18));
}
.energy-label-badge {
    display: inline-flex;
    align-items: center;
    padding: 8px 24px 8px 14px;
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 1px;
    line-height: 1;
    clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 50%, calc(100% - 16px) 100%, 0 100%);
}

.energy-label-missing {
    margin-top: 6px;
    color: #888;
    font-size: 13px;
    font-style: italic;
}

/* -------------------------------------------------------------------------
   WOZ history bars
   ------------------------------------------------------------------------- */

.woz-history {
    margin-top: 10px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

.woz-history-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.woz-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 3px;
    font-size: 12px;
}

.woz-bar-year {
    width: 32px;
    color: var(--text-tertiary);
    flex-shrink: 0;
    text-align: right;
}

.woz-bar-track {
    flex: 1;
    height: 14px;
    background: var(--surface-secondary, #f0f0f0);
    border-radius: 3px;
    overflow: hidden;
}

.woz-bar-fill {
    display: block;
    height: 100%;
    background: var(--accent, #4f8ef7);
    opacity: 0.45;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.woz-bar-fill.woz-bar-current {
    opacity: 1;
}

.woz-bar-val {
    width: 70px;
    text-align: right;
    color: var(--text-primary);
    font-variant-numeric: tabular-nums;
    flex-shrink: 0;
}

/* -------------------------------------------------------------------------
   Woningtype dots legend
   ------------------------------------------------------------------------- */

.dots-legend {
    position: absolute;
    bottom: 80px;
    left: 12px;
    background: var(--surface, #fff);
    border: 1px solid var(--border, #e0e0e0);
    border-radius: 8px;
    padding: 8px 12px;
    z-index: 800;
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
    font-size: 12px;
}

.dots-legend-title {
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.dots-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 2px 0;
    color: var(--text-primary);
}

.dots-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1.5px solid #fff;
    box-shadow: 0 0 0 1px rgba(0,0,0,.15);
    flex-shrink: 0;
}

/* =========================================================================
   Vastgoedaanbod – Listings page
   ========================================================================= */

.listings-layout {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%;
    min-height: 0;
    overflow: hidden;
}

.listings-sidebar {
    width: var(--filter-width);
    min-width: var(--filter-width);
    border-right: 1px solid var(--border-subtle);
    background: var(--bg-surface);
    padding: var(--space-xl);
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    overflow-y: auto;
}

.listings-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: var(--bg-page);
}

.listings-map-container {
    height: 280px;
    min-height: 200px;
    border-bottom: 1px solid var(--border-subtle);
}

.listings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-lg) var(--space-xl);
    border-bottom: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}

.listings-count {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
}

.listings-sort .select {
    width: auto;
    min-width: 160px;
}

.listings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-xl);
    padding: var(--space-xl);
}

.listings-loading {
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    padding: 60px;
}

.listings-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: var(--space-xl);
    border-top: 1px solid var(--border-subtle);
    background: var(--bg-surface);
}
.pg-btn {
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    font-size: 12px;
}

/* ── Listing card ─────────────────────────────────────────────── */

.listing-card {
    background: var(--bg-surface);
    box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-sm);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s cubic-bezier(0.16, 1, 0.3, 1), transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.listing-card:hover {
    box-shadow: inset 0 0 0 1px var(--border-strong), var(--shadow-md);
    transform: translateY(-2px);
}

.listing-card-img {
    height: 180px;
    overflow: hidden;
    background: var(--bg-hover);
    position: relative;
}
.listing-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.listing-card-noimg {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 12px;
}

.listing-card-photo-count {
    position: absolute;
    bottom: 8px;
    right: 8px;
    background: rgba(0,0,0,0.6);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
}

.listing-card-status {
    position: absolute;
    top: 8px;
    left: 8px;
    background: var(--color-amber);
    color: #fff;
    font-size: 10px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.listing-card-body {
    padding: var(--space-lg);
}

.listing-card-price {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.listing-card-addr {
    font-size: 13px;
    color: var(--text-primary);
}

.listing-card-loc {
    font-size: 12px;
    color: var(--text-tertiary);
    margin-bottom: var(--space-md);
}

.listing-card-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.listing-chip {
    font-size: 11px;
    padding: 2px 8px;
    background: var(--bg-hover);
    border-radius: 4px;
    color: var(--text-secondary);
}

/* ── Cluster markers ──────────────────────────────────────────── */

.cluster-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}
.cluster-small  { width: 30px; height: 30px; background: #0090FF; }
.cluster-medium { width: 36px; height: 36px; background: #3b82f6; font-size: 13px; }
.cluster-large  { width: 44px; height: 44px; background: #1d4ed8; font-size: 14px; }

/* ── Listing modal ────────────────────────────────────────────── */

.listing-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-xl);
    box-sizing: border-box;
}

.listing-modal {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 780px;
    max-height: min(90vh, 900px);
    position: relative;
    box-shadow: inset 0 0 0 1px var(--border-subtle), 0 24px 48px -12px rgba(0, 0, 0, 0.18), 0 8px 24px -8px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: none;
}

/* Scroll only the body — keeps hero + chrome aligned; avoids float layout bugs */
.listing-modal-body {
    flex: 1;
    min-height: 0;
    width: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    scrollbar-gutter: stable;
}

.listing-modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    z-index: 20;
    background: rgba(0, 0, 0, 0.45);
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 22px;
    line-height: 1;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    border-radius: 50%;
    backdrop-filter: blur(6px);
    flex-shrink: 0;
}
.listing-modal-close:hover {
    background: rgba(0, 0, 0, 0.65);
    color: #fff;
}

/* ── Slider ───────────────────────────────────────────────────── */

.ld-slider {
    position: relative;
    overflow: hidden;
    background: #0d0d0f;
    height: min(42vh, 400px);
    width: 100%;
    flex-shrink: 0;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.ld-slider-track {
    display: flex;
    height: 100%;
    width: 100%;
    transition: transform 0.35s ease;
}

.ld-slider-img {
    min-width: 100%;
    width: 100%;
    height: 100%;
    flex: 0 0 100%;
    object-fit: cover;
    object-position: center;
    background: #0d0d0f;
    display: block;
}

.ld-slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    background: rgba(255,255,255,0.85);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    font-size: 22px;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    backdrop-filter: blur(4px);
}
.ld-slider-btn:hover { background: #fff; }
.ld-slider-prev { left: 12px; }
.ld-slider-next { right: 12px; }

.ld-slider-dots {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 5px;
    z-index: 5;
}
.ld-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.45);
    cursor: pointer;
    transition: background 0.2s;
}
.ld-dot.active { background: #fff; }

.ld-slider-counter {
    position: absolute;
    bottom: 12px;
    right: 16px;
    z-index: 5;
    background: rgba(0,0,0,0.5);
    color: #fff;
    font-size: 11px;
    padding: 2px 8px;
    border-radius: 4px;
}

/* ── Detail content ───────────────────────────────────────────── */

.ld-header {
    padding: var(--space-xl) var(--listing-modal-pad);
    border-bottom: 1px solid var(--border-subtle);
}
.ld-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
    color: var(--text-primary);
}
.ld-addr {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 2px;
}
.ld-price {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin-top: var(--space-md);
}
.ld-status-badge {
    display: inline-block;
    margin-top: var(--space-sm);
    background: var(--color-amber);
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 2px 10px;
    border-radius: 4px;
    text-transform: uppercase;
}

.ld-stats-row {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0 var(--listing-modal-pad);
    background: var(--bg-surface);
}
.ld-stat {
    flex: 1;
    text-align: center;
    padding: var(--space-lg) var(--space-sm);
    border-right: 1px solid var(--border-subtle);
    min-width: 0;
}
.ld-stat:last-child { border-right: none; }
.ld-stat-val {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}
.ld-stat-lbl {
    font-size: 11px;
    color: var(--text-tertiary);
    margin-top: 2px;
}

.ld-section {
    padding: var(--space-xl) var(--listing-modal-pad);
    border-bottom: 1px solid var(--border-subtle);
}
.ld-section:last-child { border-bottom: none; }

.ld-section-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-lg);
}

.ld-desc {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
    white-space: pre-line;
}

.ld-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md) var(--space-xl);
}
.ld-detail-cell {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    padding: 3px 0;
    border-bottom: 1px solid var(--border-subtle);
}
.ld-detail-lbl { color: var(--text-tertiary); }
.ld-detail-val { color: var(--text-primary); font-weight: 500; text-align: right; }

.ld-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-md);
}

/* -------------------------------------------------------------------------
   Map: listing dots + detail panel vastgoedaanbod
   ------------------------------------------------------------------------- */

.map-listing-marker-wrap {
    background: transparent !important;
    border: none !important;
}

.map-listing-dot {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid #0090FF;
    box-sizing: border-box;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.map-listing-dot--plain {
    border: 2px solid #fff;
}

.map-listing-dot-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-listing-dot-img--bad {
    display: none !important;
}

.map-addr-dot.map-listing-dot {
    width: 26px;
    height: 26px;
}

.map-vg-section {
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: var(--space-xl);
    margin-bottom: var(--space-md);
}

.map-vg-meta {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-top: var(--space-sm);
}

.map-vg-badge {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.map-vg-tx {
    font-size: 11px;
    color: var(--text-tertiary);
    text-transform: capitalize;
}

.map-vg-price {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: var(--space-md);
}

.map-vg-makelaar {
    font-size: 12px;
    color: var(--text-secondary);
    margin-top: var(--space-xs);
}

.map-vg-extlink {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--color-blue);
    text-decoration: none;
}

.map-vg-extlink:hover {
    text-decoration: underline;
}

.map-listing-gallery {
    margin-top: var(--space-lg);
}

.map-listing-main {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-hover);
}

.map-listing-thumbs {
    display: flex;
    gap: 6px;
    margin-top: var(--space-md);
    overflow-x: auto;
    padding-bottom: 4px;
}

.map-listing-thumb {
    flex: 0 0 auto;
    width: 48px;
    height: 48px;
    padding: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: var(--bg-hover);
}

.map-listing-thumb.active {
    border-color: var(--color-blue);
}

.map-listing-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.map-vg-desc {
    font-size: 12px;
    line-height: 1.55;
    color: var(--text-secondary);
    margin-top: var(--space-lg);
    max-height: 200px;
    overflow-y: auto;
}

.map-vg-facts {
    margin-top: var(--space-lg);
}

/* WOZ vs listing asking price (detail panel) */
.woz-vs-listing {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    border-radius: 8px;
    border: 1px solid var(--border-subtle);
    background: var(--bg-hover);
}

.woz-vs-listing-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-md);
}

.woz-vs-rows {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.woz-vs-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: var(--space-lg);
    font-size: 12px;
    color: var(--text-secondary);
}

.woz-vs-row strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
}

.woz-vs-diff {
    margin-top: var(--space-lg);
    padding-top: var(--space-md);
    border-top: 1px solid var(--border-subtle);
    font-size: 13px;
    line-height: 1.45;
}

.woz-vs-diff--up .woz-vs-diff-main {
    color: var(--color-amber);
    font-weight: 600;
}

.woz-vs-diff--down .woz-vs-diff-main {
    color: var(--color-green);
    font-weight: 600;
}

.woz-vs-diff--eq .woz-vs-diff-main {
    color: var(--text-primary);
    font-weight: 600;
}

.woz-vs-diff-pct {
    color: var(--text-secondary);
    font-weight: 500;
}

.woz-vs-hint {
    margin: var(--space-md) 0 0;
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.4;
}

.woz-vs-foot {
    margin: var(--space-sm) 0 0;
    font-size: 11px;
    color: var(--text-tertiary);
    line-height: 1.35;
}

.woz-vs-section {
    margin-top: var(--space-md);
    padding: var(--space-md) 0 0;
}

.woz-vs-section + .woz-vs-section {
    border-top: 1px dashed var(--border-subtle);
    margin-top: var(--space-lg);
}

.woz-vs-section-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text-tertiary);
    margin-bottom: var(--space-sm);
}

.woz-vs-section--secondary {
    opacity: 0.85;
}

/* -------------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------------- */

@media (max-width: 1024px) {
    .detail-panel {
        display: none;
    }
    .filter-panel {
        width: 200px;
        min-width: 200px;
    }
    .listings-sidebar {
        width: 200px;
        min-width: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        display: none;
    }
    .filter-panel {
        display: none;
    }
    .listings-sidebar {
        display: none;
    }
    .listing-modal-overlay {
        padding: 0;
        align-items: stretch;
    }
    .listing-modal {
        max-width: 100%;
        max-height: 100%;
        border-radius: 0;
        border: none;
    }
    .ld-slider {
        border-radius: 0;
    }
}

/* -------------------------------------------------------------------------
   Leaflet Overrides (Linear Style)
   ------------------------------------------------------------------------- */

.leaflet-control-zoom {
    border: none !important;
    box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-sm) !important;
    border-radius: var(--radius-sm) !important;
    overflow: hidden;
}

.leaflet-control-zoom a {
    background-color: var(--bg-overlay) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    color: var(--text-primary) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    width: 32px !important;
    height: 32px !important;
    line-height: 32px !important;
    font-family: 'Inter', sans-serif !important;
    font-weight: 500 !important;
    transition: background-color 0.2s cubic-bezier(0.16, 1, 0.3, 1), color 0.2s cubic-bezier(0.16, 1, 0.3, 1) !important;
}

.leaflet-control-zoom a:hover {
    background-color: var(--bg-hover) !important;
    color: var(--text-primary) !important;
}

.leaflet-control-zoom a:last-child {
    border-bottom: none !important;
}

.leaflet-popup-content-wrapper {
    background: var(--bg-overlay) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-lg) !important;
    border-radius: var(--radius-md) !important;
    padding: 0 !important;
    color: var(--text-primary) !important;
}

.leaflet-popup-content {
    margin: 12px !important;
    font-family: 'Inter', sans-serif !important;
}

.leaflet-popup-tip-container {
    display: none !important; /* Hide the arrow for a cleaner look */
}

.leaflet-tooltip {
    background: var(--bg-overlay) !important;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: none !important;
    box-shadow: inset 0 0 0 1px var(--border-subtle), var(--shadow-md) !important;
    border-radius: var(--radius-sm) !important;
    color: var(--text-primary) !important;
    font-family: 'Inter', sans-serif !important;
    font-size: 12px !important;
    font-weight: 500 !important;
    padding: 4px 8px !important;
}

.leaflet-tooltip::before {
    display: none !important; /* Hide tooltip arrows */
}
