/*
  Fyxdo — Diensten: lijst, toevoegen en bewerken, prijs en btw, factuurvoorbeeld, archiveren.
  Laadvolgorde: brand/fonts/fonts.css → brand/tokens.css → brand/icons/icons.css
               → screens/auth/auth.css → screens/app/app.css → screens/klanten/klanten.css
               → screens/afspraken/afspraak.css → screens/diensten/diensten.css
  Bouwt voort op klanten.css (fx-row-main, fx-tag, fx-form-page, fx-fieldset, fx-dup, fx-archive,
  fx-detail-head) en afspraak.css (fx-select, fx-money, fx-split--even).
  Alleen variabelen uit tokens.css. Geen gradiënten, geen schaduwen, geen inline stijl.

  Breed scherm: in de app @media (min-width: 768px). Hier een container query,
  zodat mobiel en breed in de referentie naast elkaar staan.
*/

/* ---------- Keuzekaart: een radioknop met uitleg (Prijs, Btw) ---------- */
.fx-radio-cards { display: flex; flex-direction: column; gap: var(--space-2); }

.fx-radio-card {
  position: relative;
  min-height: 56px;
  box-sizing: border-box;
  padding: var(--space-3) var(--space-4);
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  column-gap: var(--space-3);
  align-items: start;
  background: var(--card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  color: var(--text);
  cursor: pointer;
}
.fx-radio-card input {
  width: 20px;
  height: 20px;
  margin: 2px 0 0;
  accent-color: var(--primary);
  cursor: pointer;
}
.fx-radio-card input:focus-visible { outline: none; }
.fx-radio-card-name { font-size: 16px; line-height: 24px; font-weight: 600; }
.fx-radio-card-text {
  grid-column: 2;
  font-size: 14px; line-height: 20px;   /* text-small */
  color: var(--text-muted);
}
.fx-radio-card:hover { background: var(--bg); }
/* Gekozen: rand van 2 px in navy. Binnenruimte 1 px kleiner, zodat niets verspringt. */
.fx-radio-card:has(input:checked) {
  padding: calc(var(--space-3) - 1px) calc(var(--space-4) - 1px);
  border: 2px solid var(--primary);
  background: var(--tint);
}
.fx-radio-card:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
@media (forced-colors: active) { .fx-radio-card:has(input:checked) { outline: 2px solid Highlight; } }

.fx-fieldset .fx-radio-cards + .fx-hint { margin-top: var(--space-2); }

/* ---------- Bedrag met achtervoegsel (incl. btw / excl. btw / geen btw) ---------- */
.fx-money > .fx-money-suffix {   /* wint van .fx-money > span (euroteken) in afspraak.css */
  position: absolute;
  left: auto;
  right: var(--space-4);
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px; line-height: 20px;   /* text-small */
  color: var(--text-muted);
  white-space: nowrap;
  pointer-events: none;
}
.fx-money--suffix .fx-input { padding-right: 88px; }

/* Bedrag onder de keuze: zelfde afstand als tussen velden in een groep */
.fx-price-fields { display: flex; flex-direction: column; gap: var(--space-4); margin-top: var(--space-4); }

/* Tarief en Eenheid: mobiel onder elkaar (het achtervoegsel laat te weinig ruimte), breed naast elkaar */
.fx-split--unit { grid-template-columns: minmax(0, 1fr); }

/* Reden van vrijstelling: korter tekstvak dan een notitie (twee regels) */
.fx-textarea--short { min-height: 72px; }

/* ---------- Op de factuur: voorbeeld van de factuurregel ---------- */
.fx-invoice-preview {
  padding: var(--space-4);
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.fx-invoice-title {
  margin: 0;
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: .3px;   /* text-label */
  text-transform: uppercase;
  color: var(--text-muted);
}
.fx-invoice-basis { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-muted); }
.fx-invoice-lines { margin: 0; display: flex; flex-direction: column; }
.fx-invoice-lines > div {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-4);
  padding: var(--space-1) 0;
  font-size: 14px; line-height: 20px;
}
.fx-invoice-lines dt { min-width: 0; overflow-wrap: anywhere; }
.fx-invoice-lines dd { margin: 0; flex: none; font-variant-numeric: tabular-nums; text-align: right; }
.fx-invoice-lines .is-total {
  margin-top: var(--space-1);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border);
  font-size: 16px; line-height: 24px; font-weight: 600;
}
.fx-invoice-note { margin: 0; font-size: 14px; line-height: 20px; color: var(--text-muted); }
/* Wordt ververst (DF15): de bedragen horen nog bij eerdere invoer */
.fx-invoice-preview--stale .fx-invoice-lines dd { color: var(--text-muted); }

/* Melding binnen het formulier (DF9): zonder eigen ondermarge, de gap van het formulier regelt de ruimte */
.fx-alert--inline { margin: 0; }
/* Melding met meer blokken (BG26 gemengd, later DL11): één kolom naast het icoon, 8 px tussen de blokken.
   Een blok = een p, of een div met kopje-p + tekst-p (daarbinnen geen ruimte). */
.fx-alert-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: var(--space-2); }

/* ---------- Kop van de bewerkpagina en archiveren ---------- */
.fx-archive--divided {
  margin-top: var(--space-10);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
  max-width: 560px;
}
.fx-archive--divided .fx-section-title { margin: 0 0 var(--space-2); }

/* ---------- Lege staat met een regel eronder ---------- */
.fx-state + .fx-more { margin-top: var(--space-4); font-size: 14px; line-height: 20px; }

/* ---------- Breed scherm ---------- */
@container (min-width: 768px) {
  .fx-split--unit { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .fx-invoice-preview { padding: var(--space-6); }
}
