/*
 * ============================================================
 * HEATPROTECTION · GEWEBEKOMPENSATOR-KONFIGURATOR
 * ============================================================
 * Ergänzt assets/css/configurator.css und assets/css/hood-configurator.css (gemeinsame Bausteine hc-*).
 * Nur auf …/gewebekompensatoren/konfigurator/ geladen.
 */

.cfg--ej .cfg-steps ol { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.cfg--ej .hc-label { margin-top: 26px; }
.cfg--ej .cfg-step-body > .hc-label:first-of-type { margin-top: 0; }
.cfg--ej [hidden] { display: none !important; }

/* Auswahlkarten mit Skizze */
.ej-cards .cfg-choice-opt > span { padding-top: 14px; }
.ej-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.ej-cards--3 .cfg-choice-opt > span { padding: 14px 14px 16px; hyphens: auto; }
.ej-cards--3 .cfg-choice-opt > span::before { left: auto; right: 14px; top: 14px; }
.ej-cards--3 .cfg-choice-opt strong { font-size: 15px; line-height: 1.3; }
.ej-cards--3 .cfg-choice-opt small { font-size: 13px; }
.ej-cards .cfg-choice-opt.is-disabled > span { opacity: .45; cursor: not-allowed; }
.ej-card-ico { display: block; width: 64px; height: 44px; margin: 0 0 6px; color: var(--text); }
.ej-card-ico svg { width: 64px; height: 44px; }
.ej-cards input:checked + span .ej-card-ico { color: var(--ink); }

/* Eingabefelder */
.ej-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px 14px; align-items: start; }
.ej-grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
/* Felder einer Zeile bündig: Bezeichnung, Eingabe und Hinweis je eigene Zeile (Subgrid), Bezeichnung unten ausgerichtet */
@supports (grid-template-rows: subgrid) {
    .ej-grid > .field { display: grid; grid-row: span 3; grid-template-rows: subgrid; row-gap: 8px; align-content: start; }
    .ej-grid > .field > span:first-child { align-self: end; }
}
.ej-lab-end { white-space: nowrap; }
/* Betriebsdaten: immer paarweise (Temperatur | Spitze, Druck | Geschwindigkeit), Eingaben auf gleicher Höhe */
.ej-grid--pairs { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 520px; align-items: end; }
.ej-grid--2 { align-items: end; }
.ej-grid + .ej-grid, .ej-grid + .hc-seg-wrap, .hc-seg-wrap + .ej-grid { margin-top: 14px; }
.ej-sym { margin-left: 4px; font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.cfg--ej .field.is-fixed input { color: var(--text); background: var(--surface); border-color: var(--line); cursor: default; }
.cfg--ej .field select { min-height: 46px; }
.cfg--ej .ej-seg { margin: 16px 0 0; }
.cfg--ej .ej-seg .hc-seg-l { min-width: 128px; }
.ej-box { margin-top: 16px; padding: 16px; background: var(--surface); border: 1px solid var(--line); }
.ej-box .hc-seg { background: #fff; }
.ej-box .ej-seg:first-of-type { margin-top: 14px; }
.ej-holes-sum { margin-top: 14px; }
.ej-holes-sum strong { font-size: 13.5px; }
.cfg-hint.ej-warn, #ej-warn:not([hidden]) { padding: 10px 12px; color: #6A4A00; background: #FBF1D8; }
.hc-rev-pos .ej-warn { margin: 6px 0 8px; }

/* Normwerte */
.ej-norm-vals { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 0; margin: 14px 0 0; background: #fff; border: 1px solid var(--line); }
.ej-norm-vals div { padding: 10px 12px; border-right: 1px solid var(--line); }
.ej-norm-vals dt { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.ej-norm-vals dd { margin: 3px 0 0; font-family: var(--f-mono); font-size: 14px; color: var(--ink); }
.ej-norm-vals:empty { display: none; }

/* Prinzipskizze */
.ej-sketch { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: center; margin: 18px 0 0; padding: 12px 14px; background: var(--surface); border-left: 3px solid var(--ink); }
.ej-sketch svg { width: 200px; height: auto; }
.ej-sketch figcaption { font-size: 13px; line-height: 1.6; color: var(--text); }

/* Lieferumfang: drei Karten */
.ej-scope { grid-template-columns: minmax(0, 1fr); }
.ej-holes-sum + .cfg-hint + .hc-label, .ej-holes-sum + .hc-label { margin-top: 28px; }

@media (max-width: 720px) {
    .cfg--ej .cfg-steps-l { display: none; }
    .cfg--ej .cfg-steps-btn { justify-content: center; grid-template-columns: auto; padding: 0 8px; }
    .cfg--ej .cfg-steps-btn .cfg-steps-ok { display: none !important; }
    .ej-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .ej-grid--2 { grid-template-columns: minmax(0, 1fr); }
    .ej-cards { grid-template-columns: minmax(0, 1fr); }
    .ej-sketch { grid-template-columns: minmax(0, 1fr); }
    .ej-sketch svg { width: 100%; max-width: 260px; }
    .cfg--ej .ej-seg .hc-seg-l { min-width: 0; }
}
@media (max-width: 520px) {
    .cfg--ej .ej-seg .hc-seg { display: flex; flex-wrap: wrap; width: 100%; }
    .cfg--ej .ej-seg .hc-seg label { flex: 1 1 auto; }
}

/* Auslegungsregeln: Bereiche, Normflansche, Klemmleiste, Anpassungshinweis */
.ej-range { display: flex; align-items: flex-start; gap: 5px; margin-top: -2px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.ej-range::before { content: ""; flex: 0 0 12px; width: 12px; height: 12px; margin-top: 1.5px; background: currentColor; opacity: .7;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='5.25' fill='none' stroke='black' stroke-width='1.2'/%3E%3Cpath d='M6 5.2v3.3' stroke='black' stroke-width='1.3' stroke-linecap='round'/%3E%3Ccircle cx='6' cy='3.5' r='.8'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Ccircle cx='6' cy='6' r='5.25' fill='none' stroke='black' stroke-width='1.2'/%3E%3Cpath d='M6 5.2v3.3' stroke='black' stroke-width='1.3' stroke-linecap='round'/%3E%3Ccircle cx='6' cy='3.5' r='.8'/%3E%3C/svg%3E") center / contain no-repeat; }
.ej-range:empty { display: none; }
.cfg--ej .field select[data-k="bolt"] { width: 100%; }
.ej-box-l { margin: 0 0 10px; }
.ej-norm-list { display: grid; gap: 8px; }
.ej-norm-opt { position: relative; display: block; cursor: pointer; }
.ej-norm-opt input { position: absolute; opacity: 0; }
.ej-norm-opt > span { display: grid; gap: 3px; padding: 11px 14px 11px 40px; background: #fff; border: 1px solid var(--line); transition: border-color .15s; }
.ej-norm-opt > span::before { content: ""; position: absolute; left: 14px; top: 14px; width: 14px; height: 14px; border: 1.5px solid var(--muted); border-radius: 50%; }
.ej-norm-opt input:checked + span { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.ej-norm-opt input:checked + span::before { border-color: var(--ink); background: radial-gradient(circle, var(--ink) 0 4px, transparent 4.5px); }
.ej-norm-opt input:focus-visible + span { outline: 2px solid var(--red, #D7141E); outline-offset: 2px; }
.ej-norm-opt strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.ej-norm-opt small { font-size: 12.5px; color: var(--text); font-family: var(--f-mono); }
.ej-clamp { margin: 12px 0 0; font-size: 13px; color: var(--text); }
.ej-clamp:empty { display: none; }
.cfg-hint.ej-adjust { padding: 10px 12px; color: #0F3D63; background: #E6F0F8; }
.ej-propose { margin: 10px 0 0; font-size: 13px; color: var(--muted); }
.ej-propose .cfg-link-btn { font-size: 13px; }
#ej-none-note + .hc-label { margin-top: 28px; }

/* Eingabe auf Grenze gesetzt: kurz hervorheben */
.field input.is-clamped { animation: ej-clamp .9s ease; }
@keyframes ej-clamp { 0% { background-color: #FFF4D6; border-color: #E0A800; } 100% { background-color: #fff; } }
@media (prefers-reduced-motion: reduce) { .field input.is-clamped { animation: none; } }
