/* Formulieren + adres-autocomplete (back-office). Huisstijl-tokens uit tokens.css.
   Kaarten zijn VLAK: volledige 1px-rand + lichte schaduw, nooit een decoratieve
   linkerbalk. Geladen door index.html. */

/* ---- View-kop ----------------------------------------------------------- */
/* De paginatitel staat in de topbalk (header.css). De view-kop houdt alleen nog
   de optionele subtitel of een scherm-actie (bv. "Afspraak maken") vast. */
.view__head { margin-bottom: 18px; }
.view__sub { margin: 0; color: var(--muted); max-width: 60ch; }
/* Kop met alleen een actieknop: rechts uitlijnen boven de inhoud. */
.view__head--actie { display: flex; justify-content: flex-end; }

/* ---- Kaart (vlak) ------------------------------------------------------- */
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 24px;
}

/* ---- Formulier ---------------------------------------------------------- */
.form { max-width: 640px; }
.form__kop { margin: 0 0 16px; font-size: 1.15rem; }
.form__rij { margin-bottom: 16px; }
.form__label { display: block; margin-bottom: 6px; font-weight: 600; font-size: .9rem; color: var(--ink-900); }
.form__req { color: var(--err); }
.form__opt { font-weight: 400; color: var(--muted); }

.form__input {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  font: inherit;
  font-size: .95rem;
  color: var(--ink-900);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.form__input::placeholder { color: var(--muted); }
.form__input:focus {
  outline: none;
  border-color: var(--blue-700);
  box-shadow: 0 0 0 3px rgba(0, 71, 128, .12);
}

.form__hint {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 7px 0 0;
  font-size: .8rem;
  color: var(--muted);
}
.form__hint svg { width: 14px; height: 14px; flex: 0 0 14px; }

.form__acties { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.btn:disabled { background: var(--blue-100); color: var(--muted); cursor: not-allowed; }

.form__status { font-size: .9rem; color: var(--muted); }
.form__status--ok { color: var(--ok); font-weight: 600; }
.form__status--err { color: var(--err); }

/* ---- "Herkend"-paneel (auto-ingevulde gegevens) ------------------------- */
.herkend {
  margin: 4px 0 18px;
  padding: 12px 16px;
  background: var(--bg-50);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
}
.herkend__rij { display: flex; align-items: baseline; gap: 12px; padding: 4px 0; font-size: .9rem; }
.herkend__label { flex: 0 0 110px; color: var(--muted); }
.herkend__waarde { color: var(--ink-900); font-weight: 500; }

/* ---- Adres-autocomplete (combobox) -------------------------------------- */
.ac { position: relative; }
.ac__field {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.ac__field:focus-within { border-color: var(--blue-700); box-shadow: 0 0 0 3px rgba(0, 71, 128, .12); }
.ac__icon { width: 17px; height: 17px; flex: 0 0 17px; color: var(--muted); }
.ac__input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: .95rem;
  color: var(--ink-900);
  outline: none;
}
.ac__input::placeholder { color: var(--muted); }

/* Laad-spinner (toont tijdens het ophalen) */
.ac__spin {
  flex: 0 0 16px;
  width: 16px;
  height: 16px;
  border: 2px solid var(--blue-100);
  border-top-color: var(--blue-700);
  border-radius: 999px;
  animation: ac-spin .6s linear infinite;
}
@keyframes ac-spin { to { transform: rotate(360deg); } }

.ac__results {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 40;
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.ac__item {
  display: flex;
  flex-direction: column;
  gap: 1px;
  width: 100%;
  padding: 5px 10px;
  border: 0;
  background: none;
  border-radius: var(--radius-sm);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.ac__item:hover, .ac__item.is-active { background: var(--sidebar-active); }
/* Eén rustige maat: de uniforme datamaat (--fs-data), naam in inkt, meta in mute -
   geen grote sprongen meer (rust in het lijstbeeld, app-breed). */
.ac__naam { font-size: var(--fs-data); color: var(--ink-900); }
.ac__meta { font-size: var(--fs-data); color: var(--muted); }
.ac__leeg { padding: 12px; text-align: center; color: var(--muted); font-size: var(--fs-data); }

/* Optionele dropdown-pijl rechts in een .ac__field: alleen waar de combobox een
   vaste lijst kan "uitklappen" (bv. bestaande filters). Zelfde rustige chevron-
   affordance als elders (filterknop-pijl); draait om als de lijst openstaat. */
.ac__pijl {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  padding: 2px; border: 0; background: none; color: var(--muted); cursor: pointer;
}
.ac__pijl svg { width: 16px; height: 16px; opacity: .7; transition: transform .12s ease; }
.ac__pijl:hover svg { opacity: 1; color: var(--blue-700); }
.ac:has(.ac__input[aria-expanded="true"]) .ac__pijl svg { transform: rotate(180deg); }
