/* SupplySphere — Modul B (Inserate & Fotos). Ergänzt supplysphere.css; Tokens von dort. */

/* ---------- Inseratsseite ---------- */
.inserat-seite { padding-top: 22px; padding-bottom: 64px; }
.inserat-krumen { margin-bottom: 18px; }
.inserat-oben { align-items: start; }
.inserat-unten { margin-top: 40px; align-items: start; }
.inserat-text { gap: 28px; }
.inserat-fakten { gap: 18px; }
.vorschau-band, .verblasst-band { margin-bottom: 18px; }
.band-knoepfe { margin-left: auto; }

.galerie { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.galerie-gross { margin: 0; border: 1px solid var(--line); background: var(--panel-2); position: relative; }
.galerie-gross img { width: 100%; height: auto; max-height: 560px; object-fit: contain; background: var(--panel-3); }
.galerie-zeile { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); }
.galerie-thumbs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.galerie-thumb { display: block; aspect-ratio: 4 / 3; border: 1px solid var(--line); overflow: hidden; background: var(--panel-2); }
.galerie-thumb img { width: 100%; height: 100%; object-fit: cover; }
.galerie-thumb.on { border: 2px solid var(--yellow); }
.galerie-thumb:hover { border-color: var(--line-2); }
.galerie-leer { min-height: 420px; }

.fakten { gap: 18px; }
.fakten-kopf { gap: 6px; }
.inserat-titel { font-size: 40px; line-height: 1.02; }
.pills { gap: 8px; }
.preis-zeile { display: flex; align-items: baseline; gap: 12px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.preis { font-size: 44px; font-weight: 700; line-height: 1; text-transform: none; }
.preis-anfrage { font-size: 30px; text-transform: uppercase; }
.aktion { gap: 10px; }
.aktion-zeile { display: flex; gap: 10px; min-width: 0; }
/* Mengenfeld: feste 70 px wie im Entwurf. Zwei Klassen (0,2,0), damit die Breite
   auch dann gilt, wenn die Grundregel fuer .in einmal wieder mit einem Elementnamen
   qualifiziert wird — sonst wird das Feld 440 px breit und schiebt den Knopf hinaus. */
.aktion-zeile .aktion-menge { width: 70px; flex: 0 0 70px; text-align: center; height: 50px; padding: 0 6px; }
.aktion-zeile .aktion-haupt { flex: 1 1 auto; min-width: 0; min-height: 50px; font-size: 21px; padding: 0 20px; }
.aktion-zeile .aktion-neben { flex: 1 1 auto; min-width: 0; }

.verkaeufer .card-body { gap: 10px; }
.verkaeufer-titel { font-size: 19px; }
.verkaeufer-seit { margin-left: auto; }
.verkaeufer .kv { grid-template-columns: 110px minmax(0, 1fr); }

.beschreibung { max-width: 68ch; white-space: pre-line; }
.passende { gap: 14px; }
.passend { flex-direction: row; gap: 12px; padding: 10px; color: var(--ink); }
.passend:hover { border-color: var(--line-2); color: var(--ink); }
.passend-foto { width: 72px; height: 72px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--line); }
.passend .ph-klein { min-height: 72px; height: 72px; flex-shrink: 0; }
.passend-text { gap: 2px; min-width: 0; flex-grow: 1; }
.passend-titel { font-size: 17px; line-height: 1.1; text-transform: none; }
.passend-preis { font-size: 18px; font-weight: 700; margin-top: auto; text-transform: none; }

.melden { display: block; }
.melden summary { list-style: none; cursor: pointer; align-items: flex-start; }
.melden summary::-webkit-details-marker { display: none; }
.melden-form { margin-top: 12px; gap: 8px; }
.melden-form .in { height: 40px; font-size: 13px; }
.melden-form textarea.in { height: auto; min-height: 72px; }
.melden-login { margin-top: 12px; }

.mobil-leiste { display: none; }

/* ---------- Formular ---------- */
.inserat-formular { display: flex; flex-direction: column; gap: 18px; max-width: 960px; }
.inserat-formular .f:last-child { margin-bottom: 0; }
.radios { display: flex; gap: 10px; flex-wrap: wrap; }
.radios .radio { flex: 1 1 120px; min-height: 46px; }

/* ---------- Fotos ---------- */
.fotos-kopf { gap: 6px; }
.fotos-inserat { font-size: 19px; text-transform: none; }
.fotos-raster { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.foto-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.foto-eintrag { flex-direction: row; gap: 16px; padding: 12px; }
.foto-thumb { width: 220px; height: 165px; object-fit: cover; flex-shrink: 0; border: 1px solid var(--line); }
.foto-body { display: flex; flex-direction: column; gap: 10px; min-width: 0; flex-grow: 1; }
.foto-caption .in { height: 40px; font-size: 14px; }
.foto-knoepfe { gap: 8px; }
.upload-titel { font-size: 19px; }

/* ---------- Liste ---------- */
.liste-zahl { margin-left: 8px; }
.status-filter { margin-bottom: 18px; gap: 8px; }
.status-filter .pill { min-height: 32px; display: inline-flex; align-items: center; }
.liste-tabelle .sp-foto { width: 64px; }
.liste-thumb { width: 48px; height: 48px; object-fit: cover; display: block; min-height: 48px; padding: 0; }
.liste-teil { gap: 2px; }
.liste-titel { font-size: 17px; text-transform: none; }
.liste-aktionen { gap: 6px; flex-wrap: nowrap; }
.liste-tabelle td:last-child { text-align: right; }

/* ---------- Responsive ---------- */
@media (max-width: 899px) {
  .inserat-seite { padding-top: 12px; padding-bottom: 96px; }
  .inserat-titel { font-size: 26px; }
  .preis { font-size: 34px; }
  .preis-anfrage { font-size: 24px; }
  .galerie-gross img { max-height: 320px; }
  .galerie-thumbs { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
  .galerie-leer { min-height: 260px; }
  .aktion .aktion-zeile:first-child { display: none; }   /* Angebot über die Mobil-Leiste */
  .mobil-leiste { display: flex; z-index: 20; }
  .mobil-neben { width: 56px; flex-shrink: 0; padding: 0; }
  .mobil-haupt { flex-grow: 1; min-height: 52px; font-size: 21px; }
  .fotos-raster { grid-template-columns: minmax(0, 1fr); }
  .foto-eintrag { flex-direction: column; }
  .foto-thumb { width: 100%; height: auto; aspect-ratio: 4 / 3; }
  .liste-aktionen { flex-wrap: wrap; justify-content: flex-end; }
  .band-knoepfe { margin-left: 0; }
  .band { flex-wrap: wrap; }
  /* Tippziele ≥ 44 px (Bauplan Kapitel 5) */
  .melden summary { min-height: 44px; }
  /* 16 px, sonst zoomt iOS Safari beim Antippen die Seite hinein (supplysphere.css, Blattende). */
  .melden-form .in { height: 44px; font-size: 16px; }
  .foto-caption .in { height: 44px; font-size: 16px; }
  .status-filter .pill { min-height: 44px; }
}

/* Ungesicherte Registerzuordnung (inserat_register.sicher = 0): der Kasten sieht
   anders aus als ein bestaetigtes Datenblatt — warnfarbener statt gelber Rahmen,
   damit die Vermutung nicht wie geprueftes Wissen wirkt. */
.datenblatt-unsicher { border-color: var(--warn); }
.datenblatt-unsicher .datenblatt-kopf .datenblatt-titel { color: var(--warn); }
.datenblatt-vorbehalt { border-style: solid; border-color: var(--warn); color: var(--ink-2); margin: 8px 0 0; }
.datenblatt-vorbehalt .warn { font-weight: 600; }
