/* Einstreu B2B-Anfrageformular [esb2b_anfrage].
   Container Queries, opake Karten (kein transluzentes RGBA), color-scheme:light
   (Dark-Popup-Fix), Markenfarben Sand/Anthrazit/Off-White, kompakte Erfolgsbox. */

.esb2b {
    --esb2b-sand: #CA8F65;
    --esb2b-anthrazit: #282828;
    --esb2b-offwhite: #FAF6F2;
    --esb2b-sand-dark: #b57a52;
    --esb2b-border: #e4d8cd;
    --esb2b-err: #b3261e;

    color-scheme: light;
    container-type: inline-size;
    max-width: 760px;
    margin: 0 auto;
    color: var(--esb2b-anthrazit);
    font-size: 16px;
    line-height: 1.5;
}
.esb2b * { box-sizing: border-box; }
.esb2b [hidden] { display: none !important; }

.esb2b-form,
.esb2b-success {
    background: var(--esb2b-offwhite);
    border: 1px solid var(--esb2b-border);
    border-radius: 14px;
    padding: 22px;
}

.esb2b-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Fortschritt */
/* v0.20.4: Rücksetzung auch auf der <li> — dieselbe Lücke wie bei den Chips. Hier fiel sie nur
   nicht auf, weil display:flex auf der <li> die Markerbox ohnehin unterdrückt; das ist Zufall
   und keine Absicherung. */
.esb2b-progress,
.esb2b-progress li { list-style: none; margin: 0; padding: 0; }
.esb2b-progress { display: flex; gap: 8px; margin: 0 0 18px; flex-wrap: wrap; }
.esb2b-progress li { display: flex; align-items: center; gap: 6px; color: #9b8b7c; font-size: 13px; }
.esb2b-progress li span { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: #ece1d6; color: #7a6a5c; font-size: 12px; }
.esb2b-progress li.active { color: var(--esb2b-anthrazit); }
.esb2b-progress li.active span { background: var(--esb2b-sand); color: #fff; }

.esb2b-step { display: none; }
.esb2b-step.active { display: block; }
.esb2b-steptitle { margin: 0 0 14px; font-size: 19px; }

.esb2b-field { margin: 0 0 16px; }
.esb2b-field > label,
.esb2b-field > legend { display: block; font-weight: 600; margin-bottom: 6px; }
.esb2b-field .req { color: var(--esb2b-sand-dark); }
.esb2b-help { font-size: 13px; color: #6f6257; margin: 6px 0 0; }
.esb2b-mindest:empty { display: none; }

.esb2b-form input[type="text"],
.esb2b-form input[type="email"],
.esb2b-form input[type="tel"],
.esb2b-form input[type="number"],
.esb2b-form input[type="search"],
.esb2b-form input[type="date"],
.esb2b-form textarea,
.esb2b-form select {
    width: 100%;
    padding: 11px 12px;
    border: 1px solid var(--esb2b-border);
    border-radius: 9px;
    background: #fff;
    color: var(--esb2b-anthrazit);
    font-size: 16px;
}

/* Dark-Mode-Fix (aus dem Händler-Kabinett übernommen, dort live verifiziert): die native
   Aufklappliste zeichnet das OS – dafür zählt color-scheme AM ELEMENT, nicht die Vererbung
   vom Wrapper. Deshalb hier ausnahmsweise !important, das Theme-/UA-Deklarationen schlägt.
   AUSSCHLIESSLICH für color-scheme erlaubt (verschiebt nichts); alle anderen Regeln ohne.
   Auf BEIDE Wrapper gescoped (.esb2b = äußerer Wrapper auf /b2b, .esb2b-form = das Formular),
   damit die Regel unabhängig vom Wrapper greift. */
.esb2b,
.esb2b-form,
.esb2b select,
.esb2b option,
.esb2b optgroup,
.esb2b input,
.esb2b textarea,
.esb2b-form select,
.esb2b-form option,
.esb2b-form optgroup,
.esb2b-form input,
.esb2b-form textarea {
    color-scheme: light !important;
}

/* Dark-Mode-Härtung (BeTheme/Windows): zusätzlich explizite, OPAKE Farben auf JEDEM Feldtyp –
   sonst rendern Verpackung/Wunschtermin schwarz auf schwarz. Beide Scopes (.esb2b und .esb2b-form).
   Live nachgemessen: Auswahl + Fokus = rgb(250,246,242) Hintergrund, rgb(40,40,40) Text. */
.esb2b select,
.esb2b option,
.esb2b optgroup,
.esb2b input,
.esb2b textarea,
.esb2b-form select,
.esb2b-form option,
.esb2b-form optgroup,
.esb2b-form input,
.esb2b-form textarea {
    color-scheme: light;
    background-color: #fff;
    color: var(--esb2b-anthrazit);
}
.esb2b select:checked,
.esb2b option:checked,
.esb2b option:hover,
.esb2b-form select:checked,
.esb2b-form option:checked,
.esb2b-form option:hover { background-color: var(--esb2b-offwhite); color: var(--esb2b-anthrazit); }
.esb2b ::placeholder,
.esb2b-form ::placeholder { color: #9b8b7c; opacity: 1; }

.esb2b input:focus,
.esb2b textarea:focus,
.esb2b select:focus,
.esb2b-form input:focus,
.esb2b-form textarea:focus,
.esb2b-form select:focus { outline: 2px solid var(--esb2b-sand); border-color: var(--esb2b-sand); }

/* Dark-Mode: GESCHLOSSENES select im FOKUS. Chrome malt hier einen INTERNEN dunklen
   Hintergrund (nicht das option-Element – das ist seit 0.12.5 ok), während color bei
   rgb(40,40,40) bleibt → schwarz auf schwarz. Dagegen hilft nur eine background-color am
   Fokuszustand mit !important (kein Autoren-CSS setzt diesen internen Wert). -webkit-text-fill-color
   überstimmt zusätzlich Chromes interne Textfarbe. Live verifiziert; Regressionstest gesichert. */
.esb2b select:focus,
.esb2b select:focus-visible,
.esb2b input:focus,
.esb2b textarea:focus,
.esb2b-form select:focus,
.esb2b-form select:focus-visible,
.esb2b-form input:focus,
.esb2b-form textarea:focus {
    background-color: #FAF6F2 !important;
    color: #282828 !important;
    -webkit-text-fill-color: #282828 !important;
}

fieldset.esb2b-field { border: 1px solid var(--esb2b-border); border-radius: 10px; padding: 12px 14px; background: #fff; }
.esb2b-radio, .esb2b-check { display: block; font-weight: 400; margin: 6px 0; }
.esb2b-consent a { color: var(--esb2b-sand-dark); }

.esb2b-inline { display: grid; gap: 12px; }
@container (min-width: 560px) { .esb2b-inline { grid-template-columns: 1fr 1fr; } .esb2b-plzort { grid-template-columns: 120px 1fr 90px; } }
.esb2b-inline.esb2b-plzort { grid-template-columns: 1fr; }

.esb2b-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; }
.esb2b-btn {
    background: var(--esb2b-sand); color: #fff; border: 0; border-radius: 10px;
    padding: 12px 22px; font-weight: 700; font-size: 16px; min-height: 48px; cursor: pointer;
}
.esb2b-btn.esb2b-prev { background: #ece1d6; color: var(--esb2b-anthrazit); }
.esb2b-btn:hover { background: var(--esb2b-sand-dark); }
.esb2b-btn.esb2b-prev:hover { background: #e0d2c4; }

.esb2b-field.has-error input,
.esb2b-field.has-error select,
.esb2b-field.has-error { }
.esb2b-field.has-error input,
.esb2b-field.has-error select { border-color: var(--esb2b-err); }
.esb2b-err { color: var(--esb2b-err); font-size: 13px; margin-top: 5px; }
.esb2b-errorsummary { color: var(--esb2b-err); background: #fbe9e7; border: 1px solid #f3c9c4; border-radius: 9px; padding: 10px 12px; margin-bottom: 14px; }

.esb2b-hint { font-size: 13px; color: #6f6257; margin: 4px 0 12px; }

/* Kompakte Erfolgsbox */
.esb2b-success {
    display: flex; align-items: center; gap: 12px;
    max-width: 640px; margin: 0 auto; font-size: 16px;
    color: var(--esb2b-anthrazit); /* explizit, sonst im Dark-Mode unlesbar */
}
.esb2b-success:focus { outline: none; }

/* Sortiment-Chips [esb2b_sortiment_chips] — Schnellauswahl, verlinkt aufs Anfrageformular
   (?esb2b_produkt=ID#anfrage). Nutzt dieselben Marken-Tokens + color-scheme:light des .esb2b-Wrappers. */
.esb2b-chips-wrap { container-type: inline-size; }
/*
 * v0.20.4 — Aufzählungspunkte vor den Chips (live auf /b2b gemessen).
 *
 * Die Rücksetzung stand bis hierher NUR auf dem <ul>. BeTheme setzt list-style aber auch auf die
 * <li> im Inhaltsbereich, und eine Regel AM ELEMENT schlägt die Vererbung vom Elternteil — der
 * Marker kam also von der <li>, nicht vom <ul>. Dazu blieben die <li> bei display:list-item und
 * fügten sich nicht in die Flex-Reihe ein.
 *
 * Gemessen ohne Fix:  UL list-style=disc · LI display=list-item
 * Gemessen mit Fix:   list-style=none · Kacheln sauber in einer Reihe
 *
 * REGEL FÜR ALLE EIGENEN LISTEN: list-style/margin/padding IMMER auf BEIDEN Ebenen zurücksetzen
 * (Container UND li). Ohne !important — die Klassenselektoren genügen, wie live bestätigt.
 */
.esb2b-chips,
.esb2b-chips li {
    list-style: none;
    margin: 0;
    padding: 0;
}
.esb2b-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}
.esb2b-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 16px; border-radius: 999px;
    background: #fff; border: 1px solid var(--esb2b-border);
    color: var(--esb2b-anthrazit); font-size: 15px; font-weight: 600; line-height: 1.3;
    text-decoration: none; cursor: pointer;
    transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.esb2b-chip:hover,
.esb2b-chip:focus-visible { background-color: var(--esb2b-sand); border-color: var(--esb2b-sand-dark); color: #fff; }
.esb2b-chip:focus-visible { outline: 2px solid var(--esb2b-sand-dark); outline-offset: 2px; }
.esb2b-chips-hinweis { margin: 10px 0 0; font-size: 13px; color: #6f6257; }
/* schmaler Container (z. B. Sidebar): Chips als volle Zeilen, leichter zu treffen */
@container (max-width: 380px) {
    .esb2b-chips { gap: 8px; }
    .esb2b-chip { width: 100%; justify-content: center; }
}

/* Preisorientierung [esb2b_preisorientierung] — Verkaufs-Richtwerte (netto je Ladeeinheit).
   Gleiche Marken-Tokens + color-scheme:light des .esb2b-Wrappers; keine externen Abhängigkeiten. */
.esb2b-preise { container-type: inline-size; }
.esb2b-preise-tabelle { width: 100%; border-collapse: collapse; background: var(--esb2b-offwhite); border: 1px solid var(--esb2b-border); border-radius: 14px; overflow: hidden; }
.esb2b-preise-tabelle th,
.esb2b-preise-tabelle td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--esb2b-border); color: var(--esb2b-anthrazit); font-size: 15px; }
.esb2b-preise-tabelle thead th { background: var(--esb2b-sand); color: #fff; font-weight: 600; }
.esb2b-preise-tabelle tbody tr:last-child td { border-bottom: 0; }
.esb2b-preise-tabelle .esb2b-preise-wert { text-align: right; white-space: nowrap; font-weight: 600; }
.esb2b-preise-anfrage { font-weight: 400; color: #6f6257; }
.esb2b-preise-fuss,
.esb2b-preise-text { font-size: 13px; color: #6f6257; margin: 10px 0 0; }
.esb2b-preise--leer .esb2b-preise-text { font-size: 15px; color: var(--esb2b-anthrazit); }
.esb2b-preise-btn { display: inline-block; margin-top: 12px; }
/* Button typisiert wie im Formular (Sand → dunkler Sand beim Hover), kein Formular-Nesting */
.esb2b-preise .esb2b-btn { background: var(--esb2b-sand); color: #fff; border: 0; border-radius: 9px; padding: 11px 20px; font-size: 15px; font-weight: 600; text-decoration: none; cursor: pointer; }
.esb2b-preise .esb2b-btn:hover,
.esb2b-preise .esb2b-btn:focus-visible { background: var(--esb2b-sand-dark); }
.esb2b-preise .esb2b-btn:focus-visible { outline: 2px solid var(--esb2b-sand-dark); outline-offset: 2px; }
@container (max-width: 420px) {
    .esb2b-preise-tabelle th,
    .esb2b-preise-tabelle td { padding: 10px; font-size: 14px; }
    .esb2b-preise-btn { width: 100%; text-align: center; }
}

/* ==========================================================================
   v0.20.2 — Mengenauswahl in LKW-Ladungen mit Tonnage daneben (§4)

   Der Einkäufer denkt in Tonnen, gerechnet wird in Ladungen. Beides steht
   deshalb in derselben Zeile: die Wahl links, die Tonnage rechts, ruhig und
   ohne Konkurrenz zur Beschriftung.
   ========================================================================== */
.esb2b-menge .esb2b-radio {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.esb2b-menge .esb2b-menge-label { flex: 0 0 auto; }
.esb2b-tonnage {
    margin-left: auto;
    color: #6b6b6b;
    font-size: 14px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.esb2b-shophinweis { margin-top: 10px; }
.esb2b-shophinweis a { color: #CA8F65; }

/* Merkmalsfelder werden per JS erzeugt und brauchen denselben Abstand wie die fest
   ausgelieferten Felder — sonst klebt die Verpackungsauswahl am Hilfetext darüber. */
.esb2b-merkmale .esb2b-field { margin-bottom: 16px; }

@container (max-width: 420px) {
    .esb2b-tonnage { margin-left: 0; flex-basis: 100%; }
}

/* ==========================================================================
   v0.20.5 — Sortiment als Tabelle (Alternative zu den Kacheln)

   Echtes Tabellen-Markup: Fünf Zeilen sagen mehr als elf Kacheln, und
   Suchsysteme lesen eine Tabelle mit Kopfzeile zuverlässiger aus.

   Wie bei den Chips gilt: eigene Rücksetzungen, damit das Theme die Tabelle
   nicht mit eigenen Rahmen und Abständen überschreibt.
   ========================================================================== */
.esb2b-sortiment-wrap { container-type: inline-size; overflow-x: auto; }
.esb2b-sortiment {
    width: 100%;
    border-collapse: collapse;
    margin: 0;
    font-size: 15px;
    background: transparent;
}
/* Eigene Screenreader-Klasse: Die Tabellenbeschriftung darf NICHT vom Theme abhängen —
   fehlt dort `screen-reader-text`, stünde sie sichtbar über der Tabelle. */
.esb2b .esb2b-sr {
    position: absolute;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}
.esb2b-sortiment caption { text-align: left; }
.esb2b-sortiment th,
.esb2b-sortiment td {
    padding: 10px 12px;
    text-align: left;
    vertical-align: top;
    border: 0;
    border-bottom: 1px solid #ece1d6;
}
.esb2b-sortiment thead th {
    font-weight: 600;
    color: #6f6257;
    font-size: 13px;
    letter-spacing: .02em;
    text-transform: uppercase;
    border-bottom: 2px solid #ece1d6;
}
.esb2b-sortiment tbody th { font-weight: 600; }
.esb2b-sortiment tbody th a { color: var(--esb2b-anthrazit); text-decoration: none; border-bottom: 1px solid var(--esb2b-sand); }
.esb2b-sortiment tbody th a:hover,
.esb2b-sortiment tbody th a:focus { color: var(--esb2b-sand); }
.esb2b-sortiment tbody tr:last-child th,
.esb2b-sortiment tbody tr:last-child td { border-bottom: 0; }
.esb2b-leer { color: #9b8b7c; }

/* Schmale Container: Kopfzeile ausblenden, jede Zeile als kleiner Block mit
   vorangestellter Beschriftung — sonst müsste seitlich gescrollt werden. */
@container (max-width: 520px) {
    .esb2b-sortiment thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
    .esb2b-sortiment tbody tr { display: block; padding: 10px 0; border-bottom: 1px solid #ece1d6; }
    .esb2b-sortiment tbody th,
    .esb2b-sortiment tbody td { display: block; padding: 2px 0; border: 0; }
    .esb2b-sortiment tbody td::before {
        content: attr(data-label) ": ";
        color: #6f6257;
        font-size: 13px;
    }
}
