/* =========================
   Reset
   ========================= */
* {
    box-sizing: border-box;
}

a {
    color: inherit;
}

html, body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #1a1a1a;
}

.bg-fill {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;

    background: #f5f7fa;
    position: fixed;
    z-index: -1;
}

.bg-gradient {
    left: 0;
    right: 0;
    width: auto;
    height: 600px;
    background: #f5f7fa;
    position: absolute;
    z-index: -1;
}

.bso .bg-gradient {
    background: linear-gradient(180deg, rgb(255 186 73 / 12%) 0%, rgba(245, 247, 250, 0) 100%);
}

.kdv .bg-gradient {
    background: linear-gradient(180deg, rgb(32 163 158 / 12%) 0%, rgba(245, 247, 250, 0) 100%);
}

.vgo .bg-gradient {
    background: linear-gradient(180deg, rgb(239 91 91 / 12%) 0%, rgba(245, 247, 250, 0) 100%);
}

.gob .bg-gradient {
    background: linear-gradient(180deg, rgb(104 221 136 / 12%) 0%, rgba(245, 247, 250, 0) 100%);
}

.highlight {
    color: rgb(125 125 125);
}

.bso .highlight {
    color: rgb(255 186 73);
}

.kdv .highlight {
    color: rgb(32 163 158);
}

.vgo .highlight {
    color: rgb(239 91 91);
}

.gob .highlight {
    color: rgb(104 221 136);
}

.history-card {
    position: relative;
}

.state-badge {
    position: absolute;
    top: 12px;
    right: 12px;
    background: #eee;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
    margin-left: 6px;
}

.margin-bottom {
    margin-bottom: 1rem;
}

/* =========================
   Labels
   ========================= */

.inline-label {
    font-size: 0.9rem;
    color: #475569;
    text-decoration: none;
    padding: 4px 8px;
    font-size: 12px;
    border-radius: 6px;
    background: rgb(255 255 255 / 10%);
    border: 1px solid #d0d5dd;
}

    .inline-label.kdv {
        background: rgba(32, 163, 158, 0.1);
        border: 1px solid rgba(32, 163, 158, 1);
    }

    .inline-label.bso {
        background: rgba(255, 186, 73, 0.1);
        border: 1px solid rgba(255, 186, 73, 1);
    }

    .inline-label.vgo {
        background: rgba(239, 91, 91, 0.1);
        border: 1px solid rgba(239, 91, 91, 1);
    }

    .inline-label.gob {
        background: rgba(104, 221, 136, 0.1);
        border: 1px solid rgba(104, 221, 136, 1);
    }


/* =========================
Search header
========================= */
.search-header {
    background: rgb(255 255 255 / 50%);
    border-bottom: 1px solid #d0d5dd;
    border-top: 1px solid #d0d5dd;
    padding: 1.25rem;
}

.search-form {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    gap: 0.75rem;
}

    .search-form input[type="search"] {
        flex: 1;
        padding: 0.75rem 1rem;
        font-size: 1rem;
        border-radius: 4px;
        border: 1px solid #cbd5e1;
    }

        .search-form input[type="search"]:focus {
            outline: none;
            border-color: #2563eb;
            box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
            border: 1px solid rgba(37, 99, 235, 1);
        }

        .bso .search-form input[type="search"]:focus {
            box-shadow: 0 0 0 3px rgba(255, 186, 73, 0.15);
            border: 1px solid rgba(255, 186, 73, 1);
        }

        .kdv .search-form input[type="search"]:focus {
            box-shadow: 0 0 0 3px rgba(32, 163, 158, 0.15);
            border: 1px solid rgba(32, 163, 158, 1);
        }

        .vgo .search-form input[type="search"]:focus {
            box-shadow: 0 0 0 3px rgba(239, 91, 91, 0.15);
            border: 1px solid rgba(239, 91, 91, 1);
        }

        .gob .search-form input[type="search"]:focus {
            box-shadow: 0 0 0 3px rgba(104, 221, 136, 0.15);
            border: 1px solid rgba(104, 221, 136, 1);
        }

    .search-form button {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
        border-radius: 4px;
        border: none;
        background: #2563eb;
        color: white;
        cursor: pointer;
    }

    .search-form button {
        padding: 0.75rem 1.25rem;
        font-size: 1rem;
        border-radius: 4px;
        border: none;
        background: #2563eb;
        color: white;
        cursor: pointer;
    }

    .bso .search-form button {
        background: rgba(255, 186, 73, 1)
    }

    .kdv .search-form button {
        background: rgba(32, 163, 158, 1)
    }

    .vgo .search-form button {
        background: rgba(239, 91, 91, 1)
    }

    .gob .search-form button {
        background: rgba(104, 221, 136, 1)
    }

        .search-form button:hover {
            filter: brightness(95%);
        }

/* =========================
   Results area
   ========================= */

.results-map {
    max-width: 1024px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 1024px;
    margin: auto;
    padding: 0 1.25rem;
    padding-bottom: 1.25rem;
}


/* =========================
   Results area
   ========================= */
.results {
    max-width: 1024px;
    margin: auto;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* For when results are inline in the detail page */
.detail-layout .results {
    padding: 0;
    grid-template-columns: repeat(2, 1fr);
    margin-bottom: 1rem;
}

/* For when results are inline in the main page */
.main-layout .results {
    padding: 0;
    grid-template-columns: repeat(3, 1fr);
    margin-bottom: 1rem;
}


/* Desktop enhancement */
@media (min-width: 768px) {
    .results {
        grid-template-columns: repeat(3, 1fr);
    }
}


/* =========================
   datasets area
   ========================= */
.datasets {
    max-width: 1024px;
    margin: auto;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

/* Desktop enhancement */
@media (min-width: 768px) {
    .datasets {
        grid-template-columns: repeat(1, 1fr);
    }
}

.dataset {
    display: grid;
    grid-template-columns: 100px 1fr;
}

.oms-spider-leg {
    stroke: #333;
    stroke-width: 2px;
    stroke-opacity: 0.8;
    stroke-linecap: round;
}

.marker-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.marker-gemeente {
    position: relative;
    display: inline-block;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    font-family: sans-serif;
    border-radius: 14px;
    overflow: hidden;
    color: #000000;
}

    .marker-gemeente .details {
        /* list-style: none; */
        cursor: pointer;
        /* display: flex; */
        justify-content: space-between;
        align-items: flex-end;
        align-items: center;
        background-color: #eeeeee;
        padding: 6px 10px;
        font-weight: bold;
        font-size: 13px;
        align-items: end;
        min-width: 135px;
        text-align: left;
    }

.marker-province {
    position: relative;
    display: inline-block;
    box-shadow: 3px 3px 1px 1px rgb(203 203 203);
    font-family: sans-serif;
    border-radius: 12px;
    overflow: hidden; /* IMPORTANT: fixes broken radius */
}

    .marker-province .details {
        /* list-style: none; */
        cursor: pointer;
        /* display: flex; */
        justify-content: space-between;
        align-items: flex-end;
        align-items: center;
        background-color: #ffffff;
        padding: 6px 10px;
        font-weight: bold;
        font-size: 13px;
        align-items: end;
        min-width: 135px;
        text-align: left;
    }

.marker {
    position: relative;
    display: inline-block;
    box-shadow: 3px 3px 1px 1px rgb(203 203 203);
    font-family: sans-serif;
    border-radius: 12px;
    overflow: hidden; /* IMPORTANT: fixes broken radius */
}

    /* Remove default arrow */
    .marker .mainpagemarker {
        /* list-style: none; */
        cursor: pointer;
        /* display: flex; */
        justify-content: space-between;
        align-items: flex-end;
        align-items: center;
        background-color: #ffffff;
        padding: 6px 10px;
        font-weight: bold;
        font-size: 13px;
        align-items: end;
        min-width: 100px;
        text-align: center;
    }

    /* Remove default arrow */
    .marker summary {
        list-style: none;
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: flex-end;
        align-items: center;
        background-color: #ffffff;
        padding: 6px 10px;
        font-weight: bold;
        font-size: 13px;
        align-items: end;
        min-width: 150px;
    }

        /* Hide default marker triangle */
        .marker summary::-webkit-details-marker {
            display: none;
        }

        /* Custom arrow */
        .marker summary::after {
            content: "\25BC";
            font-size: 0.9rem;
            color: #475569;
            transition: transform 0.2s ease;
            margin-left: 8px;
        }

    /* Rotate arrow when open */
    .marker[open] summary::after {
        transform: rotate(180deg);
    }

/* Bottom section */
.marker-inner-bottom {
    background-color: #eeeeee;
    padding: 6px 10px;
    font-size: 11px;
}

/* Triangle border (shadow layer) */
.marker::before {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #cbcbcb;
}

/* Triangle fill */
.marker::after {
    content: "";
    position: absolute;
    bottom: -7px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 7px solid transparent;
    border-right: 7px solid transparent;
    border-top: 7px solid #eeeeee;
}

.province-marker {
    background: #1e3a8a;
    color: white;
    border: 3px solid #60a5fa;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

.gemeente-marker {
    background: #166534;
    color: white;
    border: 2px solid #4ade80;
    border-radius: 6px;
    box-shadow: 0 3px 8px rgba(0,0,0,0.25);
}

.custom-cluster {
    background: transparent;
}

.cluster-box {
    background: #eeeeee;
    border-radius: 14px;
    padding: 6px 10px;
    text-align: left;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
    width: 120px;
    color: #000000;
}

    .cluster-box .count {
        font-weight: bold;
        font-size: 13px;
    }

    .cluster-box .gemeente {
        font-size: 11px;
        opacity: 0.9;
        margin-top: 2px;
        line-height: 1.2;
    }

.leaflet-marker-icon {
    will-change: transform;
}

.quote {
    width:100%;
}
    .quote .quote-inner {
        padding:  1rem;
        height: 100%;
        position: relative;

        margin: 0;
        font-size: 1.4rem;
        font-style: italic;
    }

    .quote footer {
        text-align: right;
        font-size: 1rem;
        padding: 1rem;
    }

/* Result cards */
.card {
    background: #ffffff;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    position: relative;
}

    .card--full-width {
        grid-column: 1 / -1; /* This is the key line */
    }

    .card .card-inner {
        padding: 1.25rem;
        border-radius: 6px;
        position: relative;
    }

    .card .card-inner-full {
        border-radius: 6px;
        height: 600px;
        position: relative;
        overflow: hidden;
    }

    .card .card-inner-container {
        height: 100%;
        display: grid;
        grid-template-columns: repeat(1, 1fr);
    }

    .card .card-inner-top {
        padding: 1.25rem 1.25rem 0.25rem 1.25rem;
        border-radius: 6px;
        position: relative;
    }

    .card .card-inner-bottom {
        padding: 0.25rem 1.25rem 1.25rem 1.25rem;
        border-radius: 0px 0px 6px 6px;
        position: relative;
    }

    .card h2 {
        margin: 0 0 0.5rem 0;
        font-size: 1.1rem;
    }

/*

        .kdv .card h2.clr {
            background: rgba(32, 163, 158, 0.3);
            padding: 4px 8px;
            border-radius: 6px;
        }

        .bso .card h2.clr {
            background: rgba(255, 186, 73, 0.3);
            padding: 4px 8px;
            border-radius: 6px;
        }

        .vgo .card h2.clr {
            background: rgba(239, 91, 91, 0.3);
            padding: 4px 8px;
            border-radius: 6px;
        }

        .gob .card h2.clr {
            background: rgba(104, 221, 136, 0.3);
            padding: 4px 8px;
            border-radius: 6px;
        }
        */
    .card .meta {
        font-size: 0.9rem;
        color: #475569;
        margin-bottom: 0.5rem;
    }

    .card p {
        margin: 0;
    }

    .card .badge {
        background: #eee;
        padding: 4px 8px;
        font-size: 12px;
        border-radius: 6px;
        float: right;
    }

    .badge--green {
        background-color: #e6f4ea !important;
        color: #1e4620 !important;
    }

    .badge--red {
        background-color: #fdecea !important;
        color: #7a1d16 !important;
    }

    .card .icon {
        position: absolute;
        bottom: -15px;
        right: 15px;
        font-size: 1.4rem;
        line-height: 1.6;
        letter-spacing: 0.15rem;
        word-break: break-word;
        float: right;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }

/* =========================
   Subdomain-bar bar
   ========================= */
.subdomain-bar {
    padding: 0.75rem 1.25rem;
}

.subdomain-inner {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-start;
}

.subdomain-links {
    display: flex;
    gap: 1.25rem;
}

    .subdomain-links a {
        font-size: 0.9rem;
        color: #475569;
        text-decoration: none;
        padding: 4px 8px;
        font-size: 12px;
        border-radius: 6px;
        background: rgb(255 255 255 / 10%);
        border: 1px solid #d0d5dd;
    }

        .default .subdomain-links a.default {
            background: rgb(255 255 255 / 50%);
        }

        .subdomain-links a:hover {
            text-decoration: underline;
            filter: brightness(95%);
        }

        .subdomain-links a.bso {
            background: rgba(255, 186, 73, 0.1);
            border: 1px solid rgba(255, 186, 73, 1);
        }

        .bso .subdomain-links a.bso {
            background: rgba(255, 186, 73, 0.5);
        }

        .subdomain-links a.kdv {
            background: rgba(32, 163, 158, 0.1);
            border: 1px solid rgba(32, 163, 158, 1);
        }

        .kdv .subdomain-links a.kdv {
            background: rgba(32, 163, 158, 0.5);
        }

        .subdomain-links a.vgo {
            background: rgba(239, 91, 91, 0.1);
            border: 1px solid rgba(239, 91, 91, 1);
        }

        .vgo .subdomain-links a.vgo {
            background: rgba(239, 91, 91, 0.5);
        }

        .subdomain-links a.gob {
            background: rgba(104, 221, 136, 0.1);
            border: 1px solid rgba(104, 221, 136, 1);
        }

        .gob .subdomain-links a.gob {
            background: rgba(104, 221, 136, 0.5);
        }

/* =========================
   Top bar
   ========================= */
.top-bar {
    padding: 0.75rem 1.25rem;
    margin-bottom: 3.5em;
}

.top-bar-inner {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    justify-content: flex-end;
}

.top-bar-inner-space-between {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.breadcrumbs{
    font-style: italic;
}

.suggestions {
    padding: 0.75rem 0;
    font-style: italic;
}

.top-links {
    display: flex;
    gap: 1.25rem;
}

    .top-links a {
        font-size: 0.9rem;
        color: #475569;
        text-decoration: none;
    }

        .top-links a:hover {
            text-decoration: underline;
        }

/* =========================
   Bottom bar
   ========================= */
.bottom-bar {
    padding: 0.75rem 1.25rem;
    margin-top: 7em;
}

.bottom-bar-inner {
    max-width: 1024px;
    margin: 0 auto;
    display: flex;
    justify-content: space-evenly;
    text-align: center;
}

.bottom-links {
    display: flex;
    gap: 1.25rem;
}

    .bottom-links a {
        font-size: 0.9rem;
        color: #475569;
        text-decoration: none;
    }

        .bottom-links a:hover {
            text-decoration: underline;
        }

/* =========================
   Result info bar
   ========================= */
.result-info-bar {
    padding: 0.75rem 1.25rem;
}

.main-layout {
    max-width: 1024px;
    margin: 0rem auto;
    padding: 0 1.25rem;
}


/* =========================
   DETAIL PAGE
   ========================= */

/* Main layout: 2/3 - 1/3 */
.detail-layout-no-grid {
    max-width: 1024px;
    margin: 0rem auto;
    padding: 0 1.25rem;
    gap: 1.25rem;
}

.detail-layout {
    max-width: 1024px;
    margin: 0rem auto;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.25rem;
}

/* Gray title bar */
.detail-title-no-border {
    border-radius: 6px;
    background: rgb(255 255 255 / 50%);
    padding: 1.25rem;
    margin-bottom: 1rem;
}

.detail-title {
    border-radius: 6px;
    background: rgb(255 255 255 / 50%);
    border: 1px solid #d0d5dd;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

    .detail-title h1 {
        margin: 0 0 0.25rem 0;
        font-size: 1.4rem;
    }

    .detail-title .inline {
        display: inline-block;
    }

    .detail-title h2 {
        margin: 0 0 0.25rem 0;
        font-size: 1.4rem;
    }

    .detail-title p {
        margin: 0;
        font-size: 0.9rem;
        color: #475569;
    }

    .detail-title:has(p:nth-of-type(2)) p:not(:last-child) {
        margin-bottom: 1rem;
    }

    .detail-title .icon {
        float: left;
        font-size: 2.8rem;
        margin: -0.25rem 0.75rem 0 0;
        user-select: none;
    }

/* Sidebar spacing */
.detail-sidebar .card {
    margin-bottom: 1rem;
}

.detail-layout .card {
    margin-bottom: 1rem;
}

    .detail-layout .results .card {
        margin-bottom: 0rem;
    }

.map {
    background-color: #d1dcc6;
}

.leaflet-container {
    background-color: #d1dcc6;
}

.map-stripes {
    background: repeating-linear-gradient( 45deg, #e5e7eb, #e5e7eb 10px, #d1d5db 10px, #d1d5db 20px );
}

/* Mobile fallback */
@media (max-width: 768px) {
    .detail-layout {
        grid-template-columns: 1fr;
    }
}

/* BIG CURRENT STATE CARD */
.current-state-card {
    margin-bottom: 32px;
    border-radius: 8px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* TIMELINE CONTAINER */
.timeline {
    position: relative;
    border-left: 2px solid #e5e7eb;
}

/* TIMELINE ITEM */
.timeline-item {
    position: relative;
    margin-bottom: 28px;
}

/* TIMELINE DOT */
.timeline-dot {
    position: absolute;
    left: -9px;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #3b82f6; /* default color, will override by type */
    border: 2px solid white;
    box-shadow: 0 0 0 2px #e5e7eb;
}

.timeline-dot--blue {
    background: #3b82f6;
}

.timeline-dot--green {
    background: #16a34a;
}

.timeline-dot--red {
    background: #dc2626;
}

.timeline-dot--yellow {
    background: #ca8a04;
}

/* TIMELINE CONTENT */
.timeline-content {
    padding-left: 12px;
}

/* TIMELINE HEADER */
.timeline-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    margin-bottom: 6px;
    color: #374151;
}

.timeline-section {
    margin-top: 1rem;
}

/* DIFF STYLES */
.diff {
    margin: 2px 0 4px 0;
    font-size: 0.95em;
}

    /* TYPE COLORS */
    .diff.added {
        color: #16a34a;
    }
    /* green */
    .diff.removed {
        color: #dc2626;
    }
    /* red */
    .diff.changed {
        color: #ca8a04;
    }
/* yellow/orange */

/* DIFF ICONS */
.diff-icon {
    font-weight: bold;
    margin-right: 6px;
}

/* OPTIONAL: DOT COLORS BY TYPE */
.timeline-item .diff.added ~ .timeline-dot {
    background: #16a34a;
}

.timeline-item .diff.removed ~ .timeline-dot {
    background: #dc2626;
}

.timeline-item .diff.changed ~ .timeline-dot {
    background: #ca8a04;
}

/* HOVER EFFECT */
.timeline-item:hover .timeline-dot {
    transform: scale(1.2);
    transition: transform 0.2s;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .timeline {
        margin-left: 16px;
    }

    .timeline-dot {
        left: -7px;
    }
}

.children-icons {
    font-size: 1.4rem;
    line-height: 1.6;
    letter-spacing: 0.15rem;
    word-break: break-word;
}

.btn-link {
    margin-right: 0.75rem;
    font-style: italic;
    line-height: 1.4;
}

.hint {
    margin: 1rem 0 1.25rem;
    overflow: hidden;
    font-size: 0.95rem;
}

.hint-inner {
    padding: 0.75rem 1rem;
    font-style: italic;
    line-height: 1.4;
}

/* Neutral hint */
.hint--neutral {
    background-color: #f5f5f5;
    border-left: 6px solid #b0b0b0;
    color: #444;
}

/* Blue / info hint */
.hint--blue {
    background-color: #eef5ff;
    border-left: 6px solid #4a90e2;
    color: #1f4f82;
}

/* Green / info hint */
.hint--green {
    background-color: #e6f4ea; /* soft green background */
    
    background-color: rgb(116 237 149 / 20%);

    border-left: 6px solid #34a853; /* strong green stripe */
    color: #1e4620; /* dark green text */
}

/* Red / warning hint */
.hint--red {
    background-color: #fdecea;
    border-left: 6px solid #d93025;
    color: #7a1d16;
}

/* =========================
   CARD TOGGLE (<details>)
   ========================= */
.card-toggle summary {
    cursor: pointer;
    list-style: none; /* remove default arrow */
    user-select: none;
}

    /* Remove default marker (Chrome/Safari) */
    .card-toggle summary::-webkit-details-marker {
        display: none;
    }

/* Custom arrow indicator */
.card-toggle summary::after {
    content: "\25BC";
    float: right;
    font-size: 0.9rem;
    color: #475569;
    transition: transform 0.2s ease;
}

/* Rotate arrow when open */
.card-toggle[open] summary::after {
    transform: rotate(180deg);
}

/* Optional: subtle hover effect */
.card-toggle summary:hover {
    opacity: 0.9;
}

/* =========================
   TIMELINE TOGGLE (<details>)
   ========================= */
/* Make summary look like your title block */
.timeline-toggle summary {
    cursor: pointer;
    list-style: none; /* remove default arrow */
    user-select: none;
}

    /* Remove default marker (Chrome/Safari) */
    .timeline-toggle summary::-webkit-details-marker {
        display: none;
    }

/* Optional: add spacing when closed/open */
.timeline-toggle .timeline {
    margin-top: 0.5rem;
}

/* Custom arrow indicator */
.timeline-toggle summary::after {
    content: "\25BC";
    float: right;
    font-size: 0.9rem;
    color: #475569;
    transition: transform 0.2s ease;
}

/* Rotate arrow when open */
.timeline-toggle[open] summary::after {
    transform: rotate(180deg);
}

.inspectie-age {
    width: 100%;
    height: 3em;
}

.inspectie-age::-webkit-meter-bar {
    border: 1px solid #ccc;
    border-radius: 6px;
    background: #f5f7fa;
}

.inspectie-age::-webkit-meter-optimum-value {
    background: #68dd88;
}

.inspectie-age::-webkit-meter-suboptimum-value {
    background: #ffba49;
}

.inspectie-age::-webkit-meter-even-less-good-value {
    background: #ef5b5b;
}