/* Ideeënbord en polls in het beheer (.id-...) en de openbare pagina /updates (.upd-...).
   Dit bestand gebruikt alleen de tokens uit basis.css en bouwt voort op de klassen uit app.css en site.css. */

/* ---------- Gedeeld ---------- */
.label-pil.blauw { background: var(--accent-soft); color: var(--accent-dark); }
.label-pil.vol { background: var(--accent); color: var(--accent-ink); }
.label-pil.stil { background: transparent; box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--muted); }
.groep-kop.id-kop { margin-top: 28px; }
/* Met de extra regels in het menu past de zijbalk niet altijd op het scherm. De naam van de zaak mag dan niet
   in elkaar gedrukt worden: het menu schuift in zijn geheel. */
.zij .zaaknaam { flex: none; }

/* ---------- De belofte bovenaan ---------- */
.id-belofte { display: flex; align-items: center; gap: 16px; padding: 18px 24px; }
.id-belofte-teken { flex: none; width: 48px; height: 48px; border-radius: 22.5%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.id-belofte-tekst { flex: 1; min-width: 0; }
.id-belofte-tekst strong { display: block; font-family: var(--display); font-size: 18px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.id-belofte-tekst span { display: block; margin-top: 2px; color: var(--muted); text-wrap: pretty; }
.id-belofte .knop { flex: none; }

/* ---------- Polls ---------- */
.id-poll { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
.id-poll + .id-poll { margin-top: 12px; }
.id-poll h2, .id-poll h3 { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; overflow-wrap: anywhere; }
.id-poll-kop { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: -4px; }
.id-poll-datum { font-size: 13px; color: var(--muted); }
.id-poll .id-poll-uitleg { margin-top: -8px; color: var(--muted); }
.id-keuzes { display: grid; gap: 8px; }
.id-keuze {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 54px;
  padding: 10px 16px;
  border: 0;
  border-radius: 14px;
  background: var(--fill);
  text-align: left;
  font-size: 16px;
  font-weight: 500;
  color: var(--ink);
  transition: background 0.15s, box-shadow 0.15s, transform 0.12s var(--zacht), opacity 0.2s;
}
.id-keuze:active { transform: scale(0.99); }
.id-keuze[disabled] { opacity: 0.5; cursor: default; transform: none; }
.id-keuze-rondje { flex: none; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); box-shadow: inset 0 0 0 1.5px var(--line-strong); color: var(--accent-ink); }
.id-keuze-tekst { min-width: 0; overflow-wrap: anywhere; }
.id-keuze.gekozen { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent-line); }
.id-keuze.gekozen .id-keuze-rondje { background: var(--accent); box-shadow: none; }
@media (hover: hover) {
  .id-keuze:hover:not([disabled]) { background: var(--fill-2); }
  .id-keuze.gekozen:hover:not([disabled]) { background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); }
}

.id-uitslag { display: grid; gap: 8px; }
.id-balk { position: relative; border-radius: 14px; background: var(--fill); overflow: hidden; }
.id-balk-vul { position: absolute; top: 0; bottom: 0; left: 0; border-radius: 0 10px 10px 0; background: color-mix(in srgb, var(--ink) 7%, transparent); transform-origin: left center; animation: id-groei 0.5s var(--zacht); }
@keyframes id-groei { from { transform: scaleX(0); } }
.id-balk-tekst { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 54px; padding: 8px 16px; }
.id-balk-naam { display: flex; align-items: center; gap: 8px; min-width: 0; font-size: 16px; font-weight: 500; }
.id-balk-naam svg { flex: none; color: var(--accent); }
.id-balk-label { display: flex; align-items: center; gap: 4px 8px; flex-wrap: wrap; min-width: 0; overflow-wrap: anywhere; }
.id-balk-getal { flex: none; text-align: right; font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; line-height: 1.2; }
.id-balk-aantal { display: block; font-size: 12px; font-weight: 400; color: var(--ink-2); }
.id-balk.kop .id-balk-vul { background: color-mix(in srgb, var(--ink) 14%, transparent); }
.id-balk.kop .id-balk-naam { font-weight: 600; }
.id-balk.mijn .id-balk-vul { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.id-balk.mijn .id-balk-naam { font-weight: 600; }
.id-poll-voet { display: flex; align-items: center; justify-content: space-between; gap: 4px 12px; flex-wrap: wrap; min-height: 36px; font-size: 14px; color: var(--muted); }
.id-poll-voet .tekstknop { padding: 6px 0; }

/* ---------- Filteren en sorteren ---------- */
.id-lijstkop { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px 16px; flex-wrap: wrap; margin: 28px 0 10px; }
.id-lijstkop .groep-kop { margin: 0 0 2px 18px; }
.id-filters { margin: 0 0 12px; }
.id-chips { display: flex; gap: 8px; flex-wrap: wrap; min-width: 0; }
.id-filters .chip { background: var(--surface); }
.id-chips .chip[aria-pressed='true'] { background: var(--ink); color: var(--surface); }
.id-chip-n { font-weight: 400; opacity: 0.7; font-variant-numeric: tabular-nums; }
.id-statuskeuze .chip[aria-pressed='false'] { background: var(--fill); }

/* ---------- Lijst met ideeën ---------- */
.id-lijst { overflow: hidden; }
.id-idee { align-items: flex-start; gap: 16px; padding: 18px 20px 14px 24px; flex-wrap: nowrap; }
.id-idee + .id-idee::before { left: 96px; }
.id-stem {
  flex: none;
  min-width: 56px;
  min-height: 62px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 0;
  padding: 6px 8px;
  border: 0;
  border-radius: 16px;
  background: var(--fill);
  box-shadow: inset 0 0 0 1px var(--line);
  color: var(--ink-2);
  transition: background 0.15s, color 0.15s, box-shadow 0.15s, transform 0.12s var(--zacht);
}
.id-stem-pijl { display: grid; }
.id-stem-pijl svg { transform: rotate(180deg); }
.id-stem-aantal { font-size: 17px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.id-stem:active:not([disabled]) { transform: scale(0.94); }
.id-stem.aan { background: var(--accent); box-shadow: none; color: var(--accent-ink); }
.id-stem[disabled] { cursor: default; }
.id-stem.dicht { background: transparent; color: var(--muted); }
.id-stem.dicht.aan { background: var(--accent-soft); box-shadow: none; color: var(--accent-dark); }
@media (hover: hover) {
  .id-stem:hover:not([disabled]):not(.aan) { background: var(--fill-2); color: var(--ink); }
  .id-stem.aan:hover:not([disabled]) { background: var(--accent-dark); }
}
.id-idee-lijf { flex: 1; min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.id-idee-kop { display: flex; align-items: flex-start; justify-content: space-between; gap: 6px 12px; flex-wrap: wrap; }
.id-idee-titel { flex: 1 1 16ch; min-width: 0; font-family: var(--ui); font-size: 17px; font-weight: 600; letter-spacing: -0.015em; line-height: 1.3; overflow-wrap: anywhere; }
.id-idee-kop .label-pil { flex: none; margin-top: 1px; }
.id-pillen { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.id-idee-tekst { max-width: 76ch; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.id-idee-tekst.ingekort, .id-reactie-tekst.ingekort { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; white-space: normal; }
.id-meer { justify-self: start; padding: 0; font-size: 14px; }
.id-plat { padding-left: 0; padding-right: 0; }
.id-termijn { display: flex; align-items: flex-start; gap: 6px; font-size: 14px; font-weight: 500; color: var(--ink); }
.id-termijn svg { flex: none; margin-top: 2px; color: var(--accent); }
.id-termijn.live { color: var(--ok); }
.id-termijn.live svg { color: var(--ok); }
.id-termijn.laat, .id-termijn.laat svg { color: var(--danger); }
.id-reactie { max-width: 76ch; margin-top: 4px; padding: 12px 14px; border-radius: 14px; background: var(--fill); }
.id-reactie-kop { display: block; margin-bottom: 2px; font-size: 12px; font-weight: 600; color: var(--muted); }
.id-reactie-tekst { color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.id-reactie .id-meer { display: block; margin-top: 2px; }
.id-idee-voet { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 36px; font-size: 13px; color: var(--muted); }
.id-idee-voet > span:first-child { min-width: 0; overflow-wrap: anywhere; }
.id-idee-voet .item-knoppen { flex: none; margin-right: -8px; }
.id-teller { justify-self: end; margin-top: -2px; font-variant-numeric: tabular-nums; }
.id-voorregels { white-space: pre-line; font-weight: 400; }

/* ---------- Platformbeheer ---------- */
.cijfers.id-tellers { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.id-tellers .cijfer .k { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.id-tellers .cijfer .v { margin-top: 6px; padding-top: 0; line-height: 1.2; }
.id-teller-sub { margin-top: 2px; font-size: 12px; line-height: 1.35; color: var(--muted); }
.cijfer.id-let-op { background: var(--warn-soft); }
.cijfer.id-let-op .v, .cijfer.id-let-op .id-teller-sub { color: var(--warn); }
.cijfer.id-gevaar { background: var(--danger-soft); }
.cijfer.id-gevaar .v, .cijfer.id-gevaar .id-teller-sub { color: var(--danger); }
.id-tabs { display: flex; width: fit-content; margin: 4px 0 16px; }
.id-schema { margin-top: 20px; }

.id-bewaak { overflow: hidden; box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--warn) 35%, transparent); }
.id-bewaak-rij { gap: 14px; padding: 14px 16px 14px 18px; }
.id-bewaak-teken { flex: none; width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--warn-soft); color: var(--warn); }
.id-bewaak-rij.laat .id-bewaak-teken { background: var(--danger-soft); color: var(--danger); }
.id-bewaak-rij .item-naam { overflow-wrap: anywhere; }
.id-bewaak-acties { flex: none; display: flex; gap: 8px; }

.id-b-stemmen { flex: none; min-width: 56px; min-height: 62px; padding: 0 4px; display: grid; justify-items: center; align-content: center; border-radius: 16px; background: var(--fill); }
.id-b-stemmen strong { font-size: 17px; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.id-b-stemmen span { font-size: 11px; color: var(--muted); }
.id-b-acties { flex: none; display: flex; align-items: center; gap: 8px; }
.id-b-acties .knop { min-height: 40px; }
.id-poll-voet .rij-acties { margin-left: auto; }
select.veld.id-status { width: 164px; min-height: 40px; padding-top: 7px; padding-bottom: 7px; font-size: 15px; }
.id-b-rij.krap { box-shadow: inset 3px 0 0 var(--warn); }
.id-b-rij.laat { box-shadow: inset 3px 0 0 var(--danger); }
.id-opties { display: grid; gap: 8px; }
.id-optie { display: flex; align-items: center; gap: 6px; }
.id-optie .veld { flex: 1; min-width: 0; }
.id-status-uitleg { min-height: 1.4em; }

/* ---------- Smal venster en iPad: de zijbalk staat er tot 1000 pixels nog naast ---------- */
@media (max-width: 1199px) {
  /* Statuskeuze en knop onder de tekst, zodat de titel de ruimte houdt. */
  .id-b-rij { flex-wrap: wrap; }
  .id-b-rij .id-idee-lijf { flex: 1 1 0; }
  .id-b-acties { flex: 1 0 100%; padding-left: 72px; }
  /* Tellers: drie boven, twee onder. */
  .cijfers.id-tellers { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .id-tellers .cijfer { grid-column: span 2; }
  .id-tellers .cijfer:nth-child(n + 4) { grid-column: span 3; }
}

/* ---------- Telefoon ---------- */
@media (max-width: 700px) {
  .groep-kop.id-kop { margin-top: 24px; }
  .id-belofte { flex-wrap: wrap; gap: 12px 14px; padding: 16px; }
  .id-belofte-teken { width: 44px; height: 44px; }
  .id-belofte-tekst { flex: 1 1 60%; }
  .id-belofte .knop { flex: 1 0 100%; }
  .id-lijstkop { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin-top: 24px; }
  .id-lijstkop .groep-kop { margin-left: 16px; }
  .id-lijstkop .segment { display: flex; }
  .id-lijstkop .segment button { flex: 1; }
  /* De statusfilters schuiven opzij, net als de medewerkers in de agenda. */
  .id-filters .id-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 -16px; padding: 2px 16px; scrollbar-width: none; }
  .id-filters .id-chips::-webkit-scrollbar { display: none; }
  .id-filters .chip { flex: none; }
  .id-idee { gap: 12px; padding: 16px 14px 10px 16px; flex-wrap: nowrap; }
  .id-idee + .id-idee::before { left: 16px; }
  .id-stem { min-width: 50px; min-height: 58px; padding: 6px; border-radius: 14px; }
  .id-b-stemmen { min-height: 58px; border-radius: 14px; }
  .id-idee-kop { flex-direction: column-reverse; flex-wrap: nowrap; gap: 6px; }
  .id-idee-titel { flex: none; }
  .id-pillen { justify-content: flex-start; }
  .id-balk-tekst { padding: 8px 14px; }
  .id-keuze { padding: 10px 14px; }
  .id-tabs { width: auto; }
  .id-tabs button { flex: 1; }
  .id-b-rij { flex-wrap: wrap; }
  .id-b-acties { padding-left: 0; padding-bottom: 6px; }
  .id-b-acties select.veld.id-status { flex: 1 1 0; width: auto; min-width: 0; }
  .id-poll-voet .rij-acties { flex: 1 0 100%; justify-content: space-between; margin-left: 0; }
  .id-bewaak-rij { flex-wrap: wrap; row-gap: 10px; }
  .id-bewaak-rij .item-hoofd { flex: 1 1 0; }
  .id-bewaak-acties { flex: 1 0 100%; }
  .id-bewaak-acties .knop { flex: 1; }
  .cijfers.id-tellers .cijfer, .id-tellers .cijfer:nth-child(n + 4) { min-width: 132px; grid-column: auto; }
  /* Op de telefoon schuiven de tellers opzij: een belofte in gevaar staat dan vooraan. */
  .id-tellers .id-gevaar, .id-tellers .id-let-op { order: -1; }
}
@media (pointer: coarse) {
  .id-b-acties .knop, select.veld.id-status { min-height: 44px; }
  .id-poll-voet .tekstknop { padding: 0; }
  /* Het raakvlak van Meer tonen blijft 44 pixels hoog, zonder dat de tekst los komt te staan. */
  .id-meer { margin: -8px 0 -10px; }
}

/* ---------- Openbare pagina /updates ---------- */
.upd-held { padding-bottom: 68px; }
.upd-held h1 { font-size: clamp(40px, 6.4vw, 72px); }
.upd-held h1 span { display: block; }
.upd-band { padding: 72px 0 40px; }
.upd-wrap { max-width: 808px; }
.upd-dag + .upd-dag { margin-top: 44px; }
.band .upd-datum { margin: 0 0 12px 24px; font-family: var(--ui); font-size: 14px; font-weight: 600; letter-spacing: 0.02em; line-height: 1.3; text-transform: uppercase; color: var(--muted); }
.upd-lijst { border-radius: 22px; background: var(--surface); box-shadow: var(--shadow); overflow: hidden; }
.upd-item { position: relative; display: flex; gap: 14px; padding: 22px 24px; }
.upd-item + .upd-item::before { content: ''; position: absolute; top: 0; left: 62px; right: 0; height: 1px; background: var(--line); }
.upd-vink { flex: none; width: 24px; height: 24px; margin-top: 2px; border-radius: 50%; display: grid; place-items: center; background: var(--groen); color: var(--surface); }
.upd-lijf { flex: 1; min-width: 0; }
.upd-item h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.022em; line-height: 1.2; overflow-wrap: anywhere; }
.upd-reactie { margin-top: 6px; color: var(--ink-2); line-height: 1.47; white-space: pre-line; overflow-wrap: anywhere; }
.upd-meta { display: flex; align-items: center; gap: 6px 10px; flex-wrap: wrap; margin-top: 12px; font-size: 14px; color: var(--muted); }
.upd-slot p { text-wrap: balance; }
.upd-leeg { padding: 12px 0; text-align: center; }
.band .upd-leeg h2 { font-size: clamp(26px, 3.4vw, 36px); }
.upd-leeg p { max-width: 30em; margin: 12px auto 0; color: var(--muted); }
@media (max-width: 720px) {
  .upd-held { padding-bottom: 48px; }
  .upd-band { padding: 48px 0 24px; }
  .upd-dag + .upd-dag { margin-top: 32px; }
  .band .upd-datum { margin-left: 18px; }
  .upd-item { gap: 12px; padding: 18px; }
  .upd-item + .upd-item::before { left: 54px; }
  .upd-item h3 { font-size: 19px; }
}

/* Goed doel */
.dn-boven { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-bottom: 16px; align-items: stretch; }
.dn-boven > .sectie { margin: 0; }
.dn-status h2 { font-size: 22px; letter-spacing: -0.02em; text-wrap: balance; }
.dn-status p { margin-top: 6px; color: var(--muted); }
.dn-hart { width: 48px; height: 48px; border-radius: 22.5%; background: var(--danger-soft); color: var(--danger); display: grid; place-items: center; margin-bottom: 14px; }
.dn-samen { display: flex; flex-direction: column; justify-content: center; }
.dn-samen .k { font-size: 14px; font-weight: 600; color: var(--ok); }
.dn-samen .v { font-family: var(--display); font-size: 40px; font-weight: 700; letter-spacing: -0.03em; line-height: 1.1; margin: 4px 0; font-variant-numeric: tabular-nums; }
.dn-groep { margin-top: 20px; }
.dn-groep h3 { font-size: 15px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.dn-doelen { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.dn-doel { position: relative; text-align: left; padding: 14px 40px 14px 14px; border-radius: 14px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink); font: inherit; display: flex; flex-direction: column; gap: 3px; cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.dn-doel strong { font-weight: 600; font-size: 15px; }
.dn-doel span:not(.dn-vink) { font-size: 13px; color: var(--muted); line-height: 1.35; }
.dn-vink { position: absolute; top: 14px; right: 14px; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--line-strong); display: grid; place-items: center; color: transparent; }
.dn-doel[aria-pressed='true'] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.dn-doel[aria-pressed='true'] .dn-vink { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
@media (hover: hover) { .dn-doel:not([aria-pressed='true']):hover { border-color: var(--muted); } }
.dn-actie { margin-top: 20px; }
.dn-actie .knop { max-width: 100%; white-space: normal; text-align: center; }
.cijfers.dn-tellers .id-teller-sub { font-size: 13px; color: var(--muted); margin-top: 2px; }
.dn-maanden { display: grid; gap: 6px; margin-top: 14px; }
.dn-maand { display: grid; grid-template-columns: 64px 1fr 84px; gap: 12px; align-items: center; font-size: 14px; }
.dn-maand-k { color: var(--muted); }
.dn-maand-v { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.dn-balk { height: 10px; border-radius: 5px; background: var(--fill, rgba(118, 118, 128, 0.12)); overflow: hidden; }
.dn-balk span { display: block; height: 100%; border-radius: 5px; background: var(--accent); }
td.getal { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 760px) {
  .dn-boven { grid-template-columns: minmax(0, 1fr); }
  .cijfers.dn-tellers { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dn-doelen { grid-template-columns: minmax(0, 1fr); }
}
