/* ============================================================
   FAHRZEUG-VORSCHAU (leistungen/fahrzeug-vorschau.html)
   Baut auf style.css auf: Farben, Buttons, Chips, Formularfelder
   ============================================================ */

.fv { padding: 3rem 0 4rem; }

.fv-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 2.75rem;
  align-items: start;
}

/* Bühne: helles „Fotostudio“, damit jede Lackfarbe vor dem dunklen Seitenhintergrund lesbar bleibt */
.fv-buehne-spalte { position: sticky; top: 6.5rem; }
.fv-buehne {
  background: radial-gradient(ellipse at 50% 30%, #f5f7fa 0%, #e2e6eb 62%, #cdd3db 100%);
  border-radius: 10px;
  padding: 1.6rem 1.2rem 0.8rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}
.fv-buehne svg { display: block; width: 100%; height: auto; }
#fv-svg .fv-lack,
#fv-svg .fv-akzent { transition: fill var(--dur) var(--ease); }
.fv-hinweis {
  margin-top: 0.9rem;
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.5;
}
.fv-hinweis-mobil { display: none; }

/* Steuerung */
.fv-steuerung { display: flex; flex-direction: column; gap: 1.7rem; }
.fv-gruppe {
  border: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}
.fv-gruppe legend {
  padding: 0;
  margin-bottom: 0.8rem;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: var(--text-light);
}
.fv-klein { font-size: 0.82rem; color: var(--text-muted); line-height: 1.5; }
.fv-label { font-size: 0.86rem; color: var(--text-light); margin-top: 0.3rem; }
.fv-regler { width: 100%; accent-color: var(--blue); }
.fv-zwei { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }

/* Farbfelder */
.fv-farben { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.fv-farben-akzent { margin-top: 0.3rem; }
.fv-farbe { position: relative; cursor: pointer; border-radius: 50%; }
.fv-farbe input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.fv-farbe > span {
  display: block;
  width: 2.3rem;
  height: 2.3rem;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
  transition: box-shadow var(--dur) var(--ease), transform var(--dur-press) ease-out;
}
.fv-farbe:active > span { transform: scale(0.94); }
.fv-farbe input:checked + span { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--blue); }
.fv-farbe input:focus-visible + span { outline: 2px solid var(--blue); outline-offset: 5px; }

/* Farbe je Feld über den Wert – Inline-Styles verbietet die Content Security Policy */
.fv-farbe input[value="#f4f5f7"] + span { background: #f4f5f7; }
.fv-farbe input[value="#c3c8cf"] + span { background: #c3c8cf; }
.fv-farbe input[value="#6b7078"] + span { background: #6b7078; }
.fv-farbe input[value="#1c1e22"] + span { background: #1c1e22; }
.fv-farbe input[value="#1d4e89"] + span { background: #1d4e89; }
.fv-farbe input[value="#b3202a"] + span { background: #b3202a; }
.fv-farbe input[value="#f2c230"] + span { background: #f2c230; }
.fv-farbe input[value="#1a8fff"] + span { background: #1a8fff; }
.fv-farbe input[value="#e63946"] + span { background: #e63946; }
.fv-farbe input[value="#f77f00"] + span { background: #f77f00; }
.fv-farbe input[value="#2a9d8f"] + span { background: #2a9d8f; }
.fv-farbe input[value="#ffd166"] + span { background: #ffd166; }

/* Eigene Farbe: Regenbogenring um den Farbwähler */
.fv-farbe-eigene {
  width: 2.3rem;
  height: 2.3rem;
  padding: 3px;
  background: conic-gradient(#e63946, #ffd166, #2a9d8f, #1a8fff, #7b2cbf, #e63946);
  transition: box-shadow var(--dur) var(--ease);
}
.fv-farbe-eigene:has(input[type="radio"]:checked) { box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--blue); }
.fv-farbe-eigene input[type="color"] {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 2px solid var(--bg);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}
.fv-farbe-eigene input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.fv-farbe-eigene input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 50%; }
.fv-farbe-eigene input[type="color"]::-moz-color-swatch { border: 0; border-radius: 50%; }
.fv-farbe-eigene input[type="color"]:focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }

/* Logo */
.fv-upload { align-self: flex-start; cursor: pointer; }
.fv-upload:focus-within { outline: 2px solid var(--blue); outline-offset: 3px; }
.fv-logo-optionen { display: flex; flex-direction: column; gap: 0.75rem; }
.fv-logo-optionen[hidden] { display: none; }
.fv-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--text-light);
  cursor: pointer;
}
.fv-check input { width: 1.05rem; height: 1.05rem; accent-color: var(--blue); }
.fv-chips-klein .chip span { padding: 0.5rem 0.9rem; font-size: 0.85rem; }

.fv-link {
  align-self: flex-start;
  padding: 0;
  border: 0;
  background: none;
  color: var(--blue);
  font: inherit;
  font-size: 0.9rem;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}
.fv-link:hover { color: #ffffff; }

/* Aktionen */
.fv-aktionen {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}
.fv-aktionen .fv-link { flex-basis: 100%; }
#fv-speichern:disabled { opacity: 0.6; cursor: progress; }

/* So geht es weiter */
.fv-ablauf { padding: 1rem 0 3rem; }
.fv-ablauf-titel {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 1.7rem;
  letter-spacing: -0.5px;
  margin-bottom: 1.4rem;
}
.fv-schritte {
  list-style: none;
  counter-reset: schritt;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.fv-schritte li {
  counter-increment: schritt;
  padding: 1.4rem 1.5rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-light);
  font-size: 0.95rem;
  line-height: 1.6;
}
.fv-schritte li::before {
  content: counter(schritt, decimal-leading-zero);
  display: block;
  margin-bottom: 0.5rem;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 1px;
  color: var(--blue);
}
.fv-schritte strong { display: block; margin-bottom: 0.2rem; color: var(--text); }

@media (max-width: 900px) {
  .fv { padding-top: 2rem; }
  .fv-grid { grid-template-columns: 1fr; gap: 1.8rem; }
  /* Vorschau bleibt beim Scrollen durch die Einstellungen oben sichtbar */
  .fv-buehne-spalte {
    top: 4rem;
    z-index: 5;
    margin: 0 -1rem;
    padding: 0.5rem 1rem 0.6rem;
    background: var(--bg);
  }
  .fv-buehne { padding: 0.9rem 0.6rem 0.4rem; }
  /* Im mitlaufenden Bereich zählt jede Zeile – der Hinweis steht mobil unter den Buttons */
  .fv-buehne-spalte .fv-hinweis { display: none; }
  .fv-hinweis-mobil { display: block; margin-top: 0; }
  .fv-schritte { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .fv-zwei { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  #fv-svg .fv-lack,
  #fv-svg .fv-akzent { transition: none; }
}
