/* ============================================================
   components.css — Buttons, forms, camera/video, image preview
   ============================================================ */

/* ---------- Buttons ---------- */

/* Base button — large touch target */
.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  width: 100%;
  min-height: 52px;
  padding: var(--space-md) var(--space-lg);
  border-radius: var(--radius-md);
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-decoration: none;
  transition: filter var(--transition), transform var(--transition), box-shadow var(--transition);
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  cursor: pointer;
  border: none;
}

.btn:active {
  transform: scale(0.97);
}

/* Primary CTA: ISRI Orange.
   Schrift schwarz statt weiß — 9.0:1 statt 2.33:1, CI-Hex bleibt exakt. */
.btn-primary {
  background: var(--gradient-primary);
  color: var(--color-on-primary);
  box-shadow: 0 2px 8px rgba(255, 140, 0, 0.35);
}

.btn-primary:hover {
  filter: brightness(0.92);
  box-shadow: 0 4px 16px rgba(255, 140, 0, 0.45);
}

/* Sekundärer CTA: ISRI Blau */
.btn-secondary {
  background: var(--color-accent);
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(27, 97, 171, 0.30);
}

.btn-secondary:hover {
  background: var(--color-accent-dark);
  box-shadow: 0 4px 16px rgba(27, 97, 171, 0.40);
}

/* Outline: oranger Rahmen, Text in Textfarbe.
   Orange als Schriftfarbe erreichte nur 2.94:1 — der Rahmen trägt die Marke. */
.btn-outline {
  background: transparent;
  color: var(--color-strong);
  border: 2px solid var(--color-primary);
}

.btn-outline:hover {
  background: var(--gradient-primary);
  color: var(--color-on-primary);
}

/* Ghost (muted, secondary action).
   Text in voller Textfarbe — Graustufe auf Hellgrau lag bei 3.11:1. */
.btn-ghost {
  background: var(--color-border);
  color: var(--color-strong);
}

.btn-ghost:hover {
  filter: brightness(0.95);
}

/* Disabled state */
.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  transform: none;
}

/* ---------- Mode Selection Cards (Home page) ---------- */
.mode-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-xl) var(--space-lg);
  background: var(--color-surface);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  box-shadow: var(--shadow-card);
  -webkit-tap-highlight-color: transparent;
  aspect-ratio: 1;
  min-height: unset;
  padding: var(--space-lg);
  overflow: hidden;
}

.mode-card:hover,
.mode-card:focus-visible {
  border-color: var(--color-primary);
  box-shadow: 0 4px 20px rgba(255, 140, 0, 0.25);
  outline: none;
}

.mode-card:active {
  transform: scale(0.97);
}

.mode-card__icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-primary);
  flex-shrink: 0;
}

.mode-card__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--color-strong);
}

.mode-card__desc {
  display: none;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  margin: 0;
}

.mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-md);
}

@media (max-width: 320px) {
  .mode-cards { grid-template-columns: 1fr; }
}

/* ---------- Camera / Video ---------- */
/* Sucher nutzt im Hochformat die verfügbare Höhe statt fix 4:3 zu bleiben.
   Auf dem iPhone SE waren das vorher 343×257px bei ~600px freier Höhe. */
.camera-container {
  position: relative;
  width: 100%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
  aspect-ratio: 4/3;
  box-shadow: var(--shadow-card);
}

@media (orientation: portrait) {
  .camera-container {
    aspect-ratio: auto;
    height: clamp(260px, 58dvh, 620px);
  }
}

.camera-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  /* Prevent iOS from flipping video */
  transform: scaleX(1);
}

/* Viewfinder overlay */
.camera-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.camera-overlay::before {
  content: '';
  position: absolute;
  inset: 16px;
  border: 2px solid rgba(255,255,255,0.5);
  border-radius: var(--radius-sm);
}

/* Corner accents */
.camera-overlay::after {
  content: '';
  position: absolute;
  top: 16px;
  left: 16px;
  width: 24px;
  height: 24px;
  border-top: 3px solid var(--color-primary);
  border-left: 3px solid var(--color-primary);
  border-radius: 3px 0 0 0;
}

/* Capture button bar */
.camera-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md) 0;
}

.btn-capture {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-surface);
  border: 4px solid var(--color-strong);
  box-shadow: 0 2px 12px rgba(0,0,0,0.30);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition);
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

.btn-capture:active {
  transform: scale(0.92);
  background: var(--color-border);
}

.btn-capture-inner {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--color-strong);
}

/* Small thumbnail in review */
.preview-thumb {
  width: 100%;
  max-height: 260px;
  object-fit: contain;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  background: #111;
  display: block;
  image-orientation: from-image; /* Respect EXIF rotation for uploaded photos */
}

/* No-photo placeholder */
.preview-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  min-height: 120px;
  border-radius: var(--radius-md);
  background: var(--color-bg);
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

/* ---------- File Upload Drop Zone ---------- */
.upload-zone {
  width: 100%;
  min-height: 160px;
  border: 2px dashed var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
  text-align: center;
  padding: var(--space-lg);
  -webkit-tap-highlight-color: transparent;
}

.upload-zone:hover,
.upload-zone.drag-over {
  border-color: var(--color-primary);
  background: rgba(255, 140, 0, 0.06);
}

.upload-zone__icon {
  color: var(--color-primary);
}

.upload-zone__label {
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1rem;
  color: var(--color-strong);
}

.upload-zone__hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Hidden native file input — triggered by upload zone click */
.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

/* ---------- Forms ---------- */
.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
  margin-bottom: 12px;
}

.form-label {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 11px var(--space-md);
  background: var(--color-bg);
  border: 2px solid var(--color-border);
  border-radius: var(--radius-sm);
  font-size: 1rem;
  color: var(--color-text);
  transition: border-color var(--transition), box-shadow var(--transition);
  -webkit-appearance: none;
  appearance: none;
}

.form-input::placeholder,
.form-textarea::placeholder {
  color: var(--color-text-muted);
}

.form-input:focus-visible,
.form-textarea:focus-visible {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(255, 140, 0, 0.20);
}

.form-input--error {
  border-color: var(--color-error);
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.12);
}

.form-textarea {
  resize: vertical;
  min-height: 90px;
  line-height: 1.5;
}

.form-hint {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

.optional-badge,
.required-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 500;
  line-height: 1.4;
  border-radius: 4px;
  padding: 1px 6px;
  margin-left: 6px;
  text-transform: none;
  letter-spacing: 0;
  vertical-align: middle;
}

.optional-badge {
  color: var(--color-text-muted);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
}

.required-badge {
  color: var(--color-primary-dark);
  background: var(--color-bg);
  border: 1px solid var(--color-primary);
}

/* ---------- Loading Spinner ---------- */
/* Spinner folgt der Button-Schriftfarbe (auf Orange ist die schwarz) */
.spinner {
  width: 22px;
  height: 22px;
  border: 3px solid currentColor;
  border-top-color: transparent;
  opacity: 0.85;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ---------- Info Banner ---------- */
.info-banner {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  background: rgba(27, 97, 171, 0.08);
  border: 1px solid rgba(27, 97, 171, 0.25);
  border-radius: var(--radius-sm);
  padding: var(--space-sm) var(--space-md);
  font-size: 0.85rem;
  color: var(--color-accent);
  margin-bottom: var(--space-md);
}

.info-banner svg {
  flex-shrink: 0;
  margin-top: 1px;
}

/* ---------- Setup-Button (Gear) — 1:1-Klon von .btn-theme-toggle ---------- */
.btn-icon-header {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
}

.btn-icon-header:hover {
  background: var(--color-border);
  color: var(--color-strong);
}

.btn-icon-header--active {
  background: var(--color-border);
  color: var(--color-primary);
}

/* ---------- Setup-Panel ---------- */

/* Header z-index: 100 → Panel (z-index: 90) gleitet elegant dahinter hervor */
.setup-panel {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  box-shadow: var(--shadow-card);
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
              opacity 0.2s ease;
}

.setup-panel--open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.setup-panel__inner {
  max-width: 720px;
  margin: 0 auto;
  padding: var(--space-md) var(--space-md) var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.setup-panel__title {
  font-family: var(--font-heading);
  font-weight: 800;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin: 0;
}

/* ---------- Setup-Zeile (Label + Toggle) ---------- */
.setup-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
}

.setup-row__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.setup-row__label {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.setup-row__desc {
  font-size: 0.8125rem;
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ---------- Toggle-Switch ---------- */
.toggle-switch {
  display: flex;
  align-items: center;
  cursor: pointer;
  flex-shrink: 0;
}

.toggle-switch input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
  pointer-events: none;
}

.toggle-switch__track {
  width: 48px;
  height: 26px;
  border-radius: 13px;
  background: var(--color-border);
  position: relative;
  transition: background var(--transition);
  flex-shrink: 0;
}

.toggle-switch input:checked + .toggle-switch__track {
  background: var(--color-primary);
}

.toggle-switch__thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.20);
  transition: transform var(--transition);
}

.toggle-switch input:checked + .toggle-switch__track .toggle-switch__thumb {
  transform: translateX(22px);
}

/* ---------- Config-Section (ausklappbar) ---------- */
.config-section {
  border-top: 1px solid var(--color-border);
  padding-top: var(--space-md);
}

.config-section__toggle {
  width: 100%;
  min-height: 44px;   /* Touch-Target */
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--color-text);
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--transition);
}

.config-section__toggle:hover {
  color: var(--color-primary-dark);
}

.config-body {
  padding-top: var(--space-md);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

/* ---------- PIN-Gate ---------- */
.config-pin-gate {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  padding: var(--space-md) 0;
}

.config-pin-gate__hint {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin: 0;
}

.pin-dots {
  display: flex;
  gap: var(--space-sm);
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  transition: background var(--transition), border-color var(--transition);
}

.pin-dot--filled {
  background: var(--color-primary);
  border-color: var(--color-primary);
}

.pin-dot--error {
  background: var(--color-error);
  border-color: var(--color-error);
}

.pin-keypad {
  display: grid;
  grid-template-columns: repeat(3, 52px);
  gap: var(--space-sm);
}

.pin-key {
  width: 52px;
  height: 52px;
  border-radius: var(--radius-sm);
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  font-family: var(--font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--color-text);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: background var(--transition), border-color var(--transition);
}

.pin-key:hover {
  background: var(--color-border);
}

.pin-key:active {
  transform: scale(0.93);
}

.pin-key--empty {
  pointer-events: none;
  background: transparent;
  border-color: transparent;
}

/* ---------- Config-Felder (Auth-Token mit Eye-Button) ---------- */
.config-fields {
  display: flex;
  flex-direction: column;
  gap: 0; /* .form-group hat eigenes margin-bottom */
}

.input-reveal-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.input-reveal-wrap .form-input {
  padding-right: 44px;
}

.btn-reveal {
  position: absolute;
  right: var(--space-sm);
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 4px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--transition);
}

.btn-reveal:hover {
  color: var(--color-strong);
}

/* Eye-Icon Toggle: Standard = eye-off sichtbar, eye unsichtbar */
.btn-reveal .icon-eye     { display: none; }
.btn-reveal .icon-eye-off { display: block; }
.btn-reveal--visible .icon-eye     { display: block; }
.btn-reveal--visible .icon-eye-off { display: none; }

/* ---------- Inline-Buttons (z.B. Speichern / Sperren) ---------- */
.btn--inline {
  width: auto;
  min-height: 44px;
  padding: var(--space-sm) var(--space-lg);
}

/* Narrow button (z.B. Success-Screen) */
.btn--narrow {
  max-width: 280px;
  align-self: center;
}

/* Small hint text */
.text-hint {
  font-size: 0.8rem;
}

.btn-group--inline {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* ---------- Pipeline-Tracking (aus index2.html adaptiert, mit CSS-Variablen) ---------- */

.tracking-card      { padding-bottom: var(--space-xl); }
.tracking-title     { text-align: center; margin-bottom: var(--space-xl); }

/* Breite begrenzen: sonst zieht die Node-Zeile auf großen Monitoren das Label
   ganz nach links und den Text ganz nach rechts (gemessen 542px je Spalte
   bei 1920px Viewport). */
.pipeline-container {
  position: relative;
  padding: var(--space-md) 0 var(--space-sm);
  max-width: 520px;
  margin-inline: auto;
}

/* Vertikale Linie — immer mittig zum LED (50% des Containers) */
.pipeline-track {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: 0;
  bottom: calc(var(--space-sm) + 26px);   /* endet bei pn4-Mitte */
  width: 2px;
  background: var(--color-border);
  z-index: 0;
  border-radius: 2px;
}

/* Wachsender Energie-Balken */
.pipeline-energy {
  width: 100%;
  height: 0%;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  box-shadow: 0 0 15px #a855f7;
  border-radius: 2px;
  transition: height 0.9s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── Node-Zeile: Grid mit 3 Spalten → LED immer exakt bei 50% ── */
.pipeline-node {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: var(--space-md);
  margin-bottom: var(--space-xl);
  position: relative;
  z-index: 2;
  /* Kein opacity hier — würde pn-led-wrap-Hintergrund transparent machen
     und den Track durchscheinen lassen. Dimming erfolgt auf Kindelementen. */
}

.pipeline-node:last-child {
  margin-bottom: 0;
}

/* Label links — Grid-Spalte 1, text-align: right */
.pn-label {
  font-family: var(--font-heading);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  text-align: right;
  opacity: 0.35;
  transition: opacity var(--transition);
}

.pipeline-node.pn--active .pn-label,
.pipeline-node.pn--done   .pn-label { opacity: 1; }

/* LED-Wrap — 52px wie Ring, kein eigener Hintergrund (Ring + Socket decken Track ab) */
.pn-led-wrap {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 0 0 5px var(--color-surface);
}

/* Rotierender Ring — füllt Led-Wrap komplett (wie Original-Template) */
.pn-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--color-border);
  opacity: 1;
  transition: opacity 0.9s;
}

.pipeline-node.pn--active .pn-ring {
  opacity: 1;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  animation: pn-spin 1.6s linear infinite;
  box-shadow: 0 0 15px #a855f7;
}

.pipeline-node.pn--done .pn-ring {
  opacity: 1;
  animation: none;
  background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
  box-shadow: 0 0 20px #a855f7;
}

@keyframes pn-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* ── Error-State ── */
.pipeline-node.pn--error .pn-label  { opacity: 1; }
.pipeline-node.pn--error .pn-socket { opacity: 1; }
.pipeline-node.pn--error .pn-info   { opacity: 1; }

.pipeline-node.pn--error .pn-ring {
  opacity: 1;
  animation: none;
  background: linear-gradient(135deg, #CC0000 0%, var(--color-error) 100%);
  box-shadow: 0 0 20px rgba(255, 0, 0, 0.55);
}

.pipeline-node.pn--error .pn-dot {
  background: radial-gradient(circle at 35% 35%, #ffffff, var(--color-error) 45%, #990000);
  box-shadow: 0 0 15px rgba(255, 0, 0, 0.75);
}

/* LED-Socket (überdeckt den Ring) — Border inaktiv = Pipeline-Farbe */
.pn-socket {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--color-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  transition: opacity var(--transition);
}

.pipeline-node.pn--active .pn-socket,
.pipeline-node.pn--done   .pn-socket { opacity: 1; }

/* Innerer Dot — Radial-Gradient für 3D-Tiefe (wie Original) */
.pn-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--color-border), var(--color-text-muted));
  transition: background var(--transition), box-shadow var(--transition);
}

.pipeline-node.pn--active .pn-dot {
  background: radial-gradient(circle at 35% 35%, #ffffff, #00f2ff 45%, #0044ff);
  box-shadow: 0 0 20px #00f2ff;
}

.pipeline-node.pn--done .pn-dot {
  background: radial-gradient(circle at 35% 35%, #ffffff, #00ff88 45%, #006633);
  box-shadow: 0 0 15px #00ff88;
}

/* Info rechts vom LED */
.pn-info  {
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0.35;
  transition: opacity var(--transition);
}
.pipeline-node.pn--active .pn-info,
.pipeline-node.pn--done   .pn-info { opacity: 1; }

.pn-title { font-size: 0.9375rem; font-weight: 600; color: var(--color-text); }
.pn-sub   {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  min-height: calc(0.8rem * 1.5 * 2); /* 2 Zeilen reservieren — verhindert Layout-Sprung bei Textänderung */
  line-height: 1.5;
}

/* Status-Console */
.pipeline-console {
  text-align: center;
  font-family: var(--font-heading);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-top: var(--space-lg);
}


/* ---------- Daten-Liste ---------- */
.data-list {
  display: flex;
  flex-direction: column;
}

.data-list dt {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--color-text-muted);
  margin-top: var(--space-md);
}

.data-list dt:first-child {
  margin-top: 0;
}

.data-list dd {
  font-size: 0.9375rem;
  color: var(--color-text);
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
  margin: 0;
}

/* ---------- Suchergebnisse (Daten-Page) ----------
   Nutzen dieselbe .data-list-Darstellung wie die Kontaktdaten darüber:
   ein Label-Wert-Block je Information. */
.search-results {
  display: flex;
  flex-direction: column;
  gap: var(--space-lg);
  list-style: none;
}

/* Lange URLs dürfen die Spalte nicht sprengen */
.data-list dd {
  overflow-wrap: anywhere;
}

/* Zähler nur bei mehr als einem Treffer — sonst wäre "Treffer 1" Rauschen */
.search-results:has(> :nth-child(2)) .search-result::before {
  content: 'Treffer ' counter(treffer);
  counter-increment: treffer;
  display: block;
  font-family: var(--font-heading);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--color-primary-dark);
  margin-bottom: var(--space-sm);
}

.search-results { counter-reset: treffer; }

/* ============================================================
   Responsive Breakpoints — Components
   ============================================================ */

/* ---------- Tablet Hochformat — ab 768px ---------- */
@media (min-width: 768px) {
  /* Mode cards: larger gap, description text visible */
  .mode-cards {
    gap: var(--space-md);
  }

  .mode-card {
    padding: var(--space-xl);
  }

  .mode-card__desc {
    display: block;
  }

  /* Camera / upload: use more vertical space */
  .camera-container {
    max-height: 480px;
  }

  .preview-thumb {
    max-height: 420px;
  }

  .upload-zone {
    min-height: 240px;
  }
}

/* ---------- Desktop / iPad Querformat — ≥1024px ----------
   Die App-Spalte bleibt bei 720px (siehe main.css). Inhalte füllen sie aus,
   statt in einer breiten, halbleeren Fläche zu schwimmen. */
@media (min-width: 1024px) {
  /* Kamera: volle Spaltenbreite, Höhe ohne Deckel */
  .camera-container {
    max-height: none;
  }

  /* Upload-Zone höher, aber über die volle Spalte */
  .upload-zone {
    min-height: 320px;
  }

  /* Vorschau: kompakt halten, damit das Formular ohne Scrollen erreichbar bleibt */
  .detail-layout .preview-thumb {
    max-height: 340px;
  }
}
