/* werter-controls.css · the control set of the Werter UI kit
 * ════════════════════════════════════════════════════════════════════
 * Every element a hand touches, one definition each, binding for
 * every Werter board. Requires werter-tokens.css before it. Docs:
 * docs/ui/buttons.md and docs/ui/forms.md.
 *
 * The five button roles: primary (.btn-primary), quiet (.btn-quiet),
 * icon (.cite), toggle chip (.chip), segmented (.progpick). A sixth
 * role is a mistake. Green is the only interactive colour; failure is
 * reported in text, never clicked on.
 */

/* ── primary: the one action a panel exists for ─────────────────── */
.btn-primary {
  font-family: var(--mono); font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--green); color: #FFFFFF;    /* fixed fill, fixed text */
  border: 0; border-radius: 8px; padding: 10px 16px;
  cursor: pointer; min-height: 44px;
  transition: opacity 0.12s;
}
.btn-primary:disabled { opacity: 0.6; }

/* ── quiet: low-emphasis actions ───────────────────────────────── */
.btn-quiet {
  font-family: var(--mono); font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: none; border: 1px solid var(--line); color: var(--muted);
  border-radius: 8px; padding: 7px 14px; cursor: pointer; min-height: 32px;
  transition: background-color 0.12s, color 0.12s, border-color 0.12s;
}
.btn-quiet:hover { color: var(--ink); background: var(--hover); }
.btn--block { display: block; width: 100%; }

/* ── icon: inline row actions, confirm by swapping to a check ──── */
.cite {
  display: inline-flex; align-items: center; gap: 4px; vertical-align: middle;
  background: none; border: 0; color: var(--dim);
  border-radius: 8px; padding: 4px 6px; margin-left: 4px; cursor: pointer;
  opacity: 0.55; transition: opacity 0.12s, color 0.12s, background-color 0.12s;
}
.cite:hover { opacity: 1; color: var(--green); background: var(--hover); }
.cite.is-done { opacity: 1; color: var(--t-green); }
.cite--link {
  font-family: var(--mono); font-size: 0.625rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
}

/* ── toggle chip: filters, aria-pressed carries the state ──────── */
.chip {
  font-family: var(--mono); font-size: 0.6875rem; font-weight: 700;
  background: none; border: 1px solid var(--line); color: var(--dim);
  border-radius: 8px; padding: 4px 9px; cursor: pointer; min-height: 28px;
  transition: background-color 0.12s, border-color 0.12s, color 0.12s;
}
.chip[aria-pressed="true"] { color: var(--link-ink); background: var(--accent); border-color: var(--accent); }

/* ── segmented: choosing exactly one of few ────────────────────── */
.progpick {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--hover); border: 1px solid var(--hairline);
  border-radius: 8px; padding: 3px;
}
.progpick button {
  font-family: var(--mono); font-size: 0.6875rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  background: none; border: 0; color: var(--muted);
  border-radius: 8px; padding: 7px 16px; cursor: pointer; min-height: 32px;
  transition: background-color 0.12s, color 0.12s, box-shadow 0.12s;
}
.progpick button:hover { color: var(--green); }
.progpick button[aria-pressed="true"] {
  background: var(--green); color: #FFFFFF;
  box-shadow: 0 1px 0 var(--hairline);
}

/* ── Eingabefeld ───────────────────────────────────────────────────
   Am 15.09.2026 nachgetragen. .input stand seit jeher im Markup von
   anmelden.html, passwort.html und briefings.html -- eine Regel dazu
   gab es NIE. Die Felder trugen deshalb den Browser-Standard: Arial
   statt der Hausschrift, ein grauer 2px-Innenrand, kein Radius. Auf
   der Anmeldeseite, also der ersten Seite, die jeder Leser sieht.
   Gefunden hat es kein Auge, sondern die Frage an den Browser, welche
   Regeln ein Feld wirklich treffen -- die Antwort war: nur `*`.

   Die Werte sind nicht neu erfunden, sondern von .search und .select
   uebernommen: dieselbe Schrift, derselbe Rand, dieselben 8px Radius,
   dieselbe Mindesthoehe. Ein Bedienelement, das anders aussieht als
   seine Geschwister, ist ein zweites Problem.

   Gilt auch fuer <textarea class="input"> -- in briefings.html sitzt
   die Klasse auf beidem. */
.input {
  font-family: var(--sans); font-size: 0.875rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--hairline); border-radius: 8px;
  padding: 7px 12px; min-height: 36px; width: 100%;
  transition: border-color 0.12s;
}
.input:focus { border-color: var(--green); outline: none; }
.input::placeholder { color: var(--disabled); }
/* Ein mehrzeiliges Feld darf wachsen, aber nur nach unten -- seitlich
   zoege es die Spalte auseinander, in der es steht. */
textarea.input { min-height: 72px; resize: vertical; line-height: 1.5; }

/* ── search input ──────────────────────────────────────────────── */
.search {
  font-family: var(--sans); font-size: 0.875rem;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--hairline); border-radius: 8px;
  padding: 7px 12px; min-height: 36px; width: 240px;
  transition: border-color 0.12s, width 0.15s;
}
.search:focus { border-color: var(--green); width: 300px; }
.search::placeholder { color: var(--disabled); }
@media (max-width: 640px) { .search, .search:focus { width: 100%; } }

/* ── select with a drawn chevron ───────────────────────────────── */
.select {
  font-family: var(--sans); font-size: 0.875rem;
  background: var(--panel); color: var(--text);
  border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 32px 7px 10px; min-height: 36px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5 11 1.5' fill='none' stroke='%23626A5C' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
  transition: border-color 0.12s;
}
.select:hover { border-color: var(--muted); }

/* ── slider ────────────────────────────────────────────────────── */
.slider { width: 100%; min-height: 28px; appearance: none; background: none; }
.slider::-webkit-slider-runnable-track {
  height: 4px; border-radius: 2px; background: var(--line);
}
.slider::-webkit-slider-thumb {
  appearance: none; width: 20px; height: 20px; margin-top: -8px;
  border-radius: 50%; background: #FFFFFF; border: 1px solid var(--hairline);
  /* the one sanctioned depth exception: a flat thumb vanishes on
     white, so this shadow is function, not decoration */
  box-shadow: 0 1px 3px rgba(25, 28, 21, 0.25);
}
.slider::-moz-range-track { height: 4px; border-radius: 2px; background: var(--line); }
.slider::-moz-range-progress { height: 4px; border-radius: 2px; background: var(--green); }
.slider::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: #FFFFFF; border: 1px solid var(--hairline);
  box-shadow: 0 1px 3px rgba(25, 28, 21, 0.25);
}

/* touch targets grow where fingers operate */
@media (pointer: coarse) {
  .btn-quiet, .chip, .cite { min-height: 44px; }
}

/* Nur für Vorleseprogramme.
   Am 15.09.2026 nachgetragen: die Klasse wurde auf vorhaben.html
   benutzt, aber es gab sie nirgends -- wie .input, das monatelang auf
   der Anmeldeseite stand, ohne dass eine Regel darauf passte. Ohne
   diese Regel steht die Beschriftung sichtbar im Filterband. */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
