/* TOUGHCONfigurator – Web-Fassung. Farben wie in der Windows-Anwendung (Themes\Dark.xaml, Light.xaml):
   Akzent = Flieder aus dem Toughcon-Logo, Kunststoff orange, Metall hellblau. */
html, body { margin: 0; padding: 0; background: transparent; }
body { font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, "Noto Sans", sans-serif; font-size: 15px; line-height: 1.45; }

.tcf-dark {
    --bg: #15161A; --head: #1B1C21; --panel: #1E2026; --chip: #23252C; --line: #2C2E36; --line-strong: #3A3D48;
    --text: #ECECF1; --muted: #B9BCC8; --accent: #8E8EBB; --accent-text: #111216; --accent-soft: #2C2D45; --link: #B7B7E6;
    --ok: #8FD9A8; --ok-bg: #17382A; --warn: #F2C078; --warn-bg: #3A2B14; --error: #FF9C9C;
    --tt: #F5B25C; --tt-bg: #3A2B14; --tm: #BBD9F2; --tm-bg: #14293A;
}
.tcf-light {
    --bg: #F4F4F7; --head: #FFFFFF; --panel: #FFFFFF; --chip: #EDEDF3; --line: #DDDDE6; --line-strong: #C4C4D2;
    --text: #1B1C21; --muted: #55586A; --accent: #6C6CA6; --accent-text: #FFFFFF; --accent-soft: #E6E6F4; --link: #4B4B94;
    --ok: #1E7A45; --ok-bg: #DFF3E7; --warn: #8A5A0A; --warn-bg: #FBEBD0; --error: #B3261E;
    --tt: #9A5B00; --tt-bg: #FBEBD0; --tm: #1F5A85; --tm-bg: #DCECF8;
}

.tcf { background: var(--bg); color: var(--text); padding: 0 0 12px; border-radius: 8px; }
.tcf *, .tcf *::before, .tcf *::after { box-sizing: border-box; }
.tcf h2 { font-size: 1.35rem; margin: 0 0 10px; font-weight: 600; }
.tcf h3 { font-size: 1.1rem; margin: 0 0 10px; font-weight: 600; }
.tcf h4 { font-size: 1rem; margin: 14px 0 6px; font-weight: 600; }
.tcf p { margin: 0 0 10px; }
.tcf a { color: var(--link); }

.tcf-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; background: var(--head); padding: 12px 16px; border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; }
.tcf-brand { font-weight: 700; letter-spacing: .04em; font-size: 1.15rem; }
.tcf-brand span { color: var(--accent); font-weight: 600; }
.tcf-steps { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; flex: 1 1 auto; }
.tcf-steps li { padding: 5px 10px; border-radius: 16px; background: var(--chip); color: var(--muted); font-size: .9rem; white-space: nowrap; }
.tcf-steps li.is-active { background: var(--accent); color: var(--accent-text); font-weight: 600; }
.tcf-steps li.is-done { background: var(--accent-soft); color: var(--text); }
.tcf-step-no { font-weight: 700; margin-right: 2px; }
.tcf-tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.tcf-main { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; padding: 16px; align-items: start; }
@media (max-width: 980px) { .tcf-main { grid-template-columns: minmax(0, 1fr); } }
.tcf-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tcf-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 16px; }
.tcf-loading, .tcf-fatal { padding: 28px 16px; text-align: center; color: var(--muted, #55586A); }
.tcf-progress { color: var(--muted); font-size: .85rem; margin-bottom: 4px; }
.tcf-help { color: var(--muted); }
.tcf-note { color: var(--muted); font-size: .88rem; }
.tcf-details { color: var(--muted); margin: 0 0 12px; padding-left: 20px; }
.tcf-error { color: var(--error); font-weight: 600; margin-top: 10px; }

.tcf-btn, .tcf-chip, .tcf-select, .tcf-input { font: inherit; color: var(--text); background: var(--chip); border: 1px solid var(--line-strong); border-radius: 6px; }
.tcf-btn { padding: 8px 14px; cursor: pointer; }
.tcf-btn:hover:not(:disabled), .tcf-chip:hover { border-color: var(--accent); }
.tcf-btn:disabled { opacity: .45; cursor: default; }
.tcf-btn-s { padding: 4px 10px; }
.tcf-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
.tcf-link { background: none; border: 0; padding: 0; color: var(--link); cursor: pointer; font: inherit; text-decoration: underline; }
.tcf-select { padding: 7px 8px; max-width: 100%; }
.tcf-input { padding: 8px 10px; width: 9em; }
.tcf-input-s { width: 100%; min-width: 4.5em; padding: 6px 8px; }
.tcf-input:focus, .tcf-select:focus, .tcf-btn:focus-visible, .tcf-option:focus-visible, .tcf-chip:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.tcf-options { display: flex; flex-direction: column; gap: 8px; }
.tcf-option { display: flex; flex-direction: column; gap: 2px; text-align: left; font: inherit; color: var(--text); background: var(--chip); border: 1px solid var(--line-strong); border-radius: 8px; padding: 10px 14px; cursor: pointer; }
.tcf-option:hover { border-color: var(--accent); }
.tcf-option.is-selected { border-color: var(--accent); background: var(--accent-soft); }
.tcf-option-label { font-weight: 600; }
.tcf-option-hint { color: var(--muted); font-size: .9rem; }
.tcf-badge { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; background: var(--accent-soft); color: var(--text); font-size: .78rem; font-weight: 600; vertical-align: middle; }
.tcf-badge-warn { background: var(--warn-bg); color: var(--error); }

.tcf-inputrow { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.tcf-unit, .tcf-or { color: var(--muted); }
.tcf-presets { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tcf-chip { padding: 5px 12px; border-radius: 16px; cursor: pointer; }
.tcf-chip.is-selected { background: var(--accent-soft); border-color: var(--accent); font-weight: 600; }
.tcf-chip.tcf-tt { color: var(--tt); }
.tcf-chip.tcf-tm { color: var(--tm); }
.tcf-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tcf-nav { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 16px; }

.tcf-answers { list-style: none; margin: 0; padding: 0; }
.tcf-answers li { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr) auto; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.tcf-answers li:last-child { border-bottom: 0; }
.tcf-answer-label { color: var(--muted); }

.tcf-status { display: inline-block; padding: 5px 12px; border-radius: 6px; font-weight: 600; margin-bottom: 10px; }
.tcf-status-ok { background: var(--ok-bg); color: var(--ok); }
.tcf-status-warn { background: var(--warn-bg); color: var(--warn); }
.tcf-status-none { background: var(--warn-bg); color: var(--error); }
.tcf-summary { font-weight: 600; }
.tcf-list { margin: 0; padding-left: 20px; }
.tcf-list li { margin-bottom: 5px; }
.tcf-list-error { color: var(--error); }

.tcf-totals { display: flex; flex-wrap: wrap; gap: 10px 28px; margin-bottom: 6px; }
.tcf-totals div { display: flex; flex-direction: column; }
.tcf-totals span { color: var(--muted); font-size: .85rem; }
.tcf-totals strong { font-size: 1.15rem; }
.tcf-avail-ok { color: var(--ok); }
.tcf-avail-warn { color: var(--warn); }
.tcf-avail-none { color: var(--muted); }

.tcf-tablewrap { overflow-x: auto; }
.tcf-bom, .tcf-wires { width: 100%; border-collapse: collapse; }
.tcf-bom th, .tcf-bom td, .tcf-wires th, .tcf-wires td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tcf-bom th, .tcf-wires th { color: var(--muted); font-weight: 600; font-size: .85rem; white-space: nowrap; }
.tcf-num { text-align: right !important; white-space: nowrap; }
.tcf-imgcell { width: 68px; }
.tcf-imgcell img { width: 60px; height: 60px; object-fit: contain; background: #FFFFFF; border-radius: 6px; display: block; }
.tcf-mirror { transform: scaleX(-1); }
.tcf-role { font-weight: 600; }
.tcf-reason, .tcf-wirehint td { color: var(--muted); font-size: .86rem; }
.tcf-variant { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.tcf-variant span { color: var(--muted); font-size: .88rem; }
.tcf-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding: 0 16px; color: var(--muted); font-size: .82rem; }

/* ── Stufe 2: Kopfzeile mit Logo und Sprachauswahl ── */
.tcf-logo { height: 34px; width: auto; display: block; }
.tcf-flag { display: block; border-radius: 2px; }
.tcf-flagbtn { display: inline-flex; align-items: center; gap: 4px; padding: 5px 6px; background: var(--chip); border: 1px solid var(--line-strong); border-radius: 6px; cursor: pointer; color: var(--text); font: inherit; }
.tcf-flagbtn:hover, .tcf-flagbtn.is-selected { border-color: var(--accent); }
.tcf-flagbtn.is-selected { background: var(--accent-soft); }
.tcf-globe { font-size: 1rem; line-height: 18px; }
.tcf-caret { font-size: .8rem; color: var(--muted); }
.tcf-langmenu { position: relative; }
/* Das Menü öffnet nach rechts: Die Sprachauswahl steht links in der Werkzeugzeile; nach links geöffnet würde es
   am Rand der Anwendung abgeschnitten (Rückmeldung Schlicker 24.11.2026). */
.tcf-langlist { position: absolute; left: 0; right: auto; top: calc(100% + 4px); z-index: 30; min-width: 210px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: 8px; padding: 6px; box-shadow: 0 8px 24px rgba(0, 0, 0, .35); }
.tcf-langitem { display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 8px; background: none; border: 0; border-radius: 6px; color: var(--text); font: inherit; cursor: pointer; text-align: left; }
.tcf-langitem:hover { background: var(--chip); }
.tcf-langitem.is-prominent { font-weight: 700; font-size: 1.05rem; }
.tcf-langitem.is-prominent + .tcf-langitem:not(.is-prominent) { border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; }
.tcf-checkmark { margin-left: auto; color: var(--accent); }

.tcf-helpdot { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; margin-left: 6px; border-radius: 50%; border: 1px solid var(--line-strong); background: var(--chip); color: var(--muted); font: inherit; font-size: .8rem; font-weight: 700; cursor: pointer; vertical-align: middle; }
.tcf-helpdot:hover { border-color: var(--accent); color: var(--text); }
.tcf-warntext { color: var(--warn); }
.tcf-pre-line { white-space: pre-line; }
.tcf-avail-out { color: var(--error); }

/* ── Walzen ── */
.tcf-reelhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; }
.tcf-reelhead h3, .tcf-reelhead .tcf-presets { margin-bottom: 6px; }
.tcf-reels { display: grid; grid-template-columns: repeat(var(--tcf-reel-columns, 5), minmax(0, 1fr)); gap: 10px; margin: 8px 0 10px; }
.tcf-reel { display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 8px; background: var(--chip); border: 1px solid var(--line); border-radius: 8px; border-top: 3px solid var(--line-strong); }
.tcf-reel.tcf-tt { border-top-color: var(--tt); }
.tcf-reel.tcf-tm { border-top-color: var(--tm); }
.tcf-reel-spacer { visibility: hidden; }
/* Überschrift eine Stufe kleiner, Artikelnummer zwei Stufen kleiner als der Fließtext (Vorgabe Schlicker 24.11.2026);
   lange Wörter werden getrennt statt mitten im Wort umbrochen */
.tcf-reel-caption { font-size: .74rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; hyphens: auto; overflow-wrap: break-word; }
.tcf-reel-window { display: flex; align-items: center; justify-content: center; aspect-ratio: 1 / 1; background: #FFFFFF; border-radius: 6px; overflow: hidden; animation: tcf-reel-in .45s ease-out; }
.tcf-reel-window img { width: 100%; height: 100%; object-fit: contain; }
.tcf-reel-question { font-size: 2.6rem; font-weight: 700; color: #8E8EBB; }
.tcf-reel-noimage { padding: 6px; color: #55586A; font-size: .8rem; font-weight: 600; text-align: center; overflow-wrap: anywhere; }
.tcf-reel-article { font-size: .8rem; font-weight: 700; overflow-wrap: anywhere; }
/* Artikelbezeichnung auf der Walze: eine Stufe kleiner (Vorgabe Schlicker 24.11.2026) */
.tcf-reel-title { font-size: .76rem; line-height: 1.35; hyphens: auto; overflow-wrap: break-word; }
.tcf-reel-stock { font-size: .82rem; font-weight: 600; }
.tcf-reel-pager { display: flex; align-items: center; justify-content: space-between; gap: 4px; font-size: .78rem; color: var(--muted); }
.tcf-reel-pager span { text-align: center; }
.tcf-reel .tcf-reason { white-space: pre-line; hyphens: auto; overflow-wrap: break-word; }
/* Begründung eingeklappt; ein Klick auf die Zeile klappt sie auf */
.tcf-reel-why summary { cursor: pointer; font-size: .78rem; color: var(--link); hyphens: auto; }
.tcf-reel-why[open] summary { margin-bottom: 4px; }
@keyframes tcf-reel-in { from { transform: translateY(-22%); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .tcf-reel-window { animation: none; } }
@media (max-width: 720px) {
    .tcf-reels { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tcf-reel-spacer { display: none; }
}

/* ── Ergebnis: Auswahlzeilen, Flexa-Bilder ── */
.tcf-choice { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; padding: 10px 0; border-top: 1px solid var(--line); }
.tcf-choice > div { min-width: 0; flex: 1 1 260px; }
.tcf-fleximages { display: flex; flex-wrap: wrap; gap: 12px; margin: 6px 0 10px; }
.tcf-fleximages figure { margin: 0; text-align: center; font-size: .82rem; color: var(--muted); }
.tcf-fleximages img { width: 120px; height: 120px; object-fit: contain; background: #FFFFFF; border-radius: 6px; display: block; margin-bottom: 4px; }

/* ── Dialoge: erscheinen im sichtbaren Ausschnitt des Rahmens (tcfViewport in tcf.js) ── */
.tcf-overlay { position: absolute; inset: 0; z-index: 50; background: rgba(0, 0, 0, .55); }
.tcf { position: relative; }
.tcf-modal { position: absolute; left: 50%; transform: translateX(-50%); top: calc(var(--tcf-vtop, 0px) + 12px); width: min(680px, calc(100% - 24px)); max-height: calc(var(--tcf-vh, 600px) - 24px); overflow: auto; background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: 10px; padding: 18px; box-shadow: 0 16px 48px rgba(0, 0, 0, .5); }
.tcf-modal-wide { width: min(1180px, calc(100% - 24px)); }
.tcf-actions-end { justify-content: flex-end; }
.tcf-actions a.tcf-btn { text-decoration: none; display: inline-block; color: var(--text); }
.tcf-filter { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 16px; margin: 8px 0 10px; }
.tcf-filter label { display: flex; flex-direction: column; gap: 3px; color: var(--muted); font-size: .88rem; }
.tcf-filter .tcf-check { flex-direction: row; align-items: center; gap: 6px; color: var(--text); }
.tcf-picker { display: grid; grid-template-columns: minmax(0, 3fr) minmax(200px, 1fr); gap: 14px; }
@media (max-width: 860px) { .tcf-picker { grid-template-columns: minmax(0, 1fr); } }
.tcf-picker-list { max-height: 46vh; overflow: auto; border: 1px solid var(--line); border-radius: 6px; }
.tcf-rows tbody tr { cursor: pointer; }
.tcf-rows tbody tr:hover { background: var(--chip); }
.tcf-rows tbody tr.is-selected { background: var(--accent-soft); }
.tcf-rows th { position: sticky; top: 0; background: var(--panel); }
.tcf-rows td, .tcf-rows th { font-size: .88rem; padding: 6px 8px; }
.tcf-picker-preview img, .tcf-optionhead img { max-width: 100%; width: 200px; background: #FFFFFF; border-radius: 6px; display: block; margin-bottom: 8px; }
.tcf-optionhead { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.tcf-optionhead img { width: 120px; margin-bottom: 0; }
.tcf-number-big { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: 1.35rem; font-weight: 700; color: var(--accent); overflow-wrap: anywhere; }
.tcf-helphead { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.tcf-helpbody { display: grid; grid-template-columns: minmax(180px, 1fr) minmax(0, 3fr); gap: 16px; }
@media (max-width: 760px) { .tcf-helpbody { grid-template-columns: minmax(0, 1fr); } }
.tcf-helpnav { display: flex; flex-direction: column; gap: 6px; }
.tcf-helptext p, .tcf-helptext li { color: var(--text); }
.tcf-pre { font-family: Consolas, "Cascadia Mono", Menlo, monospace; font-size: .85rem; background: var(--chip); border: 1px solid var(--line); border-radius: 6px; padding: 10px; overflow-x: auto; white-space: pre; }

/* ── Walzen in einer Flucht (Vorgabe Schlicker 24.11.2026) ──
   Nebeneinander stehende Walzen teilen sich die Zeilen des Rasters: Überschrift, Bild, Artikelnummer, Bezeichnung,
   Einzelpreis, Lagerstatus, Varianten, Begründung. Damit stehen alle Bilder einer Reihe auf gleicher Höhe, auch wenn eine
   Überschrift zweizeilig ist. Ältere Browser ohne "subgrid" halten für die Überschrift zwei Zeilen frei. */
@supports (grid-template-rows: subgrid) {
    .tcf-reel { display: grid; grid-template-rows: subgrid; grid-row: span 8; row-gap: 4px; }
    .tcf-reel > * { min-width: 0; }
    .tcf-reel-caption { grid-row: 1; align-self: end; }
    .tcf-reel-window { grid-row: 2; }
    .tcf-reel-article { grid-row: 3; }
    .tcf-reel-title { grid-row: 4; }
    .tcf-reel-price { grid-row: 5; }
    .tcf-reel-stock { grid-row: 6; }
    .tcf-reel-pager { grid-row: 7; }
    .tcf-reel-why { grid-row: 8; }
    .tcf-reel > .tcf-reason { grid-row: 3 / span 6; }
}
@supports not (grid-template-rows: subgrid) {
    .tcf-reel-caption { min-height: 2.5em; display: flex; align-items: flex-end; }
}

/* Pfeile der Variantenauswahl: klein genug, dass sie mit dem Text in die Walze passen (Vorgabe Schlicker 24.11.2026) */
.tcf-reel-pager { gap: 2px; }
.tcf-reel-pager span { flex: 1 1 auto; min-width: 0; font-size: .72rem; line-height: 1.25; }
.tcf-reel-pager .tcf-btn { flex: 0 0 auto; padding: 1px 4px; font-size: .62rem; line-height: 1.4; border-radius: 4px; }

/* Einzelpreis auf der Walze: Staffelpreis für die Bestellmenge der Position, klein (Vorgabe Schlicker 24.11.2026) */
.tcf-reel-price { font-size: .76rem; color: var(--muted); }

/* Aktueller Gesamtpreis oben rechts in der Kopfzeile, sobald es einen Vorschlag gibt (Vorgabe Schlicker 24.11.2026) */
.tcf-headtotal { display: flex; flex-direction: column; align-items: flex-end; margin-left: auto; padding: 4px 12px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent-soft); line-height: 1.2; white-space: nowrap; }
.tcf-headtotal span { font-size: .72rem; color: var(--muted); }
.tcf-headtotal strong { font-size: 1.15rem; }

/* Sicherheitshinweis in ganz kleiner Schrift, in jeder Ansicht (Vorgabe Schlicker 24.11.2026) */
.tcf .tcf-fineprint { font-size: .68rem; line-height: 1.3; color: var(--muted); margin: 6px 0 0; }
.tcf-foot .tcf-fineprint { flex-basis: 100%; margin: 0; }

/* Einzelpreis auf der Walze immer zweizeilig: Beschriftung, darunter der Betrag (Vorgabe Schlicker 24.11.2026) */
.tcf-reel-price { display: flex; flex-direction: column; line-height: 1.25; }
.tcf-reel-price span { font-size: .68rem; }
.tcf-reel-price strong { font-size: .82rem; color: var(--text); white-space: nowrap; }

/* Anzeige in Fremdwährung: Umschalter, Hinweisleiste und der Zusatz bei jeder Preisangabe */
.tcf-currencybtn { min-width: 34px; justify-content: center; font-weight: 700; font-size: .85rem; line-height: 18px; }
.tcf-currencybar { padding: 6px 16px; background: var(--warn-bg); color: var(--warn); font-size: .82rem; border-bottom: 1px solid var(--line); }
.tcf .tcf-currencynote { font-size: .7rem; line-height: 1.3; color: var(--warn); font-weight: 600; margin: 4px 0 0; }
.tcf-headtotal .tcf-currencynote { font-size: .62rem; color: var(--warn); white-space: normal; max-width: 150px; text-align: right; margin: 0; }

/* Artikelbezeichnung auf der Walze: vorgegebene Umbrüche beachten und die Zeilen gleichmäßig füllen */
.tcf-reel-title { white-space: pre-line; text-wrap: balance; }

/* ── Symbole zu Fragen und Antworten (Formen aus der Windows-Anwendung, Farben des Farbschemas) ── */
.tcf [hidden] { display: none !important; }
.tcf-symbol { flex: 0 0 auto; fill: none; stroke: var(--text); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.tcf-symbol .sym-accent { stroke: var(--accent); }
.tcf-symbol .sym-fill { fill: var(--accent); stroke: none; }
.tcf-symbol .sym-tt { stroke: var(--tt); }
.tcf-symbol .sym-tm { stroke: var(--tm); }
.tcf-symbol .sym-gold { stroke: var(--warn); }
.tcf-symbol .sym-warn { stroke: var(--error); }
.tcf-qtitle { display: flex; align-items: center; gap: 12px; }
.tcf-option-row { flex-direction: row; align-items: center; gap: 12px; }
.tcf-option-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tcf-option:disabled { opacity: .45; cursor: not-allowed; }

/* ── HV-Finder ("Spezielle Kabelanbindungen") ── */
.tcf-hv { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.tcf-hv .tcf-currencybar { margin: 0; border-radius: 6px; }
.tcf-hvhead { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 20px; }
.tcf-hvhead h2 { margin: 0; }
.tcf-hvsub { color: var(--muted); font-weight: 400; font-size: 1rem; margin-left: 6px; }
.tcf-check { display: inline-flex; align-items: center; gap: 6px; }
.tcf-tabs { display: flex; flex-wrap: wrap; gap: 6px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.tcf-tab { font: inherit; color: var(--text); background: var(--chip); border: 1px solid var(--line-strong); border-radius: 8px; padding: 7px 14px; cursor: pointer; }
.tcf-tab:hover { border-color: var(--accent); }
.tcf-tab.is-selected { background: var(--accent); border-color: var(--accent); color: var(--accent-text); font-weight: 600; }
.tcf-hvstatus { background: var(--ok-bg); color: var(--ok); border-radius: 6px; padding: 8px 12px; margin: 0; }
.tcf-hvstart { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 20px; align-items: start; }
.tcf-hvstart img { width: 100%; background: #FFFFFF; border-radius: 8px; display: block; }
.tcf-hvud { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.tcf-hvwide { grid-column: 1 / -1; }
@media (max-width: 980px) { .tcf-hvstart, .tcf-hvud { grid-template-columns: minmax(0, 1fr); } }
.tcf-hvitem { flex-direction: row; align-items: center; gap: 12px; width: 100%; margin-bottom: 6px; }
.tcf-hvitem > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tcf-hvitem img { width: 64px; height: 64px; flex: 0 0 auto; object-fit: contain; background: #FFFFFF; border-radius: 6px; }
.tcf-hvtable { max-height: 430px; overflow: auto; border: 1px solid var(--line); border-radius: 6px; margin-bottom: 12px; }
.tcf-hvtable td, .tcf-hvtable th { white-space: nowrap; height: 34px; }
.tcf-hvhint { max-width: 320px; overflow: hidden; text-overflow: ellipsis; }
.tcf-mono { font-family: Consolas, "Cascadia Mono", Menlo, monospace; }
.tcf-badge.tcf-tt { background: var(--tt-bg); color: var(--tt); }
.tcf-badge.tcf-tm { background: var(--tm-bg); color: var(--tm); }
.tcf-fc { display: inline-block; border-radius: 4px; padding: 1px 8px; border: 1px solid var(--line-strong); font-size: .85rem; }
.tcf-fc-swatch { width: 18px; height: 18px; padding: 0; vertical-align: middle; }
.tcf-hvdetail { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-start; }
.tcf-hvdetail-text { flex: 1 1 420px; min-width: 0; }
.tcf-hvhole { width: 260px; max-width: 100%; background: #FFFFFF; border-radius: 8px; }
.tcf-input-wide { min-width: 220px; }

/* ── HV-Finder: Farbcodierung der Kürzel (wie HVFinder.Farbcode der Windows-Anwendung), große Bilder, Animation ── */
.hvc { font-weight: 700; }
.hvc-metal { background: var(--tm-bg); }
.hvc-plastic { background: var(--tt-bg); }
.tcf-light .hvc-k { color: #A0A8B4; } .tcf-dark .hvc-k { color: #6A7280; }
.tcf-light .hvc-w-d, .tcf-light .hvc-w-x { color: #B8860B; } .tcf-dark .hvc-w-d, .tcf-dark .hvc-w-x { color: #E0B040; }
.tcf-light .hvc-w-st { color: #A8AEB7; font-weight: 400; } .tcf-dark .hvc-w-st { color: #6E7682; font-weight: 400; }
.tcf-light .hvc-w-pc { color: #5B6470; } .tcf-dark .hvc-w-pc { color: #C0C8D4; }
.tcf-light .hvc-w-y { color: #0E8E9A; } .tcf-dark .hvc-w-y { color: #4FD1DD; }
.tcf-light .hvc-s-x { color: #2E7D32; } .tcf-dark .hvc-s-x { color: #6FCF7A; }
.tcf-light .hvc-s-p { color: #8E44AD; } .tcf-dark .hvc-s-p { color: #C79BE8; }
.tcf-light .hvc-s-h { color: #C0392B; } .tcf-dark .hvc-s-h { color: #FF8A7A; }
.tcf-light .hvc-f-x { color: #9AA1AB; } .tcf-dark .hvc-f-x { color: #8D97A5; }
.tcf-light .hvc-f-n { color: #000000; } .tcf-dark .hvc-f-n { color: #F2F2F2; }
.tcf-light .hvc-f-a { color: #1565C0; } .tcf-dark .hvc-f-a { color: #6FA8FF; }
.tcf-hvdetailhead { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.tcf-hvbig { font-size: 1.15rem; }
.tcf-hvlegend { flex: 0 1 300px; font-size: .88rem; display: flex; flex-direction: column; gap: 2px; }
.tcf-hvlegend-title { color: var(--muted); font-weight: 600; margin-top: 7px; }
.tcf-hvlegend-title:first-child { margin-top: 0; }
.tcf-tmtext { color: var(--tm); }
.tcf-tttext { color: var(--tt); }
.tcf-zoomable { cursor: zoom-in; }
.tcf-zoom img { display: block; margin: 0 auto 12px; max-width: 100%; max-height: calc(var(--tcf-vh, 600px) - 260px); min-height: 160px; object-fit: contain; background: #FFFFFF; border-radius: 8px; }
.tcf-hvmedia video { width: 100%; background: #000000; border-radius: 8px; display: block; }
.tcf-hvmedia img { margin-bottom: 0; }
#tcf-hv-tabelle { scroll-margin-top: 110px; }

/* ── HV-Finder: zuklappbare Auswahl (Endgehäuse, Typ) und feste Angaben im Dialog ── */
.tcf-hvfold { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; cursor: pointer; }
.tcf-hvfold-mark { color: var(--link); font-size: .88rem; font-weight: 400; white-space: nowrap; }
.tcf-hvfolded .tcf-hvitem { margin-bottom: 0; }
.tcf-variant .tcf-fixedvalue { font-weight: 600; color: var(--text); font-size: 1rem; }
.tcf-variant .tcf-fixedvalue-plain { font-weight: 400; font-size: .92rem; }
/* zugeklappte Auswahl: gewähltes Endgehäuse und gewählter Typ stehen auf einer Linie und sind gleich hoch */
/* gleich hoch nur, wenn beide zugeklappt sind; neben einer offenen Liste bleibt die Wahl oben stehen */
.tcf-hvud:has(> .tcf-hvfolded + .tcf-hvfolded) { align-items: stretch; }
.tcf-hvfolded { display: flex; flex-direction: column; }
.tcf-hvfolded .tcf-reel-caption { display: none; }
.tcf-hvfolded .tcf-hvitem { flex: 1 1 auto; }
/* Bilder auf dem hellgrauen Grund der Shop-Kacheln (#F3F3F6): Helligkeit 243/255 färbt den weißen Grund und auch
   Bilder mit fest eingerechnetem Weiß (Katalogfotos, Lochbilder) gleichmäßig – ohne zweifarbige Ränder */
.tcf-imgcell img, .tcf-reel-window, .tcf-fleximages img, .tcf-picker-preview img, .tcf-optionhead img, .tcf-hvstart img, .tcf-hvitem img, .tcf-hvhole, .tcf-zoom img { filter: brightness(.953); }

/* ── Stückliste: änderbare Menge, Symbol-Schaltflächen ── */
.tcf-qty { display: inline-flex; align-items: center; gap: 4px; justify-content: flex-end; }
.tcf-input-qty { width: 5.5em; padding: 4px 6px; text-align: right; }
.tcf-icon { display: block; }
.tcf-btn-s:has(> .tcf-icon) { padding: 5px 7px; }

/* ── Adergruppen: alle Spalten passen ohne Rollbalken in die Karte ── */
.tcf-wires-fit { table-layout: fixed; }
.tcf-wires-fit th, .tcf-wires-fit td { padding: 6px 4px; }
.tcf-wires-fit th { white-space: normal; line-height: 1.2; vertical-align: bottom; }
.tcf-wires-fit .tcf-input-s { min-width: 0; padding: 6px; }
.tcf-wires-fit th:nth-child(1) { width: 15%; } .tcf-wires-fit th:nth-child(2) { width: 17%; } .tcf-wires-fit th:nth-child(3) { width: 14%; }
.tcf-wires-fit th:nth-child(4) { width: 22%; } .tcf-wires-fit th:nth-child(5) { width: 19%; } .tcf-wires-fit th:last-child { width: 42px; }
.tcf-wires-current th:nth-child(1), .tcf-wires-current th:nth-child(2), .tcf-wires-current th:nth-child(3) { width: 30%; }
.tcf-wires-fit .tcf-btn-s { padding: 4px 9px; }

/* ── Hilfe: pulsierendes Fragezeichen an der Frage, gestaltete Hilfeseite ── */
@keyframes tcf-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 70% { box-shadow: 0 0 0 9px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.tcf-question .tcf-helpdot { border-color: var(--accent); color: var(--text); animation: tcf-pulse 2.2s ease-out infinite; }
@media (prefers-reduced-motion: reduce) { .tcf-question .tcf-helpdot { animation: none; } }
.tcf-helptitle { display: flex; align-items: center; gap: 10px; margin: 0; }
.tcf-helpdialog .tcf-helpnav .tcf-option { padding: 8px 10px; }
.tcf-helphero { display: flex; align-items: center; gap: 16px; padding: 14px 16px; margin-bottom: 14px; border-radius: 10px; background: linear-gradient(135deg, var(--accent-soft), var(--chip)); border: 1px solid var(--line); }
.tcf-helphero h3 { margin: 0; font-size: 1.3rem; }
.tcf-helpsteps { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0 0 14px; padding: 0; }
.tcf-helpsteps li { flex: 1 1 110px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--chip); font-weight: 600; text-align: center; position: relative; }
.tcf-helpsteps li:not(:last-child)::after { content: "›"; position: absolute; right: -9px; top: 50%; transform: translateY(-50%); color: var(--accent); font-size: 1.4rem; z-index: 1; }
.tcf-helpsteps .tcf-step-no { display: inline-flex; align-items: center; justify-content: center; width: 22px; height: 22px; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-size: .8rem; }
.tcf-helpfigure { margin: 0 0 14px; }
.tcf-helpfigure img { width: 100%; background: #FFFFFF; border-radius: 10px; display: block; filter: brightness(.953); }
.tcf-helpfigure figcaption { color: var(--muted); font-size: .88rem; margin-top: 6px; text-align: center; }
.tcf-helpblock { border-left: 3px solid var(--accent); background: var(--chip); border-radius: 0 8px 8px 0; padding: 10px 14px; margin-bottom: 10px; }
.tcf-helpblock h4 { margin: 0 0 6px; color: var(--link); }
.tcf-helpblock p:last-child { margin-bottom: 0; }
.tcf-helplist { list-style: none; margin: 0; padding: 0; }
.tcf-helplist li { position: relative; padding-left: 22px; margin-bottom: 6px; }
.tcf-helplist li::before { content: ""; position: absolute; left: 4px; top: .5em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.tcf-helptable { width: auto; min-width: 50%; background: var(--panel); border-radius: 6px; }
.tcf-helptable td, .tcf-helptable th { padding: 5px 12px; white-space: nowrap; }

/* Abweichung von der Vorgabe des Kunden: deutlich rot */
.tcf-deviation { color: var(--error); font-weight: 600; font-size: .9rem; margin: 4px 0; }
.tcf-list .tcf-deviation { font-size: inherit; }

/* Meldung zur Übergabe in den Warenkorb */
.tcf-cartnote { font-weight: 600; }

/* ── Mobilgeräte (schmale Bildschirme): weniger Rand, größere Tippflächen, Stückliste als Karten ── */
@media (max-width: 640px) {
    .tcf { border-radius: 0; }
    .tcf-head { padding: 10px; gap: 8px 10px; border-radius: 0; }
    .tcf-logo { height: 28px; }
    /* Schritte in einer Zeile, seitlich wischbar */
    .tcf-steps { flex: 1 1 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .tcf-steps::-webkit-scrollbar { display: none; }
    .tcf-steps li { font-size: .82rem; padding: 6px 10px; }
    .tcf-tools { gap: 6px; width: 100%; }
    .tcf-tools .tcf-btn { flex: 1 1 auto; }
    .tcf-main { padding: 10px; gap: 12px; }
    .tcf-card { padding: 12px; }

    /* Tippflächen: mindestens rund 40 Pixel hoch */
    .tcf-btn, .tcf-tab, .tcf-chip { min-height: 42px; }
    .tcf-btn-s { min-height: 38px; min-width: 38px; }
    .tcf-reel-pager .tcf-btn { min-height: 32px; min-width: 32px; font-size: .8rem; }
    .tcf-flagbtn { min-height: 40px; min-width: 44px; justify-content: center; }
    .tcf-helpdot { width: 30px; height: 30px; }
    .tcf-link { padding: 8px 0; }
    /* unter 16 Pixel Schriftgröße vergrößert iOS die ganze Seite, sobald ein Feld angetippt wird */
    .tcf input, .tcf select, .tcf textarea { font-size: 16px; }
    .tcf-input, .tcf-select { min-height: 42px; }
    .tcf-filter label { flex: 1 1 100%; min-width: 0; }
    .tcf-filter .tcf-select, .tcf-filter .tcf-input { width: 100%; max-width: 100%; }
    .tcf-actions .tcf-btn { flex: 1 1 auto; }
    .tcf-actions .tcf-primary { flex: 1 1 100%; }
    .tcf-totals { gap: 8px 20px; }

    /* Ihre Angaben: Bezeichnung über dem Wert */
    .tcf-answers li { grid-template-columns: minmax(0, 1fr) auto; gap: 0 8px; align-items: center; }
    .tcf-answers li > :first-child { grid-column: 1 / -1; color: var(--muted); font-size: .82rem; }

    /* Walzen: eine Reihe zum Wischen statt vieler Zeilen */
    .tcf-reels { display: flex; align-items: flex-start; overflow-x: auto; scroll-snap-type: x proximity; gap: 10px; padding-bottom: 8px; -webkit-overflow-scrolling: touch; }
    .tcf-reel { display: flex; flex-direction: column; flex: 0 0 60%; scroll-snap-align: start; }
    .tcf-reel-spacer { display: none; }

    /* Stückliste: jede Position als Karte statt einer breiten Tabelle */
    .tcf-tablewrap:has(> .tcf-bom-cards) { overflow-x: visible; }
    .tcf-bom-cards, .tcf-bom-cards tbody { display: block; }
    .tcf-bom-cards thead { display: none; }
    .tcf-bom-cards tr { display: grid; grid-template-columns: 60px minmax(0, 1fr) minmax(0, 1fr) 40px; gap: 8px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); }
    .tcf-bom-cards td { display: block; padding: 0; border: 0; text-align: left; min-width: 0; width: auto; }
    /* Reihenfolge je Karte: Bild | Rolle | Papierkorb, Artikel, Abweichung und Begründung über die ganze Breite,
       dann Menge | Lager und Einzelpreis | Gesamtpreis. Die Zelle „Position“ löst sich dafür in ihre Zeilen auf. */
    .tcf-bom-cards td:nth-child(1) { grid-column: 1; grid-row: span 2; order: 0; }
    .tcf-bom-cards td:nth-child(2) { display: contents; }
    .tcf-bom-cards td:nth-child(2) > * { grid-column: 1 / -1; order: 5; min-width: 0; }
    .tcf-bom-cards td:nth-child(2) > .tcf-role { grid-column: 2 / 4; order: 1; }
    .tcf-bom-cards td:nth-child(7) { grid-column: 4; grid-row: span 2; order: 2; }
    .tcf-bom-cards td:nth-child(2) > .tcf-article { grid-column: 2 / 4; order: 3; }
    .tcf-bom-cards td:nth-child(2) > .tcf-deviation { order: 4; }
    .tcf-bom-cards td:nth-child(3) { grid-column: 1 / 3; order: 6; }
    .tcf-bom-cards td:nth-child(6) { grid-column: 3 / 5; order: 7; }
    .tcf-bom-cards td:nth-child(4) { grid-column: 1 / 3; order: 8; }
    .tcf-bom-cards td:nth-child(5) { grid-column: 3 / 5; order: 9; }
    .tcf-bom-cards td.tcf-num { text-align: left !important; white-space: normal; }
    .tcf-bom-cards td[data-label]::before { content: attr(data-label); display: block; font-size: .74rem; font-weight: 600; color: var(--muted); }
    .tcf-bom-cards .tcf-qty { justify-content: flex-start; }
    .tcf-bom-cards .tcf-input-qty { width: 6.5em; text-align: left; }

    /* Dialoge und Reiter */
    .tcf-modal, .tcf-modal-wide { width: calc(100% - 12px); top: calc(var(--tcf-vtop, 0px) + 6px); max-height: calc(var(--tcf-vh, 600px) - 12px); }
    .tcf-tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
    .tcf-tabs::-webkit-scrollbar { display: none; }
    .tcf-tab { flex: 0 0 auto; white-space: nowrap; }
}

/* Zeile „Frage x von y“: rechts die beiden kleinen Pfeile zum Blättern (vorher große Schaltflächen unter der Frage) */
.tcf-progress { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tcf-stepnav { display: inline-flex; gap: 6px; flex: 0 0 auto; }
.tcf-arrow { padding: 4px 9px; min-height: 0; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
.tcf-arrow svg { width: 14px; height: 14px; display: block; }
.tcf-arrow:disabled { opacity: .35; cursor: default; }
@media (max-width: 640px) { .tcf-arrow { min-height: 38px; min-width: 42px; } .tcf-arrow svg { width: 16px; height: 16px; } }

/* Eingebettet: Der Rahmen ist immer so hoch wie der Inhalt (tcf.js meldet die Höhe). Ohne diese Regel blitzt beim
   Wechsel zu einer längeren Frage für einen Augenblick ein Rollbalken auf, der Inhalt wird schmaler und die Seite zuckt. */
html.tcf-framed, html.tcf-framed body { overflow: hidden; }

/* Eingebettet in die Website: Die Sprache wählt man im Seitenkopf der Website (Sprachwahl für die ganze Seite);
   die eigene Sprachwahl der Anwendung erscheint nur noch, wenn sie für sich allein aufgerufen wird. */
html.tcf-framed .tcf-head .tcf-flagbtn:not(.tcf-currencybtn), html.tcf-framed .tcf-head .tcf-langmenu { display: none; }

/* Fußzeile: drei Zeilen mittig über die ganze Breite, einheitlich in der kleinen Schrift der Hinweise */
.tcf-foot { flex-direction: column; flex-wrap: nowrap; align-items: center; justify-content: flex-start; gap: 2px; text-align: center; font-size: .68rem; line-height: 1.3; }
.tcf-foot .tcf-fineprint { flex-basis: auto; }

/* Gesamtpreis: immer oben rechts in der Kopfzeile, sobald es eine Lösung gibt, und deutlich größer */
.tcf-head { position: relative; }
.tcf-headtotal { position: absolute; top: 6px; right: 12px; margin: 0; padding: 4px 14px; }
.tcf-headtotal span { font-size: .78rem; }
.tcf-headtotal strong { font-size: 1.6rem; line-height: 1.15; }
.tcf-head:has(.tcf-headtotal) { padding-right: 210px; min-height: 68px; }
@media (max-width: 640px) {
    /* schmale Bildschirme: eine Zeile neben dem Logo, die Schritte beginnen darunter */
    .tcf-head:has(.tcf-headtotal) { padding-right: 10px; min-height: 0; }
    .tcf-headtotal { top: 6px; right: 8px; flex-direction: row; align-items: baseline; gap: 8px; padding: 3px 10px; }
    .tcf-headtotal strong { font-size: 1.3rem; }
    .tcf-headtotal .tcf-currencynote { display: none; }
    .tcf-head:has(.tcf-headtotal) .tcf-logo { margin: 4px 0 6px; }
}

/* Gesamtpreis unter der Stückliste: rechtsbündig und groß */
.tcf-totals-end { justify-content: flex-end; margin: 14px 0 2px; text-align: right; }
.tcf-totals-end div { align-items: flex-end; }
.tcf-totals-end strong { font-size: 1.5rem; }
.tcf-totals-note { text-align: right; }

/* Kopfzeile: „Spezielle Kabelanbindungen“ in eigener Farbe (Bernstein statt Flieder), Hilfe mit Symbol,
   helle/dunkle Ansicht als Schieber */
.tcf-btn-special { background: var(--tt-bg); border-color: var(--tt); color: var(--tt); font-weight: 600; }
.tcf-btn-special:hover:not(:disabled), .tcf-btn-special.is-on { background: var(--tt); color: var(--tt-bg); }
.tcf-btn-help { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tcf-btn-icon { width: 18px; height: 18px; display: block; flex: 0 0 auto; }
.tcf-switch { display: inline-flex; align-items: center; gap: 6px; padding: 4px 6px; background: none; border: 0; color: var(--muted); cursor: pointer; font: inherit; }
.tcf-switch-icon { display: inline-flex; }
.tcf-switch-icon svg { width: 17px; height: 17px; display: block; }
.tcf-switch-track { position: relative; width: 42px; height: 22px; border-radius: 11px; background: var(--chip); border: 1px solid var(--line-strong); transition: background .15s ease; }
.tcf-switch-knob { position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: var(--text); transition: transform .15s ease; }
.tcf-switch.is-on .tcf-switch-track { background: var(--accent); border-color: var(--accent); }
.tcf-switch.is-on .tcf-switch-knob { transform: translateX(20px); background: var(--accent-text); }
.tcf-switch:not(.is-on) .tcf-switch-sun, .tcf-switch.is-on .tcf-switch-moon { color: var(--text); }
.tcf-switch:focus-visible .tcf-switch-track { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) { .tcf-switch { min-height: 42px; } }

/* Kopfzeile neu geordnet: oben Logo, Schritte, Ansicht/Hilfe/Neu beginnen und rechts der Gesamtpreis mit dem
   Währungswechsel darunter; in der zweiten Zeile „Spezielle Kabelanbindungen“ */
.tcf-tools-top { margin-left: auto; flex: 0 0 auto; flex-wrap: nowrap; gap: 6px; }
.tcf-tools-row { flex: 1 1 100%; }
.tcf-btn-restart { display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.tcf-head:has(.tcf-headtotal) { min-height: 86px; }
.tcf-currencylink { margin-top: 2px; padding: 0; background: none; border: 0; color: var(--link); font: inherit; font-size: .8rem; font-weight: 600; cursor: pointer; text-decoration: underline; white-space: nowrap; }
.tcf-currencylink:hover, .tcf-currencylink:focus-visible { color: var(--text); outline: none; }
/* mittlere Breiten: Hilfe und Neu beginnen nur als Symbol, Schritte etwas kleiner – so passt alles in eine Zeile */
@media (min-width: 641px) and (max-width: 1180px) {
    .tcf-tools-top .tcf-btn-help span, .tcf-tools-top .tcf-btn-restart span { display: none; }
    .tcf-tools-top .tcf-btn { padding: 8px 10px; }
    .tcf-steps { gap: 4px; }
    .tcf-steps li { font-size: .82rem; padding: 5px 8px; }
    .tcf-head { gap: 10px 12px; }
}
@media (max-width: 640px) {
    .tcf-tools-top { width: 100%; margin-left: 0; }
    .tcf-tools-top .tcf-btn { flex: 1 1 auto; }
    .tcf-headtotal .tcf-currencylink { margin-top: 0; }
}

/* Handy: Gesamtpreis ohne Beschriftung rechts neben dem Logo (nicht mehr darüber gelegt), Schaltflächen einzeilig */
@media (max-width: 640px) {
    .tcf-logo { order: 0; }
    .tcf-headtotal { position: static; order: 1; margin-left: auto; padding: 3px 8px; gap: 8px; }
    .tcf-headtotal > span:first-child { display: none; }
    .tcf-steps { order: 2; }
    .tcf-tools-top { order: 3; }
    .tcf-tools-row { order: 4; }
    .tcf-tools-top .tcf-btn { white-space: nowrap; padding: 8px 10px; }
}

/* Kopfzeile platzsparend: „Reset“ in Rot und immer mit Wort, „Spezielle Kabelanbindungen“ mit engem Rahmen,
   weniger Luft zwischen und um die beiden Zeilen */
.tcf-btn-reset { color: var(--error); border-color: var(--error); font-weight: 600; }
.tcf-btn-reset:hover:not(:disabled) { background: var(--error); color: var(--head); }
.tcf-head { padding-top: 8px; padding-bottom: 8px; row-gap: 6px; }
.tcf-tools-row .tcf-btn-special { padding: 3px 10px; font-size: .86rem; min-height: 0; }
.tcf-tools-top .tcf-btn { padding: 6px 10px; }
.tcf-headtotal { top: 4px; padding: 2px 12px 3px; }
.tcf-headtotal strong { font-size: 1.5rem; }
.tcf-head:has(.tcf-headtotal) { min-height: 78px; }
@media (min-width: 641px) and (max-width: 1180px) { .tcf-tools-top .tcf-btn-reset span { display: inline; } }
@media (max-width: 640px) { .tcf-tools-row .tcf-btn-special { padding: 6px 10px; min-height: 36px; } .tcf-head:has(.tcf-headtotal) { min-height: 0; } }

/* Oberste Zeile bleibt eine Zeile: Die Schritte nehmen den Platz, der übrig bleibt, und erzwingen keinen Umbruch;
   rechts wird nur so viel frei gehalten, wie der Gesamtpreis-Kasten braucht */
.tcf-head:has(.tcf-headtotal) { padding-right: 200px; }
/* der Vorbehalt bei Fremdwährung steht in der Leiste direkt unter der Kopfzeile – im Kasten wäre er zu hoch */
.tcf-headtotal .tcf-currencynote { display: none; }
.tcf-steps { flex: 1 1 200px; min-width: 0; flex-wrap: nowrap; overflow: hidden; }
@media (min-width: 641px) and (max-width: 1180px) { .tcf-steps li { font-size: .8rem; padding: 4px 7px; } }
@media (max-width: 640px) { .tcf-head:has(.tcf-headtotal) { padding-right: 10px; } .tcf-steps { flex: 1 1 100%; overflow-x: auto; } }

/* Rückfrage vor dem Leeren des Warenkorbs */
.tcf-cartask { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-weight: 600; color: var(--error); }
