/* menus.css
   Eén stijl voor alle menu's: de zijbalk, het overzicht op het dashboard, de filters op
   lijstpagina's, de knoppen rechtsboven en het info-menu. Kleuren: --menu-* in kleuren.css.

   Overal hetzelfde:
   - kop:         donkergroene balk, witte tekst in hoofdletters (12px)
   - kopje:       12px, vet, tekstkleur (bijv. 'Op doelsoort' bij de filters)
   - item:        13px, linkkleur; bij hover een lichte limoen achtergrond
   - gekozen:     limoen achtergrond + groen streepje links + vet
   - uitklapmenu: wit vak, dunne rand, schaduw, hoeken van 2px
   - knop:        wit met bruine rand (zie huisstijl.css), hoeken via --hoek

   'html' voor de selectors: Django laadt changelists.css ná dit bestand, zo winnen deze regels.
*/

/* ── Kop van een menu ──────────────────────────────────────────────────── */
html .module caption,
html #changelist-filter h2 {
    margin: 0;
    padding: 8px 12px;
    background: var(--menu-kop);
    color: var(--menu-kop-tekst);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    text-align: left;
}

html .module caption a.section:link,
html .module caption a.section:visited {
    color: var(--menu-kop-tekst);
}

/* ── Items in de zijbalk en op het dashboard ───────────────────────────── */
html #nav-sidebar .module th,
html #nav-sidebar .module td,
html #content-main .module th,
html #content-main .module td {
    padding: 7px 12px;
    font-size: 0.8125rem;
    vertical-align: middle;
}

html .module th a,
html .module td a.addlink,
html .module td a.changelink,
html .module td a.viewlink {
    color: var(--menu-link);
    font-weight: 400;
    text-decoration: none;
}

html .module tr:hover {
    background: var(--menu-hover);
}

/* 'Toevoegen' / 'Wijzigen': met de Django-icoontjes (groene +, potlood), zodat
   direct opvalt waar je iets kunt toevoegen */
html .module td a.addlink,
html .module td a.changelink,
html .module td a.viewlink {
    white-space: nowrap;
}

/* Gekozen item */
html #nav-sidebar .current-model {
    background: var(--menu-actief);
    box-shadow: inset 3px 0 0 var(--menu-actief-streep);
}
html #nav-sidebar .current-model th a { font-weight: 600; }

html #nav-sidebar .current-app .section:link,
html #nav-sidebar .current-app .section:visited {
    color: var(--menu-kop-tekst);
    font-weight: 600;
}

/* Zoekveld boven de zijbalk */
html #nav-filter {
    margin: 8px 0;
    padding: 6px 8px;
    border: 1px solid var(--menu-rand);
    border-radius: var(--hoek);
    background: var(--menu-vlak);
}

/* ── Filters op lijstpagina's ──────────────────────────────────────────── */
html #changelist-filter {
    border: 1px solid var(--menu-rand);
    border-radius: var(--hoek);
    background: var(--menu-vlak);
    overflow: hidden;
}

html #changelist-filter h2 { margin-bottom: 10px; }

/* Kopje per filter */
html #changelist-filter h3,
html #changelist-filter details summary {
    margin-bottom: 4px;
    padding: 0 12px;
    color: var(--body-fg);
    font-size: 0.75rem;
    font-weight: 600;
}

html #changelist-filter details > summary::before {
    color: var(--menu-link);
    margin-right: 4px;
}

html #changelist-filter ul {
    margin: 0 0 10px;
    padding: 0 0 10px;
}

html #changelist-filter li a {
    display: block;
    padding: 4px 12px;
    color: var(--menu-link);
    font-size: 0.8125rem;
    text-decoration: none;
}

html #changelist-filter li a:hover,
html #changelist-filter li a:focus {
    background: var(--menu-hover);
    color: var(--menu-link);
    text-shadow: none;
}

/* Gekozen filter */
html #changelist-filter li.selected {
    margin-left: 0;
    padding-left: 0;
    border-left: none;
    background: var(--menu-actief);
    box-shadow: inset 3px 0 0 var(--menu-actief-streep);
}
html #changelist-filter li.selected a {
    color: var(--menu-link);
    font-weight: 600;
}

/* 'Alle filters wissen' en '+ Toon meer': gewone menulink */
html #changelist-filter #changelist-filter-extra-actions {
    margin: 0 0 10px;
    padding: 0 0 10px;
    font-size: 0.8125rem;
    font-weight: 400;
}
html #changelist-filter #changelist-filter-extra-actions a,
html #changelist-filter .filter-meer a {
    padding: 4px 12px;
    color: var(--menu-link);
    font-weight: 400;
}

/* 'Aantallen verbergen/tonen' en 'Alle filters wissen': icoon en tekst op één lijn,
   de tekst van beide regels recht onder elkaar */
html #changelist-filter #changelist-filter-extra-actions h3 {
    margin: 0;
    padding: 0;
}
html #changelist-filter #changelist-filter-extra-actions a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
}
html #changelist-filter #changelist-filter-extra-actions a.viewlink,
html #changelist-filter #changelist-filter-extra-actions a.hidelink {
    padding-left: 34px;
    background-position: 12px center;
    background-size: 16px 16px;
}
html #changelist-filter #changelist-filter-extra-actions a:not(.viewlink):not(.hidelink) {
    padding-left: 16px;
}

/* ── Knoppen rechtsboven (Toevoegen, Geschiedenis, Importeren, …) ──────── */
html .object-tools a,
html .object-tools a:link,
html .object-tools a:visited {
    border-radius: var(--hoek);
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: normal;
    text-transform: none;
}
html .object-tools a.addlink,
html .object-tools a.viewsitelink { padding-right: 28px; }
html .object-tools a:hover { text-shadow: none; }

/* ── Menulinks: geen 'nep-vette' tekst bij hover ───────────────────────── */
html .module a:hover,
html #changelist-filter a:hover {
    text-shadow: none;
}

/* ── Info-menu in de bovenbalk (uitklapmenu) ───────────────────────────── */
/* Uitgelijnd zoals Django's themaknop ernaast: vaste maat, midden op de tekstregel */
#user-tools .info-container {
    display: inline-block;
    position: relative;
    vertical-align: middle;
    margin: -1px 12px 0 0;
    line-height: 0;
}
#user-tools .info-container summary {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
}
#user-tools .info-container .info-icon-svg {
    display: block;
    width: 19px;
    height: 19px;
}

.info-tooltip {
    visibility: hidden;
    position: absolute;
    top: 150%;
    right: 0;
    z-index: 1001;
    width: max-content;
    min-width: 220px;
    max-width: 300px;
    padding: 12px 14px;
    border: 1px solid var(--menu-rand);
    border-radius: var(--hoek);
    background: var(--menu-vlak);
    box-shadow: 0 4px 18px var(--menu-schaduw);
    color: var(--body-fg);
    font-size: 0.8125rem;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: normal;
    text-align: left;
    text-transform: none;
    white-space: normal;
}

.info-tooltip p { margin: 6px 0 2px; padding: 0; }
.info-tooltip strong { display: block; margin-bottom: 4px; }

#user-tools .info-tooltip a {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border-bottom: none;
    color: var(--menu-link);
    text-decoration: none;
}
#user-tools .info-tooltip a:hover { text-decoration: underline; text-shadow: none; }
/* Links naar de handleidingen: onder elkaar */
#user-tools .info-tooltip a.tooltip-button { display: flex; margin-top: 4px; }

.info-container:hover .info-tooltip,
.info-container[open] .info-tooltip {
    visibility: visible;
}
