/* Bouwkosten – aanvullend op style.css (zelfde opzet als vulgraad) */

.vg-pagina .blad-body {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.bk-hvh-sectie .sectie-kop-rij {
    align-items: flex-start;
}

.bk-hvh-hint {
    margin: 0 0 0.75rem;
    font-style: italic;
}

.bk-hvh-grid {
    display: grid;
    gap: 0.35rem 1rem;
    grid-template-columns: minmax(12rem, 1fr) 7rem minmax(8rem, 1fr);
    align-items: center;
    max-width: 820px;
}

.bk-hvh-grid input.veld-geel {
    width: 100%;
    box-sizing: border-box;
}

.bk-hvh-grid input.hvh-opp {
    text-align: right;
    max-width: 7rem;
}

.bk-hvh-kop {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #5a6478;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #d8dee8;
}

.bk-hvh-totaal {
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 2px solid #1d4e9e;
    font-weight: 700;
}

.bk-vorm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.65rem 1rem;
    max-width: 960px;
}

.bk-analyse-tabel,
.bk-posten-tabel {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.82rem;
}

.bk-analyse-tabel th,
.bk-posten-tabel th {
    text-align: left;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #5a6478;
    padding: 0.45rem 0.5rem;
    border-bottom: 2px solid #c5ced9;
    background: #f4f7fb;
}

.bk-analyse-tabel td,
.bk-posten-tabel td {
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid #e8edf4;
    vertical-align: middle;
}

.bk-analyse-tabel .getal,
.bk-posten-tabel .getal {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.bk-analyse-tabel tr.bk-analyse-discipline td {
    font-weight: 700;
    background: #e8eef6;
    border-top: 1px solid #c5ced9;
}

.bk-analyse-tabel tr.bk-analyse-discipline td:first-child {
    color: #1d4e9e;
}

.bk-analyse-tabel tr.bk-analyse-sub td:first-child {
    padding-left: 1.25rem;
    color: #5a6478;
}

.bk-analyse-tabel tr.bk-analyse-totaal td {
    font-weight: 700;
    border-top: 2px solid #1d4e9e;
    background: #eef3fa;
}

.bk-begroting-kop .sectie-oms {
    margin: 0.2rem 0 0;
    font-size: 0.78rem;
    line-height: 1.35;
}

.bk-discipline-balk {
    flex-shrink: 0;
    padding: 0 0.85rem 0.65rem;
    border-bottom: 1px solid var(--vg-rand-licht, #e4e9f0);
    margin-bottom: 0.15rem;
}

.bk-discipline-groep {
    width: 100%;
    max-width: 100%;
    align-items: stretch;
}

.segmentatie-keuze--discipline {
    display: flex;
    align-self: stretch;
    width: 100%;
    max-width: 100%;
}

.segmentatie-keuze--discipline .segmentatie-optie {
    flex: 1 1 0;
    min-width: 0;
}

.bk-discipline-knop {
    flex-direction: column;
    gap: 0.12rem;
    min-width: 0;
    width: 100%;
    height: auto;
    min-height: 2.35rem;
    padding: 0.35rem 0.4rem;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.15;
}

.bk-discipline-naam {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.bk-discipline-bedrag {
    font-size: 0.68rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    opacity: 0.9;
}

.segmentatie-optie input:checked + .bk-discipline-knop .bk-discipline-bedrag {
    font-weight: 700;
    opacity: 1;
}

.bk-posten-tabel tr.bk-rij-sectie td {
    font-weight: 700;
    background: #e8eef6;
    color: #1a2233;
}

.bk-posten-tabel tr.bk-rij-groep td,
.bk-posten-tabel tr.bk-rij-hoofdstuk td {
    font-weight: 600;
    background: #f4f7fb;
}

.bk-posten-tabel tr.bk-rij-hoofdstuk td {
    border-top: 1px solid #c5ced9;
}

.bk-posten-tabel tr.bk-rij-hoofdstuk .bk-nlsfb-hoofdstuk {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.75rem;
    padding: 0.1rem 0.35rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #1d4e9e;
    background: #e8eef6;
    border: 1px solid #b8c8de;
    border-radius: 3px;
}

.bk-posten-tabel tr.bk-rij-hoofdstuk td:nth-child(2) {
    color: #1d4e9e;
    font-weight: 700;
}

.bk-posten-tabel tr.bk-rij-paragraaf td {
    font-weight: 600;
    background: #f8fafc;
}

.bk-posten-tabel tr.bk-rij-paragraaf td:nth-child(2) {
    padding-left: 1.25rem;
    color: #2a5080;
}

.bk-posten-tabel tr.bk-rij-paragraaf .bk-nlsfb-paragraaf {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.5rem;
    padding: 0.08rem 0.3rem;
    font-weight: 700;
    font-size: 0.76rem;
    font-variant-numeric: tabular-nums;
    color: #2a5080;
    background: #eef3fa;
    border: 1px solid #c5d4e8;
    border-radius: 3px;
}

.bk-posten-tabel tr.bk-rij-onder-paragraaf td:first-child,
.bk-posten-tabel tr.bk-rij-onder-paragraaf td:nth-child(2) {
    padding-left: 2rem;
}

.bk-posten-tabel tr.bk-rij-regel td.bk-code-cel {
    padding-left: 1.1rem;
    font-variant-numeric: tabular-nums;
    color: #5a6478;
    font-size: 0.78rem;
}

.bk-hoofdstuk-kop {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.bk-vrij-toevoegen {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    height: 1.5rem;
    padding: 0;
    border: 1px solid #b8c8de;
    border-radius: 4px;
    background: #fff;
    color: #1d4e9e;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    flex-shrink: 0;
}

.bk-vrij-toevoegen:hover {
    background: #e8eef6;
    border-color: #1d4e9e;
}

.bk-posten-tabel tr.bk-rij-vrij td {
    background: #fffef5;
}

.bk-posten-tabel tr.bk-rij-vrij input.veld-geel,
.bk-posten-tabel tr.bk-rij-vrij input.veld-grijs {
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}

.bk-posten-tabel tr.bk-rij-vrij .bk-vrij-oms {
    min-width: 8rem;
}

.bk-rij-acties {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.3rem;
    width: 100%;
}

.bk-rij-bedrag {
    font-variant-numeric: tabular-nums;
}

.bk-vrij-totaal-cel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.25rem;
}

.bk-vrij-totaal-cel .bk-rij-acties {
    width: auto;
}

.bk-vrij-verwijder {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.25rem;
    height: 1.25rem;
    padding: 0;
    border: none;
    border-radius: 3px;
    background: transparent;
    color: #8a94a6;
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
}

.bk-vrij-verwijder:hover {
    color: #c0392b;
    background: #fdecea;
}

.bk-posten-tabel tr.bk-rij-totaal td {
    font-weight: 700;
    background: #fff8e6;
}

.bk-posten-tabel tr.bk-rij-regel td:first-child {
    color: #5a6478;
}

.bk-posten-wrap {
    overflow-x: auto;
}

.bk-posten-tabel input.veld-geel,
.bk-posten-tabel input.veld-grijs {
    width: 100%;
    min-width: 4.5rem;
    max-width: 7rem;
    padding: 0.2rem 0.35rem;
    font-size: 0.82rem;
}

.bk-posten-tabel input.bk-aanvulling-veld {
    min-width: 6rem;
    max-width: 12rem;
}

.bk-sectie-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border: none;
    background: none;
    font: inherit;
    font-weight: 700;
    color: inherit;
    cursor: pointer;
    padding: 0;
}

.bk-sectie-toggle::before {
    content: '▸';
    display: inline-block;
    transition: transform 0.15s;
    color: #1d4e9e;
}

.bk-sectie-toggle[aria-expanded='true']::before {
    transform: rotate(90deg);
}

.bk-opslag-lijst {
    max-width: 100%;
}

.bk-opslag-tabel {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.78rem;
    line-height: 1.25;
}

.bk-opslag-tabel th {
    text-align: left;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #5a6478;
    padding: 0.3rem 0.45rem;
    border-bottom: 2px solid #c5ced9;
    background: #f4f7fb;
}

.bk-opslag-tabel th.getal {
    text-align: right;
}

.bk-opslag-tabel th:nth-child(2) {
    width: 5.5rem;
    text-align: center;
}

.bk-opslag-tabel th:nth-child(3) {
    width: 6.5rem;
}

.bk-opslag-tabel td {
    padding: 0.2rem 0.45rem;
    border-bottom: 1px solid #e8edf4;
    vertical-align: middle;
}

.bk-opslag-tabel .getal {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.bk-opslag-oms {
    color: #1a2233;
}

.bk-opslag-pct {
    text-align: center;
}

.bk-opslag-pct-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.15rem;
}

.bk-opslag-tabel input.veld-grijs {
    width: 3.25rem;
    min-width: 0;
    max-width: none;
    padding: 0.15rem 0.3rem;
    font-size: 0.78rem;
    text-align: right;
}

.bk-opslag-pct-teken {
    font-size: 0.72rem;
    color: #5a6478;
}

.catalogus-sectie:has(.bk-opslag-lijst) .sectie-titel {
    margin-bottom: 0.45rem;
}

.vg-pagina .catalogus-sectie .catalogus-kop-rij {
    padding: 0.65rem 0.85rem 0.5rem;
}

.vg-pagina .catalogus-sectie .catalogus-kop-rij .sectie-titel {
    margin: 0;
}

.vg-pagina .catalogus-sectie .bk-posten-wrap,
.vg-pagina .catalogus-sectie .bk-opslag-lijst {
    padding: 0 0.85rem 0.85rem;
}

.vg-pagina .bk-discipline-sectie .catalogus-kop-rij {
    padding: 0.65rem 0.85rem 0.35rem;
    margin-bottom: 0;
}

.vg-pagina .bk-discipline-sectie .bk-posten-wrap {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    padding-top: 0.25rem;
}

@media (min-width: 900px) and (min-height: 600px) {
    .vg-pagina .bk-discipline-sectie .bk-discipline-balk {
        padding: 0 0.85rem 0.5rem;
    }

    .vg-pagina .bk-discipline-sectie .segmentatie-groep {
        align-items: stretch;
        text-align: left;
    }

    .vg-pagina .bk-discipline-sectie .segmentatie-keuze--discipline {
        align-self: stretch;
    }
}

@media print {
    .bk-sectie-toggle::before { display: none; }
    .bk-posten-tabel tr[data-ingeklapt] { display: table-row !important; }
}
