/*
 * ============================================================
 * HEATPROTECTION · BRANDSCHUTZHAUBEN-KONFIGURATOR
 * ============================================================
 * Ergänzt assets/css/configurator.css (gemeinsame cfg-Bausteine des Schweißvorhang-Konfigurators).
 * Nur auf …/brandschutzhaube-paletten-und-gitterboxen/konfigurator/ geladen.
 */

.cfg--hood .cfg-steps ol { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.hc-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.02fr); }
.cfg-step.is-locked .cfg-step-head { opacity: .7; }

/* ---------- 1 · Maße ---------- */
.hc-dims { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) 104px; gap: 10px; align-items: end; }
.hc-dims .field.is-fixed input { color: var(--text); background: var(--surface); border-color: var(--line); cursor: default; }
.hc-qty { margin-left: 8px; }
.cfg--hood .cfg-choice { margin-bottom: 20px; }
.cfg--hood .cfg-hint.is-error { margin-top: 8px; }

/* ---------- 2 · Ausstattung ---------- */
.hc-label { margin: 0 0 12px; font-size: 12px; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hc-label + .cfg-choice { margin-bottom: 12px; }
.hc-seg-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin: 0 0 28px; }
.hc-seg-wrap.hc-sub { margin: -2px 0 0; padding: 12px 16px; background: var(--surface); border: 1px solid var(--line); border-top: 0; }
.hc-seg-l { font-size: 14px; color: var(--text); }
.hc-seg { display: inline-flex; padding: 3px; background: var(--surface); border: 1px solid var(--line-2); border-radius: 2px; }
.hc-sub .hc-seg { background: #fff; }
.hc-seg label { position: relative; }
.hc-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.hc-seg span { display: inline-flex; align-items: baseline; gap: 6px; min-height: 36px; padding: 8px 16px; font-size: 14px; color: var(--text); border-radius: 1px; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.hc-seg span small { font-size: 12px; color: var(--muted); }
.hc-seg input:checked + span { color: #fff; background: var(--ink); }
.hc-seg input:checked + span small { color: rgba(255,255,255,.7); }
.hc-seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.hc-opts { display: flex; flex-direction: column; gap: 10px; }
.hc-opt { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; gap: 16px; align-items: center; width: 100%; padding: 14px 16px 14px 14px; font: inherit; text-align: left; color: var(--ink); background: #fff; border: 1px solid var(--line-2); border-radius: 2px; cursor: pointer; transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease; }
.hc-opt:hover { border-color: var(--ink); }
.hc-opt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hc-opt-ico { display: grid; place-items: center; width: 56px; height: 44px; color: var(--text); background: var(--surface); border-radius: 2px; }
.hc-opt-ico svg { width: 44px; height: 33px; }
.hc-opt-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.hc-opt-txt strong { font-weight: 500; font-size: 15px; }
.hc-opt-txt small { font-size: 13px; line-height: 1.5; color: var(--text); }
.hc-opt-state { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; font-size: 13px; font-weight: 500; white-space: nowrap; border: 1px solid var(--line-2); border-radius: 2px; }
.hc-opt-on { display: none; align-items: center; gap: 6px; }
.hc-opt[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); background: #FAFAFB; }
.hc-opt[aria-pressed="true"] .hc-opt-ico { color: var(--ink); background: #fff; box-shadow: inset 0 0 0 1px var(--line-2); }
.hc-opt[aria-pressed="true"] .hc-opt-state { color: #fff; background: #1E7A3C; border-color: #1E7A3C; }
.hc-opt[aria-pressed="true"] .hc-opt-off { display: none; }
.hc-opt[aria-pressed="true"] .hc-opt-on { display: inline-flex; }
.hc-opt[data-opt="pocket"][aria-pressed="true"] { border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
#hc-warn:not([hidden]) { padding: 10px 12px; color: #6A4A00; background: #FBF1D8; }

/* ---------- 3D-Ansicht ---------- */
.hc-aside { display: flex; flex-direction: column; gap: 12px; }
@media (min-width: 1181px) { .hc-aside { top: calc(var(--header-h) + 98px); } }
.hc-viewer { margin: 0; background: #fff; border: 1px solid var(--line); }
.hc-viewer-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.hc-viewer figcaption { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hc-views { display: inline-flex; flex-wrap: wrap; gap: 4px; }
.hc-views button { min-height: 32px; padding: 0 11px; font: inherit; font-size: 13px; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: 2px; cursor: pointer; }
.hc-views button:hover { color: var(--ink); border-color: var(--ink); }
.hc-views button[aria-pressed="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
.hc-views .hc-dims-btn { margin-left: 6px; }
.hc-views .hc-dims-btn[aria-pressed="true"] { color: var(--ink); background: var(--surface); border-color: var(--ink); }
.hc-stage { position: relative; aspect-ratio: 6 / 5; max-height: calc(100vh - var(--header-h) - 220px); max-height: calc(100dvh - var(--header-h) - 220px); min-height: 320px; background: radial-gradient(120% 90% at 50% 38%, #fff 0%, #F7F8F9 58%, #ECEEF0 100%); }
.hc-stage { width: 100%; max-width: 100%; min-width: 0; }
@media (max-width: 560px) { .hc-stage { min-height: 0; } }
.hc-stage canvas { display: block; width: 100%; height: 100%; cursor: grab; touch-action: pan-y; outline: none; }
.hc-stage canvas.is-dragging { cursor: grabbing; }
.hc-stage canvas:focus-visible { box-shadow: inset 0 0 0 2px var(--accent); }
.hc-stage noscript img { width: 100%; height: 100%; object-fit: contain; }
.hc-viewer-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 16px; padding: 10px 16px; border-top: 1px solid var(--line); }
.hc-spec { margin: 0; font-size: 13px; color: var(--ink); }
.hc-viewer-help { margin: 0; font-size: 12px; color: var(--muted); }
.cfg-step.is-active .cfg-step-done { display: none; }
.hc-review { padding: 14px 18px 8px; background: var(--surface); }
.hc-review .cfg-rev-head { margin-bottom: 6px; }

.hc-sum-list { margin: 0; font-size: 13.5px; }
.hc-sum-list div { display: grid; grid-template-columns: 138px minmax(0, 1fr); gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); }
.hc-sum-list div:first-child { border-top: 0; padding-top: 0; }
.hc-sum-list dt { color: var(--muted); }
.hc-sum-list dd { margin: 0; color: var(--ink); }
.hc-sum-list div:first-child dd { font-family: var(--f-mono); font-size: 13px; }
.hc-review .hc-sum-list div { grid-template-columns: 180px minmax(0, 1fr); }
@media (max-width: 640px) { .hc-review .hc-sum-list div { grid-template-columns: minmax(0, 1fr); gap: 2px; } }

/* ---------- Responsiv ---------- */
@media (max-width: 1180px) {
    .hc-grid { grid-template-columns: minmax(0, 1fr); }
    .hc-aside { position: static; order: -1; }
    .hc-stage { aspect-ratio: 16 / 10; max-height: 460px; }
}
@media (max-width: 720px) {
    .hc-dims { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .hc-dims .cfg-times { display: none; }
    .hc-qty { margin-left: 0; }
    .hc-opt { grid-template-columns: 44px minmax(0, 1fr); gap: 12px; padding: 12px; }
    .hc-opt-ico { width: 44px; height: 36px; }
    .hc-opt-ico svg { width: 36px; height: 27px; }
    .hc-opt-state { grid-column: 2; justify-self: start; min-height: 30px; }
    .hc-stage { aspect-ratio: 4 / 3; }
    .hc-viewer-bar { padding: 8px 10px; }
    .hc-views button { padding: 0 9px; }
    .hc-viewer-help { display: none; }
}
@media (max-width: 520px) {
    .hc-seg-wrap .hc-seg { display: flex; width: 100%; }
    .hc-seg label { flex: 1 1 0; min-width: 0; }
    .hc-seg span { justify-content: center; flex-wrap: wrap; gap: 0 6px; padding: 8px 10px; text-align: center; }
}

/* Haubenmaß und gesperrte Optionen */
.hc-hood { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 16px 0 0; padding: 12px 14px; font-size: 14px; color: var(--text); background: var(--surface); border-left: 3px solid var(--ink); }
.hc-hood strong { font-family: var(--f-mono); font-size: 14.5px; font-weight: 500; color: var(--ink); }
.hc-opt.is-disabled { cursor: not-allowed; opacity: .55; }
.hc-opt.is-disabled:hover { border-color: var(--line-2); }
.hc-seg label.is-disabled span { cursor: not-allowed; opacity: .45; text-decoration: line-through; }

/* ---------- Positionen ---------- */
.hc-pos { padding: 14px 16px 16px; background: #fff; border: 1px solid var(--line); border-radius: 2px; }
.hc-pos-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.hc-pos-kicker { margin: 0; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.hc-pos-title { margin: 2px 0 0; font-family: var(--f-display); font-stretch: 94%; font-weight: 500; font-size: 18px; color: var(--ink); outline: none; }
.hc-pos-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.hc-pos-list { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; padding: 12px 0 0; list-style: none; border-top: 1px solid var(--line); }
.hc-pos-list:has(li:only-child) { display: none; }
.hc-pos-tab { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; min-width: 128px; padding: 8px 12px; font: inherit; text-align: left; color: var(--text); background: var(--surface); border: 1px solid var(--line-2); border-radius: 2px; cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.hc-pos-tab:hover { border-color: var(--ink); }
.hc-pos-tab:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hc-pos-tab.is-active { color: var(--ink); background: #fff; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.hc-pos-tab.is-invalid .hc-pos-d { color: #A8101A; }
.hc-pos-n { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.hc-pos-d { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: var(--f-mono); font-size: 12.5px; color: var(--ink); }
.hc-pos-q { font-size: 12px; color: var(--muted); }
.hc-label-field { max-width: 420px; margin-top: 16px; }

.hc-rev-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.hc-rev-pos { padding: 12px 14px 6px; background: #fff; border: 1px solid var(--line); }
.hc-rev-pos.is-invalid { border-color: #C8323B; }
.hc-rev-pos .cfg-hint { margin: 0 0 8px; }
.hc-rev-top { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 6px 12px; margin-bottom: 8px; font-size: 14.5px; color: var(--ink); }
.hc-rev-tools { display: inline-flex; gap: 14px; }
.hc-rev-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 12px 0 6px; font-size: 13px; color: var(--text); }
.hc-rev-foot strong { font-weight: 600; color: var(--ink); }
.hc-add-more { margin: -14px 0 28px; }
@media (max-width: 640px) {
    .hc-pos-actions { width: 100%; }
    .hc-pos-actions .btn { flex: 1 1 auto; }
    .hc-pos-tab { min-width: 0; }
}
.hc-pos-d.is-label { font-family: inherit; font-size: 13px; font-weight: 500; }

/* Rückfrage „Position entfernen“ */
.hc-confirm { width: min(440px, calc(100vw - 32px)); }
.hc-confirm::backdrop { background: rgba(13,14,15,.55); -webkit-backdrop-filter: blur(2px); backdrop-filter: blur(2px); }
.hc-confirm .cfg-dialog-foot { flex-wrap: wrap; }

/* ---------- Positionswahl an der 3D-Ansicht ---------- */
.hc-vpos { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: #FAFAFB; }
.hc-vpos[hidden] { display: none; }
.hc-vpos-l { margin-right: 4px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.hc-vpos button { min-height: 30px; padding: 0 10px; font: inherit; font-size: 13px; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: 2px; cursor: pointer; }
.hc-vpos button:hover { color: var(--ink); border-color: var(--ink); }
.hc-vpos button[aria-pressed="true"] { color: #fff; background: var(--ink); border-color: var(--ink); }
.hc-vpos button:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Großansicht der 3D-Ansicht (assets/js/viewer-zoom.js), für alle Konfiguratoren */
.hc-zoom-btn { display: inline-flex; align-items: center; justify-content: center; width: 32px; min-height: 32px; margin-left: 6px; padding: 0; color: var(--text); background: #fff; border: 1px solid var(--line-2); border-radius: 2px; cursor: pointer; }
.hc-zoom-btn:hover, .hc-zoom-btn[aria-expanded="true"] { color: var(--ink); border-color: var(--ink); }
.hc-zoom-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.hc-zoom { width: min(1440px, 96vw); height: 92vh; height: 92dvh; max-width: none; max-height: none; margin: auto; padding: 0; background: #fff; border: 0; box-shadow: 0 24px 64px rgba(20, 22, 24, .28); overflow: hidden; }
.hc-zoom::backdrop { background: rgba(20, 22, 24, .62); }
.hc-zoom .hc-viewer { display: flex; flex-direction: column; height: 100%; border: 0; }
.hc-zoom .hc-stage { flex: 1 1 auto; aspect-ratio: auto; height: auto; max-height: none; min-height: 0; }
.hc-zoom .hc-viewer-bar, .hc-zoom .hc-viewer-foot, .hc-zoom .hc-vpos { flex: 0 0 auto; }
html.has-zoom { overflow: hidden; }
@media (max-width: 720px) {
    .hc-zoom { width: 100vw; height: 100vh; height: 100dvh; box-shadow: none; }
}

/* ---------- Lage der Einfahrbereiche (nur eigene Maße) ---------- */
.hc-fl { margin: 0 0 28px; }
.hc-fl .hc-fl-head { margin: 0; }
.hc-fl-body { margin-top: 12px; padding: 14px 16px 16px; background: var(--surface); border: 1px solid var(--line); }
.hc-fl-rule { margin: 0 0 12px; }
.hc-fl-side + .hc-fl-side { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.hc-fl-h { margin: 0 0 10px; font-size: 14px; color: var(--ink); }
.hc-fl-h small { font-size: 13px; color: var(--muted); }
.hc-fl-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
.hc-fl-fields .cfg-unit.has-step { background: #fff; }
.hc-fl-range { display: block; margin-top: 4px; font-size: 12px; color: var(--muted); }
.hc-fl-bar { display: flex; height: 30px; margin-top: 14px; background: #fff; border: 1px solid var(--ink); }
.hc-fl-seg { position: relative; display: flex; align-items: center; justify-content: center; min-width: 0; flex-basis: 0; font-family: var(--f-mono); font-size: 11px; color: var(--muted); overflow: hidden; }
.hc-fl-seg > span { padding: 0 2px; white-space: nowrap; }
.hc-fl-seg.is-fork { color: var(--ink); background: #C9CDD1; box-shadow: inset 1px 0 0 var(--ink), inset -1px 0 0 var(--ink); }
.hc-fl-seg.is-gap { background: repeating-linear-gradient(90deg, transparent 0 6px, rgba(20,22,24,.05) 6px 7px); }
.hc-fl-sum { margin: 8px 0 0; font-size: 13px; color: var(--text); }
.hc-fl-sum.is-error { color: #C8323B; }
.hc-fl-note:not([hidden]) { margin: 6px 0 0; padding: 8px 10px; color: #6A4A00; background: #FBF1D8; }
@media (max-width: 560px) { .hc-fl-fields { grid-template-columns: minmax(0, 1fr); } }
.hc-fl-bar.is-red .hc-fl-seg.is-fork { color: #fff; background: #D7141E; }
.hc-fl-std { margin: 10px 0 0; }

/* ---------- HV-Batteriehaube (app/pages/hv-configurator.php) ---------- */
.hv-choice-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 700px) { .hv-choice-3 { grid-template-columns: minmax(0, 1fr); } }
.cfg-choice-opt.is-disabled { opacity: .45; cursor: not-allowed; }
.hc-opts .hv-na:not([hidden]) { margin: -6px 0 0; padding: 8px 12px; font-size: 13px; color: #6A4A00; background: #FBF1D8; }
.hv-pocket { flex-direction: column; align-items: stretch; gap: 10px; }
.hv-pk-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.hv-pk-row .hc-seg-l { min-width: 72px; }
.hv-pk-row[hidden] { display: none; }
@media (max-width: 560px) {
    .hv-pk-row .hc-seg { display: flex; width: 100%; }
    .hv-pk-row .hc-seg label { flex: 1 1 0; min-width: 0; }
    .hv-pk-row .hc-seg span { justify-content: center; width: 100%; padding: 8px 6px; font-size: 13px; }
}
.hc-fl-bar.is-black .hc-fl-seg.is-fork { color: #fff; background: #2A2C2E; }
.hc-opt[hidden] { display: none; }
