/* ==========================================================================
   heckscheibe.css – Heckscheiben-Lochfolien-Konfigurator
   ========================================================================== */

/* --- Layout: Vorschau links, Konfig rechts (erbt von schild-layout Pattern) --- */
.heck-layout {
  display: flex;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.heck-preview {
  flex: 0 0 55%;
  max-width: 55%;
  position: sticky;
  top: 80px;
}

.heck-preview__wrap {
  position: relative;
  background: #f5f5f5;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  padding: 16px;
  text-align: center;
  min-height: 300px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.heck-preview__badge {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #6b8e23;
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 3px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.heck-preview__img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
  border-radius: 4px;
}

.heck-preview__hint {
  margin-top: 10px;
  font-size: 12px;
  color: #888;
}

.heck-preview__hint i {
  margin-right: 4px;
}

/* --- Rechte Spalte --- */
.heck-info {
  flex: 1 1 45%;
  min-width: 0;
  overflow: hidden;
}

/* --- Konfigurations-Schritte --- */
.heck-config {
  background: #fafafa;
  border: 2px solid #6b8e23;
  border-radius: 8px;
  padding: 16px;
  margin: 16px 0;
}

.heck-config .categoryheader {
  font-size: 15px;
  font-weight: 600;
  margin: 0 0 12px;
  padding: 6px 10px;
  background: #6b8e23;
  color: #fff;
  border-radius: 4px;
  display: block;
}

.heck-config .categoryheader::before {
  display: none;
}

/* --- Schritt 1: Wer gestaltet? (Weiche zwischen 3199 und 3200) ------------
   Zwei Kacheln: die aktive ist der Zustand dieser Seite, die andere ein
   Link auf das Schwesterprodukt. Kein Formularfeld – reine Navigation. */
.heck-wahl {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.heck-wahl__opt {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 13px;
  background: #fff;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}

.heck-wahl__opt--aktiv {
  border-color: #6b8e23;
  background: #f0f5e6;
}

a.heck-wahl__opt:hover {
  border-color: #cc5500;
  background: #fff8f2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  text-decoration: none;
}

a.heck-wahl__opt:focus-visible {
  outline: 2px solid #cc5500;
  outline-offset: 2px;
}

.heck-wahl__radio {
  position: relative;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  border: 2px solid #bdbdbd;
  border-radius: 50%;
}

.heck-wahl__opt--aktiv .heck-wahl__radio {
  border-color: #6b8e23;
}

.heck-wahl__opt--aktiv .heck-wahl__radio::after {
  content: "";
  position: absolute;
  inset: 2px;
  background: #6b8e23;
  border-radius: 50%;
}

.heck-wahl__t {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: #222;
}

.heck-wahl__s {
  display: block;
  margin-top: 2px;
  font-size: 12.5px;
  color: #6d6d6d;
  line-height: 1.4;
}

.heck-wahl__go {
  display: block;
  margin-top: 5px;
  font-size: 12.5px;
  font-weight: 700;
  color: #cc5500;
}

.heck-wahl__go i {
  margin-left: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .heck-wahl__opt {
    transition: none;
  }
}

.heck-step {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid #e5e5e5;
}

.heck-step:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: none;
}

.heck-step__label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 8px;
  color: #333;
}

.heck-step__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #6b8e23;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}

.heck-step select,
.heck-step input[type="number"],
.heck-step input[type="text"] {
  width: 100%;
  font-size: 15px;
  padding: 8px 10px;
  border: 2px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  transition: border-color 0.2s;
}

.heck-step select:focus,
.heck-step input:focus {
  border-color: #6b8e23;
  outline: none;
}

.heck-step__hint {
  font-size: 12px;
  color: #888;
  margin: 6px 0 2px;
}

.heck-step__hint i {
  margin-right: 3px;
}

.heck-optional {
  font-weight: 400;
  font-size: 12px;
  color: #999;
}

.heck-step__row {
  display: flex;
  gap: 12px;
}

.heck-step__row > * {
  flex: 1;
}

/* --- Manuelle Eingabefelder --- */
.heck-manuell-fields {
  margin-top: 10px;
  padding: 12px;
  background: #f0f5e6;
  border: 1px solid #6b8e23;
  border-radius: 6px;
}

.heck-manuell-fields label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 3px;
  color: #555;
}

/* --- Dropzone --- */
.heck-dropzone {
  border: 2px dashed #6b8e23;
  border-radius: 6px;
  padding: 24px 16px;
  text-align: center;
  color: #666;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.heck-dropzone:hover,
.heck-dropzone.dz-drag-hover {
  background: #f0f5e6;
  border-color: #557316;
}

.heck-dropzone i {
  font-size: 24px;
  margin-right: 8px;
  color: #6b8e23;
}

/* --- Vorschau-Button --- */
.heck-btn-preview {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background: #6b8e23;
  color: #fff;
  border: none;
  border-radius: 4px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s;
}

.heck-btn-preview:hover {
  background: #557316;
}

.heck-btn-preview:disabled {
  background: #aaa;
  cursor: not-allowed;
}

/* --- Textarea (Gestaltungsbeschreibung) --- */
.heck-step textarea {
  width: 100%;
  font-size: 15px;
  padding: 10px;
  border: 2px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
  transition: border-color 0.2s;
  resize: vertical;
  min-height: 100px;
  font-family: inherit;
  line-height: 1.5;
}

.heck-step textarea:focus {
  border-color: #6b8e23;
  outline: none;
}

.heck-char-count {
  display: block;
  text-align: right;
  font-size: 12px;
  color: #999;
  margin-top: 4px;
}

/* --- Multi-Upload Info --- */
.heck-upload-info {
  font-size: 13px;
  color: #6b8e23;
  font-weight: 600;
  margin-top: 8px;
}

.heck-upload-info:empty {
  display: none;
}

/* --- Dropzone Multi-File: Vorschau-Thumbnails nebeneinander --- */
.heck-dropzone.dz-started {
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: 10px;
  padding: 12px;
}

.heck-dropzone .dz-preview {
  width: calc(33.333% - 8px);
  min-width: 100px;
  margin: 0;
}

/* --- Responsive --- */
@media (max-width: 768px) {
  .heck-layout {
    flex-direction: column;
  }

  .heck-preview {
    flex: 0 0 100%;
    max-width: 100%;
    position: static;
  }

  .heck-info {
    flex: 0 0 100%;
  }

  .heck-step__row {
    flex-direction: column;
  }

  .heck-wahl {
    grid-template-columns: 1fr;
  }
}

/* === Vorschau und Maszfelder, Produkt 3181 (30.08.2026) ===
   Alle Werte aus brand-tokens.css. Keine rohen Hexwerte, Abstaende aus der
   Leiter 4/8/12/16/24/32, Radien aus --r / --r-card. */

/* Die einzige lokale Farbe: der getoente Scheibengrund. BRAND.md kennt dafuer
   kein Token - #2B292E ist der Wert der einzigen dunklen Flaeche im Shop
   (Footer). Keine neue Farbe, sondern die vorhandene wiederverwendet. */
.heck-vorschau { --heck-scheibe: #2B292E; }

.heck-vorschau {
  margin-bottom: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  overflow: hidden;
  background: var(--bg);
  box-shadow: var(--sh-1);
}

.heck-vorschau__kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 16px;
  font-family: var(--body);
  font-size: 14px;
  font-weight: 600;
  color: var(--fg);
  background: var(--surf);
  border-bottom: 1px solid var(--line);
}

.heck-vorschau__kopf i { margin-right: 8px; color: var(--brand); }

.heck-vorschau__modus { display: inline-flex; }

.heck-vorschau__modus button {
  padding: 4px 12px;
  font-family: var(--body);
  font-size: 14px;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-2);
  cursor: pointer;
}

.heck-vorschau__modus button:first-child { border-radius: var(--r) 0 0 var(--r); }

.heck-vorschau__modus button:last-child {
  border-radius: 0 var(--r) var(--r) 0;
  border-left: none;
}

.heck-vorschau__modus button.is-aktiv {
  color: var(--acc-ink);
  background: var(--acc);
  border-color: var(--acc);
}

#heck-canvas {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surf);
}

.heck-vorschau--getoent #heck-canvas { background: var(--heck-scheibe); }

.heck-vorschau__hinweis {
  margin: 0;
  padding: 12px 16px;
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--mut);
  border-top: 1px solid var(--line);
}

.heck-masse__row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.heck-masse__feld {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.heck-masse__label {
  min-width: 48px;
  font-family: var(--body);
  font-size: 14px;
  color: var(--mut);
}

/* Masze in Mono mit tabular-nums - BRAND.md Abschnitt 3 macht das zur Pflicht */
.heck-masse__feld input {
  width: 96px;
  padding: 8px 12px;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  text-align: right;
  color: var(--fg);
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: var(--r);
}

.heck-masse__feld input:focus {
  border-color: var(--acc);
  outline: 2px solid var(--acc);
  outline-offset: 1px;
}

.heck-masse__feld--abgeleitet input[readonly] {
  color: var(--mut);
  background: var(--surf);
  cursor: not-allowed;
}

.heck-masse__einheit {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--mut);
}

/* Kein Mal-Zeichen zwischen den Feldern: In der schmalen Konfiguratorspalte
   brechen Breite und Hoehe untereinander um, und das freistehende "x" haengt
   dann hinter der Breite - dort sieht es aus wie ein Loeschen-Knopf.
   Die Beschriftungen "Breite" und "Hoehe" tragen die Information ohnehin. */

.heck-masse__meldung {
  margin: 8px 0 0;
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  min-height: 1.5em;
}

/* Kein Statusgruen, kein Statusrot: Hinweise in --acc, echte Fehler in --neg. */
.heck-masse__meldung--hinweis { color: var(--acc); }
.heck-masse__meldung--info    { color: var(--mut); }
.heck-masse__meldung--fehler  { color: var(--neg); }

.heck-masse--manuell .heck-masse__feld--abgeleitet input {
  color: var(--fg);
  background: var(--bg);
  cursor: auto;
}

/* --- Fehlende Pflichtangaben ---
   --neg ist laut BRAND.md Abschnitt 2 ausschliesslich fuer echte Fehler da.
   Ein Auftrag ohne Datei, Farbe oder Masz ist nicht produzierbar - das ist
   einer. Zusaetzlich Symbol plus Text, nie Farbe allein. */

.heck-step--fehlt {
  padding-left: 12px;
  border-left: 3px solid var(--neg);
}

.heck-step__fehler {
  margin: 8px 0 0;
  font-family: var(--body);
  font-size: 14px;
  line-height: 1.5;
  color: var(--neg);
}

.heck-step__fehler i { margin-right: 8px; }

.heck-step--fehlt input[type="text"],
.heck-step--fehlt select {
  border-color: var(--neg);
}

@media (max-width: 600px) {
  .heck-vorschau__kopf { gap: 8px; }
  .heck-masse__row { gap: 8px; }
  .heck-masse__feld input { width: 80px; }
}
