/*
 * frontend-upgrade.css
 *
 * jQuery UI 1.13.2 gebruikt standaard het Sunny-thema. De oude site gebruikte
 * een aangepaste Sunny-variant met grijze panelen/buttons en witte tabs.
 * Deze override herstelt die vertrouwde kleuren, zodat de update van de
 * techniek niet zorgt voor een andere uitstraling.
 */

/* Panelen (filterbalk, dialogs, boom) */
.ui-widget-content {
    border: 1px solid #dddddd;
    background: #eeeeee url(frontend-upgrade/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x;
    color: #333333;
}

.ui-widget-content a {
    color: #333333;
}

/* Kopregels, waaronder de titelbalk van dialogs */
.ui-widget-header {
    border: 1px solid #e78f08;
    background: #f6a828 url(frontend-upgrade/ui-bg_gloss-wave_35_f6a828_500x100.png) 50% 50% repeat-x;
    color: #ffffff;
    font-weight: bold;
}

.ui-widget-header a {
    color: #ffffff;
}

/* Standaardwidgets: tabs, buttons */
.ui-state-default,
.ui-widget-content .ui-state-default,
.ui-widget-header .ui-state-default,
.ui-button {
    border: 1px solid #cccccc;
    background: #f6f6f6 url(frontend-upgrade/ui-bg_glass_100_f6f6f6_1x400.png) 50% 50% repeat-x;
    font-weight: bold;
    color: #1c94c4;
}

.ui-state-default a,
.ui-state-default a:link,
.ui-state-default a:visited,
a.ui-button,
a:link.ui-button,
a:visited.ui-button {
    color: #1c94c4;
    text-decoration: none;
}

/* Hover/focus */
.ui-state-hover,
.ui-widget-content .ui-state-hover,
.ui-widget-header .ui-state-hover,
.ui-state-focus,
.ui-widget-content .ui-state-focus,
.ui-widget-header .ui-state-focus,
.ui-button:hover,
.ui-button:focus {
    border: 1px solid #fbcb09;
    background: #fdf5ce url(frontend-upgrade/ui-bg_glass_100_fdf5ce_1x400.png) 50% 50% repeat-x;
    font-weight: bold;
    color: #c77405;
}

.ui-state-hover a,
.ui-state-hover a:hover {
    color: #c77405;
    text-decoration: none;
}

/* Actieve tab / ingedrukte button */
.ui-state-active,
.ui-widget-content .ui-state-active,
.ui-widget-header .ui-state-active,
.ui-button:active,
.ui-button.ui-state-active:hover {
    border: 1px solid #fbd850;
    background: #ffffff url(frontend-upgrade/ui-bg_glass_65_ffffff_1x400.png) 50% 50% repeat-x;
    font-weight: bold;
    color: #eb8f00;
}

.ui-state-active a,
.ui-state-active a:link,
.ui-state-active a:visited {
    color: #eb8f00;
    text-decoration: none;
}

.ui-state-highlight,
.ui-widget-content .ui-state-highlight,
.ui-widget-header .ui-state-highlight {
    border: 1px solid #fed22f;
    background: #ffe45c url(frontend-upgrade/ui-bg_highlight-soft_75_ffe45c_1x100.png) 50% top repeat-x;
    color: #363636;
}

/* Icoontjes op knoppen hadden vroeger de oranje Sunny-kleur. */
.ui-button .ui-icon,
.ui-button:hover .ui-icon,
.ui-button:focus .ui-icon,
.ui-button:active .ui-icon {
    background-image: url(frontend-upgrade/ui-icons_ef8c08_256x240.png);
}

/* Sluitknop van dialogs: transparant met een wit kruis, zoals voorheen. */
.ui-dialog .ui-dialog-titlebar-close {
    background: transparent;
    border: 0;
    box-shadow: none;
}

.ui-dialog .ui-dialog-titlebar-close .ui-icon {
    background-image: url(frontend-upgrade/ui-icons_ffffff_256x240.png);
}

/* De tabbladen sluiten weer aan op het paneel, zoals in de oude viewer:
   de actieve tab heeft geen onderrand en heeft de oude hoekradius. */
#leftcontainer .ui-tabs-nav li {
    top: 1px;
    margin: 0 2px 1px 0;
}

#leftcontainer .ui-tabs-nav li.ui-tabs-active {
    margin-bottom: 0;
    padding-bottom: 1px;
    border-bottom: 0 !important;
    border-radius: 4px 4px 0 0 !important;
}

/* De linkerpaneel en de boom gebruiken hetzelfde lettertype als de rest
   van de site (en als de oude viewer), niet het Segoe UI uit het jQuery UI-thema. */
#leftcontainer,
#leftcontainer .ui-widget,
#treeBB,
#treeBB .jstree-anchor {
    font-family: "Roboto Flex", Varela, "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif;
}

/* De pijltjes van jstree 3 staan in een 32px-sprite; met deze verschuiving
   komen ze op dezelfde hoogte als de pijltjes in de oude viewer. */
#treeBB .jstree-open > .jstree-ocl,
#treeBB .jstree-closed > .jstree-ocl {
    background-position-y: -7px;
}

/* De boom had vroeger een witte achtergrond en compacte regels. */
#treeBB {
    background: #ffffff;
}

#treeBB .jstree-anchor {
    height: auto;
    min-height: 16px;
    line-height: 16px;
}

#treeBB .jstree-node {
    min-height: 18px;
    line-height: 18px;
    margin-left: 18px;
    min-width: 18px;
}

/* De root van de boom begint links, net als in de oude viewer. */
#treeBB > .jstree-container-ul > .jstree-node {
    margin-left: 0;
}

#treeBB .jstree-icon:empty {
    width: 18px;
    height: 18px;
    line-height: 18px;
}

#treeBB .jstree-hovered {
    background: #FCE6C1;
    border-radius: 0;
    box-shadow: none;
}

#treeBB .jstree-clicked {
    background: #F8C26D;
    border-radius: 0;
    box-shadow: none;
}

/* ---- UX-verbeteringen ---- */

/* Visueel verborgen tekst voor schermlezers (bijv. label van het zoekveld). */
.verborgen {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* Kopjes boven de filters, buiten de panelen zodat de layout gelijk blijft. */
#filterBouwsoort,
#filterGebruiksfunctie {
    position: relative;
}

.filter-titel {
    position: absolute;
    top: -12px;
    left: 3px;
    font-size: 10px;
    line-height: 11px;
    color: #6b5f55;
    white-space: nowrap;
    cursor: help;
}

.filter-titel.actief {
    color: #b36b00;
    font-weight: bold;
}

#btnReset.filter-actief {
    border-color: #e78f08;
}

/* Melding bij het bekijken van niet-actuele regelgeving. */
.versie-melding {
    margin: 0 0 12px 0;
    padding: 8px 12px;
    background: #fff4d6;
    border: 1px solid #f0c36d;
    border-left: 4px solid #e78f08;
    color: #4c3000;
    font-size: 12px;
}

.versie-melding a {
    color: #005388;
    font-weight: bold;
}

/* Melding wanneer het filter alle artikelen wegfiltert. */
.geen-resultaten {
    margin: 12px 10px;
    padding: 10px 14px;
    background: #f4f8fb;
    border: 1px solid #b9d3e6;
    border-left: 4px solid #005388;
    color: #333;
    font-size: 13px;
}

.geen-resultaten a {
    color: #005388;
    font-weight: bold;
}

/* Status onder het zoekveld: aantal resultaten of hint. */
#zoekMelding {
    min-height: 16px;
    margin-top: 6px;
    font-size: 11px;
    color: #6b5f55;
}

/*
 * Smalle schermen: de layout is opgebouwd voor een vaste breedte van ca. 1210px.
 * Voorheen stond overflow op "hidden", waardoor de rechterkant (menu, filters,
 * "Herstel filter") op kleinere schermen onbereikbaar was. Nu kan er horizontaal
 * gescrolld worden; op ruime schermen verandert er niets.
 */
html {
    overflow-x: auto;
    overflow-y: hidden;
}

body {
    overflow-x: visible;
    overflow-y: hidden;
}

/* ---- Middelgrote UX-verbeteringen ---- */

/* Leesbaarheid: de opsomming van gebruiksfuncties en bouwsoort was te licht (contrast ~3:1). */
.lid_gf,
.afd_bs {
    color: #5f5c58;
    font-size: 0.85em;
}

/* Kruimelpad boven de inhoud: waar staat dit onderdeel in de regelgeving? */
.kruimelpad {
    margin: 0 0 10px 0;
    padding: 5px 8px;
    background: #f7f7f7;
    border: 1px solid #e3e3e3;
    font-size: 11px;
    line-height: 1.6;
    color: #444;
}

.kruimelpad-link {
    color: #005388;
    text-decoration: none;
}

.kruimelpad-link:hover {
    text-decoration: underline;
}

.kruimelpad-scheiding {
    color: #8a8782;
}

.kruimelpad-huidig {
    font-weight: bold;
    color: #333;
}

.kruimelpad-acties {
    float: right;
    margin-left: 12px;
}

.kruimelpad-actie {
    margin-left: 12px;
    color: #005388;
    white-space: nowrap;
}

.kruimelpad-status {
    margin-left: 8px;
    color: #2b7a2b;
}

/* Toon/verberg-knoppen: icoon met zichtbare tekst. */
#cntBB .toggleLink {
    font-size: 11px;
    font-weight: normal;
    text-decoration: none;
    color: #005388;
    white-space: nowrap;
}

#cntBB .toggleLink:hover .toggleTekst {
    text-decoration: underline;
}

/* Zoekresultaten met context. */
.zoekresult {
    cursor: pointer;
}

.zoekresult:hover {
    background-color: #FCE6C1;
}

.zoek-titel {
    display: block;
}

.zoek-fragment {
    display: block;
    margin-top: 3px;
    font-size: 11px;
    line-height: 1.4;
    color: #555;
}

mark.treffer {
    background: #ffe66b;
    color: inherit;
    padding: 0 1px;
}

/* Melding bij een laadfout. */
.laadfout {
    margin: 12px 10px;
    padding: 10px 14px;
    background: #fdf0ee;
    border: 1px solid #e3b4ad;
    border-left: 4px solid #b3261e;
    color: #333;
    font-size: 13px;
}

.laadfout a {
    color: #005388;
    font-weight: bold;
}

/* Zichtbare focus voor toetsenbordgebruikers (zonder de muisweergave te veranderen). */
a:focus-visible,
button:focus-visible,
select:focus-visible,
input:focus-visible,
.zoekresult:focus-visible,
#treeBB .jstree-anchor:focus-visible {
    outline: 2px solid #005388;
    outline-offset: 1px;
}

#treeBB .jstree-anchor:focus-visible {
    outline-offset: -2px;
}

/* ---------- Moderne popups (disclaimer, advies, contact) ---------- */
.ui-widget-overlay {
    background: rgba(45, 30, 10, 0.5);
    opacity: 1;
}

.ui-dialog.bb-dialog {
    max-width: calc(100vw - 24px);
    padding: 0;
    border: 0;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
    overflow: hidden;
    font-family: "Roboto Flex", Varela, "Trebuchet MS", Tahoma, Verdana, Arial, sans-serif;
    color: #3a3125;
}

.bb-dialog .ui-dialog-titlebar {
    display: flex;
    align-items: center;
    padding: 16px 20px;
    border: 0;
    border-top: 5px solid #f6a828;
    border-bottom: 1px solid #f0e6d6;
    border-radius: 0;
    background: #fffaf1;
    color: #643c00;
}

.bb-dialog .ui-dialog-title {
    float: none;
    flex: 1;
    width: auto;
    margin: 0;
    font-size: 19px;
    font-weight: 700;
    white-space: normal;
}

.bb-dialog .ui-dialog-titlebar-close {
    position: relative;
    width: 34px;
    height: 34px;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #643c00;
    cursor: pointer;
}

.bb-dialog .ui-dialog-titlebar-close:hover,
.bb-dialog .ui-dialog-titlebar-close:focus-visible {
    background: #f6e3c0;
}

.bb-dialog .ui-dialog-titlebar-close .ui-icon {
    top: 50%;
    left: 50%;
    margin: -8px 0 0 -8px;
    background-image: url(frontend-upgrade/ui-icons_ef8c08_256x240.png);
}

.bb-dialog .ui-dialog-content.bb-popup {
    padding: 20px 24px 24px;
    background: #ffffff;
    font-size: 15px;
    line-height: 1.6;
}

.bb-popup p {
    margin: 0 0 12px;
}

.bb-popup .bb-popup-lead {
    font-size: 16px;
    font-weight: 600;
    color: #2b2218;
}

.bb-popup .bb-popup-note {
    margin: 16px 0 4px;
    padding: 12px 16px;
    border-left: 4px solid #f6a828;
    border-radius: 6px;
    background: #fff6e3;
}

.bb-popup .bb-popup-note p {
    margin: 0;
}

.bb-popup .bb-popup-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.bb-popup .bb-btn {
    display: inline-block;
    padding: 10px 18px;
    border: 2px solid #f6a828;
    border-radius: 999px;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .15s, color .15s;
}

.bb-popup .bb-btn-primary,
.bb-popup a.bb-btn-primary {
    background: #f6a828;
    color: #3a2300;
}

.bb-popup .bb-btn-primary:hover,
.bb-popup a.bb-btn-primary:hover {
    background: #e79410;
    border-color: #e79410;
}

.bb-popup .bb-btn-secondary,
.bb-popup a.bb-btn-secondary {
    background: #ffffff;
    color: #8a5300;
}

.bb-popup .bb-btn-secondary:hover,
.bb-popup a.bb-btn-secondary:hover {
    background: #fff1d6;
}

.bb-popup .bb-btn.bb-copied {
    border-color: #2e8b57;
    background: #e6f5ec;
    color: #1d6b40;
}

.bb-popup .bb-btn:focus-visible,
.bb-popup .bb-popup-mail:focus-visible,
.bb-popup a:focus-visible {
    outline: 3px solid #1c94c4;
    outline-offset: 2px;
}

.bb-popup .bb-popup-mailbox {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 16px;
    padding: 12px;
    border: 1px solid #ead9b8;
    border-radius: 10px;
    background: #fffaf1;
}

.bb-popup .bb-popup-label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

.bb-popup .bb-popup-mail {
    flex: 1;
    min-width: 0;
    padding: 8px 10px;
    border: 1px solid #d9c9a8;
    border-radius: 6px;
    background: #ffffff;
    font: inherit;
    font-size: 17px;
    font-weight: 600;
    color: #2b2218;
}

.bb-popup .bb-popup-status {
    margin-top: 8px;
    font-size: 13px;
    color: #1d6b40;
}

.bb-popup .bb-popup-company {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid #f0e6d6;
    font-size: 14px;
    color: #5b5042;
}

.bb-popup .bb-popup-company h3 {
    margin: 0 0 6px;
    font-size: 14px;
    font-weight: 700;
    color: #643c00;
}

.bb-popup address {
    margin: 0 0 8px;
    font-style: normal;
}

.bb-popup .bb-popup-company a,
.bb-popup .bb-popup-links a {
    color: #1c6f96;
}

.bb-popup .bb-popup-links {
    margin: 0;
}

@media (max-width: 480px) {
    .bb-popup .bb-popup-mailbox {
        flex-wrap: wrap;
    }

    .bb-popup .bb-btn {
        flex: 1 1 100%;
    }
}

.bb-popup .bb-popup-status:empty {
    margin: 0;
}

.bb-dialog .ui-dialog-titlebar::before,
.bb-dialog .ui-dialog-titlebar::after {
    display: none;
}
