/* FoxCave - Zusatz für Konto-, Händler-, Warenkorb- und FoxBox-Seiten.
   Baut auf fox.css auf (Tokens, .formular, .feld, .knopf, .karte, .hinweis, .daten …) und ergänzt nur, was dort fehlt. */

/* fox.css setzt display auf .hinweis/.leer/.knopf - das hidden-Attribut muss trotzdem verstecken. */
[hidden] { display: none !important; }

/* ---------- Formulare ---------- */

.formular-karte--breit { max-width: 56rem; min-width: 0; }
.formular__teil { display: grid; gap: 1.25rem; padding-top: 1.5rem; border-top: 1px solid var(--linie); }
.formular__teil > * { margin: 0; }
.formular__teil h2 { margin: 0; }
.formular__teil > p { color: var(--tinte-2); }
.knopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; }
.knopfzeile > * { margin: 0; }

.feld input[type="color"] { width: 5rem; padding: 0.35rem; cursor: pointer; }
.feld input[type="color"]::-webkit-color-swatch-wrapper { padding: 0; }
.feld input[type="color"]::-webkit-color-swatch { border: 0; border-radius: 0.6rem; }
.feld input[type="color"]::-moz-color-swatch { border: 0; border-radius: 0.6rem; }

/* ---------- Auswahl als Kacheln (Radios) ---------- */
.wahl { display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); }

.wahl__option { position: relative; display: grid; margin: 0; }
.wahl__option input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.formular .wahl__option span, .wahl__option span {
  display: grid; place-items: center; gap: 0.15rem; min-height: 50px; padding: 0.6rem 0.9rem;
  border-radius: 0.875rem; background: #fff; box-shadow: inset 0 0 0 1px var(--linie-2);
  font-size: 1rem; font-weight: 600; line-height: 1.3; text-align: center; color: var(--tinte);
  transition: background-color 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease);
}
.wahl__option:hover span { box-shadow: inset 0 0 0 1px rgba(12, 28, 48, 0.4); }
.wahl__option input:checked + span { background: var(--blau-zart); color: var(--blau-tief); box-shadow: inset 0 0 0 2px var(--blau); }
.wahl__option input:focus-visible + span { outline: 3px solid var(--blau); outline-offset: 2px; }

/* ---------- Pakete (Händler-Registrierung) ---------- */
.pakete { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12.5rem), 1fr)); }
/* Auswahl im Formular: nur der Rahmen der Option, nicht zusätzlich die Paketkarte aus fox.css */
.pakete .paket, .pakete .paket:hover { display: block; padding: 0; border-radius: 0; background: none; box-shadow: none; transform: none; }
.formular .paket span, .paket span { place-items: start; align-content: start; gap: 0.35rem; padding: 1.1rem 1.15rem; text-align: left; font-weight: 400; }
.paket__name { font-family: var(--display); font-weight: 700; font-size: 1.625rem; line-height: 1; text-transform: uppercase; }
.paket__name small { font-family: var(--schrift); font-size: 0.875rem; font-weight: 600; text-transform: none; color: var(--tinte-3); margin-left: 0.35rem; }
.paket__limit { color: var(--tinte-2); font-size: 0.875rem; }
.paket input:checked + span .paket__name small, .paket input:checked + span .paket__limit { color: var(--blau-tief); }
/* Preise noch offen: Platzhalter statt Betrag */
.paket__offen {
  display: block; width: 7.5rem; height: 0.95rem; margin: 0.2rem 0; border-radius: 999px;
  background: linear-gradient(90deg, var(--flaeche-2) 0%, #f7f9fc 45%, var(--flaeche-2) 90%); background-size: 220% 100%;
  animation: paket-schimmer 1.8s linear infinite;
}
@keyframes paket-schimmer { from { background-position: 120% 0; } to { background-position: -100% 0; } }

/* ---------- Lieferadressen ---------- */
.adressen { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }
.adressen:empty { display: none; }
.adressen li { display: flex; gap: 0.5rem; align-items: center; }
.adressen input { flex: 1; min-width: 0; }

/* ---------- Händler-Dashboard ---------- */
.aktionen { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); margin: 0 0 2.5rem; }
.aktion { display: grid; gap: 0.6rem; align-content: start; }
.aktion h2 { margin: 0; }
.aktion p { margin: 0; color: var(--tinte-2); }
.aktion .knopf { justify-self: start; margin-top: 0.4rem; }

/* ---------- Upload ---------- */
.anforderungen ul { padding-left: 1.2rem; margin: 0 0 1rem; }
.anforderungen li { margin-bottom: 0.3rem; }
.anforderungen li::marker { color: var(--blau); }
.code-zeile {
  display: block; overflow-x: auto; margin: 0.35rem 0 1rem; padding: 0.75rem 1rem; border-radius: 0.75rem;
  background: var(--tinte); color: #e7ebf0; font: 0.875rem/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre;
}
.datei-feld input[type="file"] {
  width: 100%; padding: 1.25rem; border-radius: var(--radius); cursor: pointer;
  background: var(--flaeche); box-shadow: inset 0 0 0 1.5px var(--linie-2);
}
.datei-feld input[type="file"]:hover { box-shadow: inset 0 0 0 1.5px var(--blau); }
.datei-feld input[type="file"]::file-selector-button {
  margin-right: 1rem; padding: 0.6rem 1.1rem; border: 0; border-radius: 999px;
  background: var(--tinte); color: #fff; font: 600 0.9375rem/1.2 var(--schrift); cursor: pointer;
}

/* ---------- Warenkorb ---------- */
.korb { display: grid; gap: 1.5rem; align-items: start; }
@media (min-width: 60rem) { .korb { grid-template-columns: minmax(0, 1fr) 21rem; } .korb__summe { position: sticky; top: 1.5rem; } }
.korb__liste { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; }
.korb__eintrag {
  display: grid; grid-template-columns: 4.5rem minmax(0, 1fr); gap: 0.75rem 1rem; align-items: center;
  padding: 1rem; border-radius: var(--radius); background: #fff; box-shadow: 0 0 0 1px var(--linie), var(--schatten-1);
  transition: opacity 0.3s var(--ease);
}
.korb__eintrag[aria-busy="true"] { opacity: 0.55; }
.korb__bild { display: grid; place-items: center; width: 4.5rem; height: 4.5rem; border-radius: 0.875rem; background: var(--flaeche); color: var(--tinte-3); overflow: hidden; }
.korb__bild img { width: 100%; height: 100%; object-fit: cover; }
.korb__bild .icon { width: 1.75rem; height: 1.75rem; stroke-width: 1.3; }
.korb__info { display: grid; gap: 0.2rem; min-width: 0; }
.korb__info > * { margin: 0; }
.korb__name { font-weight: 600; line-height: 1.35; overflow-wrap: anywhere; }
.korb__name a { color: var(--tinte); text-decoration: none; }
.korb__name a:hover { color: var(--blau); text-decoration: underline; }
.korb__meta { font-size: 0.875rem; color: var(--tinte-3); font-variant-numeric: tabular-nums; }
.korb__aktionen { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem 1rem; }
.korb__zeilensumme { font-family: var(--display); font-weight: 700; font-size: 1.5rem; line-height: 1; font-variant-numeric: tabular-nums; }
.korb__links { display: flex; flex-wrap: wrap; gap: 0 1rem; }
@media (min-width: 40rem) {
  .korb__eintrag { grid-template-columns: 5rem minmax(0, 1fr) auto; }
  .korb__bild { width: 5rem; height: 5rem; }
  .korb__aktionen { grid-column: auto; justify-content: flex-end; }
}
.menge { display: inline-flex; align-items: center; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px var(--linie-2); }
.menge button {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 999px;
  background: none; color: var(--tinte); font-size: 1.25rem; line-height: 1; cursor: pointer;
}
.menge button:hover { background: var(--flaeche); }
.menge button:disabled { opacity: 0.35; cursor: not-allowed; }
.menge input, .menge input:hover, .menge input:focus {
  width: 3rem; min-height: 44px; padding: 0; text-align: center; font-weight: 600; font-variant-numeric: tabular-nums;
  background: transparent; box-shadow: none; -moz-appearance: textfield; appearance: textfield;
}
.menge input::-webkit-inner-spin-button, .menge input::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.korb__gesamt { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; margin: 1rem 0 1.25rem; }
.korb__gesamt strong { font-family: var(--display); font-weight: 700; font-size: 2.25rem; line-height: 1; font-variant-numeric: tabular-nums; }
.korb__summe .knopf + .knopf { margin-top: 0.6rem; }

/* ---------- FoxBox ---------- */

.uhr {
  display: grid; gap: 0.25rem; margin: 0 0 1.5rem; padding: 1.25rem 1.5rem; border-radius: var(--radius);
  color: #fff; background: radial-gradient(70% 120% at 100% 0%, rgba(24, 110, 185, 0.45), transparent 70%), var(--tinte);
}

.schritte { display: grid; gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: schritt; }
.schritte li { counter-increment: schritt; display: grid; grid-template-columns: 2.25rem minmax(0, 1fr); gap: 0.85rem; align-items: start; color: var(--tinte-2); }
.schritte li::before {
  content: counter(schritt); display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: 50%;
  background: var(--blau-zart); color: var(--blau-tief); font-weight: 700; font-variant-numeric: tabular-nums;
}
.schritte strong { display: block; color: var(--tinte); }

.bundles { display: grid; gap: 0.75rem; margin: 0; padding: 0; list-style: none; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.bundle { display: grid; gap: 0.3rem; align-content: start; padding: 1.1rem 1.2rem; border-radius: var(--radius); background: #fff; box-shadow: 0 0 0 1px var(--linie), var(--schatten-1); }
.bundle > * { margin: 0; }

@media (prefers-reduced-motion: reduce) {
  .wahl__option span, .korb__eintrag { transition: none; }
}

/* ---------- Kunde ---------- */
.marke--aus { background: var(--warnung-zart); color: var(--warnung); }

.merken { margin: 0; }

/* ---------- Marktplatz ---------- */

/* Sofortkauf neben der FoxBox: der zweite Weg zum Kauf, ruhiger als die FoxBox */
.sofortkauf { margin-top: 0; }

.angebote tbody th[scope="row"] { width: auto; color: var(--tinte); }
.angebote__bestes td, .angebote__bestes th { background: var(--blau-zart); }
.angebote__bestes th:first-child { border-radius: 0.75rem 0 0 0.75rem; }
.angebote__bestes td:last-child { border-radius: 0 0.75rem 0.75rem 0; }
@media (min-width: 56rem) { .angebote th, .angebote td { white-space: nowrap; } }
/* Sofortkauf: Auswahl über dem Knopf, damit die Tabelle nicht breiter wird */
.angebote__kauf form { display: grid; gap: 0.4rem; }
.angebote__kauf select { min-height: 2.25rem; padding: 0.25rem 0.5rem; font-size: 0.875rem; }
@media (min-width: 56rem) { .angebote td.angebote__kauf { width: 9rem; white-space: normal; } }
@media (max-width: 55.99rem) {
  .angebote thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .angebote, .angebote tbody, .angebote tr, .angebote td, .angebote th { display: block; }
  .angebote tr { padding: 0.9rem 1rem; margin-bottom: 0.75rem; border-radius: var(--radius); background: #fff; box-shadow: 0 0 0 1px var(--linie); }
  .angebote__bestes { box-shadow: 0 0 0 2px var(--blau) !important; }
  .angebote__bestes td, .angebote__bestes th { background: none; }
  .angebote th[scope="row"] { padding: 0 0 0.5rem; border: 0; font-size: 1.0625rem; }
  .angebote td { display: flex; justify-content: space-between; gap: 1rem; padding: 0.35rem 0; border: 0; font-size: 0.9375rem; }
  .angebote td::before { content: attr(data-label); color: var(--tinte-3); }
}
.vorschlag { display: grid; gap: 0.5rem; }
.ist-gefunden { background: var(--flaeche); color: var(--tinte-2); }

/* ---------- Oeffentlich: Haendlerseite, Hilfe für Kunden, Preisalarm ---------- */
.hs-unterzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin: 0.25rem 0 0; }
.hs-status { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 600; color: var(--tinte-2); }
.hs-status::before { content: ""; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--tinte-3); }
.hs-status--offen { color: var(--erfolg); }
.hs-status--offen::before { background: var(--erfolg); box-shadow: 0 0 0 4px var(--erfolg-zart); }
.hs-status--urlaub { color: var(--warnung); }
.hs-status--urlaub::before { background: var(--warnung); }
.hs-raster { display: grid; gap: 1.25rem; align-items: start; }
@media (min-width: 56rem) { .hs-raster { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hs-karte h2 { font-size: clamp(1.375rem, 1vw + 1rem, 1.75rem); margin-bottom: 0.75rem; }
.hs-daten dt { display: inline-flex; align-items: center; gap: 0.5rem; white-space: nowrap; }
.hs-daten dt .icon { width: 1.1rem; height: 1.1rem; color: var(--blau); }
.hs-daten dd { overflow-wrap: anywhere; }
.hs-fuss { margin: 1rem 0 0; }
.hs-zeiten { margin: 0; }
.hs-zeiten tbody th[scope="row"] { width: 45%; font-weight: 500; }
.hs-zeiten__heute th, .hs-zeiten__heute td { color: var(--tinte); font-weight: 600 !important; }
.hs-zeiten__heute th[scope="row"] { box-shadow: inset 3px 0 0 var(--blau); padding-left: 0.75rem; }
.hs-angebote, .hs-impressum { margin-top: clamp(2.5rem, 5vw, 4rem); }
.hs-angebote h2, .hs-impressum h2 { font-size: clamp(1.625rem, 1.2vw + 1rem, 2.25rem); }
.hs-impressum { max-width: 40rem; }

.hilfe__themen { margin: 0 0 2rem; }
.hilfe__teil { max-width: 48rem; margin-top: clamp(2rem, 4vw, 3rem); scroll-margin-top: 1rem; }
.hilfe__teil h2 { font-size: clamp(1.5rem, 1.2vw + 1rem, 2rem); margin-bottom: 0.75rem; }
.hilfe__frage { border-bottom: 1px solid var(--linie); scroll-margin-top: 1rem; }
.hilfe__frage summary {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 52px; padding: 0.75rem 0;
  font-weight: 600; font-size: 1.0625rem; cursor: pointer; list-style: none;
}
.hilfe__frage summary::-webkit-details-marker { display: none; }
.hilfe__frage summary::after {
  content: ""; flex: none; width: 0.55rem; height: 0.55rem; margin-right: 0.25rem;
  border-right: 2px solid var(--tinte-3); border-bottom: 2px solid var(--tinte-3); transform: rotate(45deg); transition: transform 0.25s var(--ease);
}
.hilfe__frage[open] summary::after { transform: rotate(-135deg); }
.hilfe__frage summary:hover { color: var(--blau); }
.hilfe__frage .prosa { padding: 0 0 1rem; color: var(--tinte-2); }
.hilfe__frage .prosa > :last-child { margin-bottom: 0; }

@media (prefers-reduced-motion: reduce) { .hilfe__frage summary::after { transition: none; } }

/* Händler: Zubehör und Alternativen */
.hb-liste { display: grid; gap: 0.5rem; margin: 0; padding: 0; list-style: none; }

/* FoxBox-Ergebnis: Ersparnis, Wahl, Zubehör und Alternativen */

.fbx-wahl { display: grid; gap: 0.75rem; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--linie); }
.fbx-wahl p { margin: 0; font-size: 0.875rem; }

