/* Telefonie (8 sep 2026, goedgekeurd ontwerp: telefonie-ontwerp/Main,
   Telefonist, Gesprekken). Het Telefonie-EIGEN deel van de stylesheet voor
   de vier pagina's onder Pages/Telefonie2/ (Dashboard, Telefonist2 +
   panelen, Gesprekken, Koppelingen); prefix tf-, gescoped onder .app-root.

   Sinds de extractie van 8 sep 2026 staan de gedeelde primitieven
   (paginakop, statusregel, secties, inhoudsopgave, velden, knoppen,
   segment, lijst met rijen en detail, week, opslaanbalk, lege staat) in
   css/ontwerp.css onder prefix ds-, met de tf-klasse als alias in dezelfde
   selectorlijst -- de razor onder Pages/Telefonie2/ is daardoor ongewijzigd.
   Hier blijft alleen wat van deze feature is: de Dashboard-blokken en
   -strook, bundelmeter, staafgrafiek, sms-lijst, chips, stemkiezer,
   spreeksnelheid, radiolijst, sms-regels, transcript en uitkomstkolom, en
   de kolombreedtes van de gesprekkenlijst. Ontwerptaal: zie ontwerp.css. */

/* De aan-uitschakelaar rechts in de kopregel (Telefonist). */
.app-root .tf-schakel {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .875rem;
    color: var(--app-text-primary);
    cursor: pointer;
}

/* ── Blokken (Dashboard) ──────────────────────────────────────────────── */
.app-root .tf-blok {
    display: flex;
    flex-direction: column;
    gap: .875rem;
    min-width: 0;
}

.app-root .tf-blok__kop {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    flex-wrap: wrap;
}

.app-root .tf-blok__titel {
    margin: 0;
    font-size: .9375rem;
    font-weight: 600;
    color: var(--app-text-primary);
}

.app-root .tf-blok__sub {
    font-size: .8125rem;
    color: var(--app-text-secondary);
}

.app-root .tf-twee {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 3.5rem;
}

/* De "Vandaag"-strook: grote cijfers gescheiden door lijnen, geen tegels. */
.app-root .tf-strook {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--app-border);
    border-bottom: 1px solid var(--app-border);
}

.app-root .tf-stat {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    padding: 1.25rem 1.5rem;
    border-right: 1px solid var(--app-border);
    min-width: 0;
}

.app-root .tf-stat:first-child {
    padding-left: 0;
}

.app-root .tf-stat:last-child {
    padding-right: 0;
    border-right: 0;
}

.app-root .tf-stat__waarde {
    font-size: 2.5rem;
    line-height: 1;
    color: var(--app-text-primary);
}

/* Het ene cijfer dat aandacht vraagt (open terugbelverzoek). */
.app-root .tf-stat--aandacht .tf-stat__waarde {
    color: var(--app-primary);
}

.app-root .tf-stat__label {
    font-size: .8125rem;
    color: var(--app-text-secondary);
}

.app-root .tf-stat__sub {
    font-size: .75rem;
    color: var(--app-danger);
}

/* Bundelmeter: groot cijfer + balk + prognosezin. */
.app-root .tf-meter {
    display: flex;
    flex-direction: column;
    gap: .625rem;
}

.app-root .tf-meter__regel {
    display: flex;
    align-items: baseline;
    gap: .5rem;
    flex-wrap: wrap;
}

.app-root .tf-meter__cijfer {
    font-size: 2rem;
    line-height: 1;
    color: var(--app-text-primary);
}

.app-root .tf-meter__tekst {
    margin: 0;
    font-size: .875rem;
    color: var(--app-text-secondary);
}

.app-root .tf-meter__balk {
    height: .5rem;
    border-radius: 999px;
    background-color: var(--app-border);
    overflow: hidden;
}

.app-root .tf-meter__vulling {
    height: 100%;
    border-radius: 999px;
}

.app-root .tf-meter__prognose {
    margin: 0;
    font-size: .8125rem;
    color: var(--app-text-secondary);
}

.app-root .tf-meter__naheffing {
    margin: 0;
    font-size: .8125rem;
    color: var(--app-warning-text);
}

.app-root .tf-substats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding-top: .5rem;
    border-top: 1px solid var(--app-border);
}

.app-root .tf-substat {
    display: flex;
    flex-direction: column;
    gap: .125rem;
    padding-top: .75rem;
    min-width: 0;
}

.app-root .tf-substat__waarde {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--app-text-primary);
}

.app-root .tf-substat__label {
    font-size: .8125rem;
    color: var(--app-text-secondary);
}

/* Staafgrafiek van zeven dagen: pure CSS, verticale staven, dag + aantal
   eronder. De hoogte van elke staaf komt als inline style (dynamisch). */
.app-root .tf-grafiek {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .75rem;
    align-items: end;
    height: 140px;
    padding-bottom: .5rem;
    border-bottom: 1px solid var(--app-border);
}

.app-root .tf-grafiek__kolom {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    height: 100%;
    min-width: 0;
}

.app-root .tf-grafiek__staaf {
    border-radius: 4px 4px 0 0;
    background-color: var(--app-primary);
}

/* Vandaag loopt nog: de laatste staaf is niet af, dus iets lichter. */
.app-root .tf-grafiek__staaf--lopend {
    opacity: .6;
}

.app-root .tf-grafiek__labels {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: .75rem;
    font-size: .75rem;
    color: var(--app-text-secondary);
    text-align: center;
}

.app-root .tf-grafiek__label b {
    display: block;
    font-weight: 400;
    color: var(--app-text-primary);
}

/* Lijst per soort (sms): rijen met 1px-lijnen, geen kaartjes. */
.app-root .tf-lijst {
    display: flex;
    flex-direction: column;
}

.app-root .tf-lijst__rij {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 5rem;
    gap: 1rem;
    padding: .625rem 0;
    border-top: 1px solid var(--app-border);
    font-size: .875rem;
    color: var(--app-text-primary);
}

.app-root .tf-lijst__rij:last-child {
    border-bottom: 1px solid var(--app-border);
}

.app-root .tf-lijst__rij--fout {
    color: var(--app-danger);
}

.app-root .tf-lijst__getal {
    text-align: right;
}

.app-root .tf-schakel .app-toggle:focus-visible {
    outline: 2px solid var(--app-primary);
    outline-offset: 2px;
}

.app-root .tf-radio input {
    accent-color: var(--app-primary);
}

.app-root .tf-radio input:focus-visible {
    outline: 2px solid var(--app-primary);
    outline-offset: 2px;
}

/* ── Chips (talen) ────────────────────────────────────────────────────── */
.app-root .tf-chips {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

.app-root .tf-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    height: 2.25rem;
    padding: 0 .875rem;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    background-color: transparent;
    color: var(--app-text-secondary);
    font-size: .875rem;
    cursor: pointer;
    transition: border-color .15s, background-color .15s, color .15s;
}

.app-root .tf-chip input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.app-root .tf-chip.is-actief {
    border-color: var(--app-primary);
    background-color: var(--app-primary-soft);
    color: var(--app-text-primary);
}

.app-root .tf-chip.is-vast {
    cursor: default;
}

.app-root .tf-chip:has(input:focus-visible) {
    outline: 2px solid var(--app-primary);
    outline-offset: 2px;
}

.app-root .tf-chip__sub {
    font-size: .75rem;
    color: var(--app-text-secondary);
}

/* ── Stem ─────────────────────────────────────────────────────────────── */
.app-root .tf-stemmen {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.app-root .tf-stem {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .875rem 1rem;
    border: 1px solid var(--app-border);
    border-radius: .75rem;
    background-color: var(--app-surface);
    min-width: 0;
}

.app-root .tf-stem__tekst {
    display: flex;
    flex-direction: column;
    gap: .125rem;
    min-width: 0;
}

.app-root .tf-stem__naam {
    font-size: .875rem;
    color: var(--app-text-primary);
}

.app-root .tf-stem__omschrijving {
    font-size: .8125rem;
    color: var(--app-text-secondary);
}

.app-root .tf-stem__acties {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex-wrap: wrap;
}

.app-root .tf-stem audio {
    height: 2rem;
    max-width: 12rem;
}

/* De uitgeklapte stemkiezer, onder de rij, over de hele breedte. */
.app-root .tf-stem__kiezer {
    flex-basis: 100%;
    display: flex;
    flex-direction: column;
    gap: .625rem;
    margin-top: .25rem;
    padding-top: .75rem;
    border-top: 1px solid var(--app-border);
}

.app-root .tf-filterchips {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .5rem;
}

.app-root .tf-filterchip {
    display: inline-flex;
    align-items: center;
    height: 1.75rem;
    padding: 0 .65rem;
    border: 1px solid var(--app-border);
    border-radius: 999px;
    background-color: var(--app-surface);
    color: var(--app-text-secondary);
    font-size: .75rem;
    font-family: inherit;
    line-height: 1;
    cursor: pointer;
}

.app-root .tf-filterchip[aria-pressed="true"] {
    border-color: var(--app-primary);
    background-color: var(--app-primary-soft);
    color: var(--app-primary);
}

.app-root .tf-filterchip:focus-visible {
    outline: 2px solid var(--app-primary);
    outline-offset: 2px;
}

.app-root .tf-stemlijst {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    max-height: 22rem;
    overflow-y: auto;
}

.app-root .tf-stemoptie {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
}

.app-root .tf-stemoptie--huidig {
    padding: .5rem .75rem;
    border: 1px solid var(--app-border);
    border-radius: .5rem;
}

.app-root .tf-radio {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    font-size: .875rem;
    color: var(--app-text-primary);
    cursor: pointer;
}

.app-root .tf-radio__meta {
    font-size: .75rem;
    color: var(--app-text-secondary);
}

/* Spreeksnelheid: schuif met de waarde erboven. */
.app-root .tf-schuif {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.app-root .tf-schuif__kop {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    font-size: .8125rem;
    color: var(--app-text-secondary);
}

.app-root .tf-schuif__waarde {
    color: var(--app-text-primary);
}

.app-root .tf-schuif__input {
    width: 100%;
    accent-color: var(--app-primary);
    cursor: pointer;
}

.app-root .tf-schuif__input:focus-visible {
    outline: 2px solid var(--app-primary);
    outline-offset: 4px;
}

/* ── Radiolijst (doorverbinden) ───────────────────────────────────────── */
.app-root .tf-radiolijst {
    display: flex;
    flex-direction: column;
}

.app-root .tf-radiolijst__optie {
    position: relative;
    display: flex;
    align-items: center;
    gap: .75rem;
    flex-wrap: wrap;
    padding: .75rem .875rem;
    border: 1px solid var(--app-border);
    margin-top: -1px;
    font-size: .875rem;
    color: var(--app-text-secondary);
    cursor: pointer;
}

.app-root .tf-radiolijst__optie:first-child {
    margin-top: 0;
    border-radius: .625rem .625rem 0 0;
}

.app-root .tf-radiolijst__optie:last-child {
    border-radius: 0 0 .625rem .625rem;
}

.app-root .tf-radiolijst__optie.is-actief {
    z-index: 1;
    border-color: var(--app-primary);
    background-color: var(--app-primary-soft);
    color: var(--app-text-primary);
}

.app-root .tf-radiolijst__optie input {
    accent-color: var(--app-primary);
}

.app-root .tf-radiolijst__optie input:focus-visible {
    outline: 2px solid var(--app-primary);
    outline-offset: 2px;
}

.app-root .tf-radiolijst__sub {
    font-size: .8125rem;
    color: var(--app-text-secondary);
}

/* ── Sms op verzoek: regels ───────────────────────────────────────────── */
.app-root .tf-regels {
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.app-root .tf-regel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) auto;
    gap: .5rem;
    align-items: start;
}

/* ── Gesprekken ───────────────────────────────────────────────────────── */

/* Kolommen van de gesprekkenlijst; de grid zelf staat in ontwerp.css
   (ds-tabel/ds-rij) en leest deze twee variabelen. */
.app-root .tf-tabel {
    --ds-kolommen: 110px minmax(0, 1fr) 150px 72px 150px 24px;
    --ds-detail-inspring: 110px;
}

.app-root .tf-rij__beller,
.app-root .tf-rij__duur {
    color: var(--app-text-secondary);
    white-space: nowrap;
}

.app-root .tf-transcript {
    display: flex;
    flex-direction: column;
    gap: .625rem;
    padding-top: .25rem;
}

.app-root .tf-beurt {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
}

.app-root .tf-beurt--beller {
    justify-content: flex-end;
}

.app-root .tf-beurt__tijd {
    width: 2.5rem;
    flex-shrink: 0;
    padding-top: .375rem;
    font-size: .75rem;
    color: var(--app-text-secondary);
}

.app-root .tf-beurt__bel {
    padding: .5rem .75rem;
    max-width: 52ch;
    font-size: .875rem;
    line-height: 1.45;
    color: var(--app-text-primary);
    white-space: pre-wrap;
    word-break: break-word;
}

.app-root .tf-beurt--telefonist .tf-beurt__bel {
    background-color: var(--app-surface);
    border: 1px solid var(--app-border);
    border-radius: .625rem .625rem .625rem .125rem;
}

.app-root .tf-beurt--beller .tf-beurt__bel {
    background-color: var(--app-secondary-soft);
    border-radius: .625rem .625rem .125rem .625rem;
}

.app-root .tf-transcript__meer {
    align-self: flex-start;
    margin-left: 3.25rem;
}

.app-root .tf-uitkomst {
    display: flex;
    flex-direction: column;
    gap: .75rem;
    align-self: start;
    padding-left: 1.25rem;
    border-left: 1px solid var(--app-border);
    min-width: 0;
}

.app-root .tf-uitkomst__titel {
    margin: 0;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--app-text-primary);
}

.app-root .tf-uitkomst__rijen {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    font-size: .875rem;
}

.app-root .tf-uitkomst__rij {
    display: flex;
    justify-content: space-between;
    gap: .75rem;
}

.app-root .tf-uitkomst__k {
    color: var(--app-text-secondary);
}

.app-root .tf-uitkomst__w {
    color: var(--app-text-primary);
    text-align: right;
    word-break: break-word;
}

.app-root .tf-uitkomst__w--open {
    color: var(--app-primary);
}

.app-root .tf-uitkomst__w--ok {
    color: var(--app-success);
}

.app-root .tf-uitkomst__notitie {
    margin: 0;
    font-size: .875rem;
    font-style: italic;
    color: var(--app-text-secondary);
}

@media (max-width: 900px) {
    .app-root .tf-twee,
    .app-root .tf-stemmen {
        grid-template-columns: minmax(0, 1fr);
    }

    .app-root .tf-twee {
        gap: 2.5rem;
    }

    .app-root .tf-strook {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .app-root .tf-stat:nth-child(odd) {
        padding-left: 0;
    }

    .app-root .tf-stat:nth-child(even) {
        padding-right: 0;
        border-right: 0;
    }

    .app-root .tf-stat:nth-child(-n+2) {
        border-bottom: 1px solid var(--app-border);
    }

    .app-root .tf-uitkomst {
        padding-left: 0;
        padding-top: 1rem;
        border-left: 0;
        border-top: 1px solid var(--app-border);
    }
}

@media (max-width: 720px) {
    .app-root .tf-substats {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
    }

    .app-root .tf-substat {
        padding: .625rem 0;
        border-top: 1px solid var(--app-border);
    }

    .app-root .tf-substat:first-child {
        border-top: 0;
    }
}

@media (max-width: 600px) {
    .app-root .tf-regel {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .app-root .tf-regel > :nth-child(2) {
        grid-column: 1 / -1;
    }

    .app-root .tf-lijst__rij {
        grid-template-columns: minmax(0, 1fr) 3rem;
        gap: .5rem;
    }

    .app-root .tf-grafiek,
    .app-root .tf-grafiek__labels {
        gap: .375rem;
    }

    .app-root .tf-stat__waarde {
        font-size: 2rem;
    }

    .app-root .tf-transcript__meer {
        margin-left: 0;
    }

    .app-root .tf-beurt__bel {
        max-width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    .app-root .tf-chip {
        transition: none;
    }
}

/* Sms-naheffing (8 sep 2026): de kostenregel onder de sms-lijst weegt zwaarder dan de soorten erboven. */
.app-root .tf-lijst__rij--totaal {
    font-weight: 600; border-top: 1px solid var(--app-border);
}

.app-root .tf-lijst__rij--totaal .tf-lijst__getal {
    color: var(--app-text-primary);
}
