/* ============================================================================
   UMZUGSRECHNER – eigenes Stylesheet
   Nutzt die Variablen aus style.css (--accent, --highlight, --ink …).
   Wird nur auf der Rechner-Seite geladen.
   ============================================================================ */

.calc {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

/* ---------- Fortschritt ---------- */
.calc-progress {
    display: flex;
    gap: 4px;
    padding: 18px 20px 0;
}
.calc-progress li {
    flex: 1;
    font-size: .68rem;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--muted);
    padding-bottom: 8px;
    border-bottom: 3px solid var(--line);
    transition: color .25s, border-color .25s;
}
.calc-progress li.done { border-bottom-color: var(--accent); color: var(--accent); }
.calc-progress li.current { border-bottom-color: var(--highlight); color: var(--ink); }
.calc-progress .step-label { display: none; }

/* ---------- Schritt-Panel ---------- */
.calc-body { padding: 24px 20px 26px; }
.calc-step { display: none; }
.calc-step.active { display: block; animation: calcIn .28s ease both; }
@keyframes calcIn {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.calc-step > h3 {
    font-size: 1.32rem;
    margin-bottom: 6px;
}
.calc-step > .step-hint {
    color: var(--muted);
    font-size: .94rem;
    margin-bottom: 20px;
}

.calc fieldset { border: none; margin-bottom: 22px; }
.calc fieldset:last-of-type { margin-bottom: 0; }
.calc legend {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1rem;
    color: var(--ink);
    margin-bottom: 10px;
    padding: 0;
}
.calc .legend-note {
    display: block;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: .86rem;
    color: var(--muted);
    margin-top: 2px;
}

/* ---------- Auswahlkarten ---------- */
.opt-grid { display: grid; gap: 10px; }
.opt-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.opt-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }

.opt {
    position: relative;
    display: block;
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color .18s, box-shadow .18s, transform .18s;
}
.opt:hover { border-color: #b9c9cd; }
.opt input {
    position: absolute;
    opacity: 0;
    width: 1px; height: 1px;
    margin: 0;
}
.opt .opt-title {
    display: block;
    font-weight: 600;
    color: var(--ink);
    font-size: .98rem;
}
.opt .opt-note {
    display: block;
    color: var(--muted);
    font-size: .83rem;
    margin-top: 2px;
}
.opt.is-checked {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 131, 150, .12);
}
.opt.is-checked .opt-title { color: var(--accent); }
/* Tastaturfokus muss sichtbar bleiben */
.opt input:focus-visible + .opt-inner,
.opt:focus-within {
    outline: 3px solid var(--highlight);
    outline-offset: 2px;
    border-radius: var(--radius);
}

/* Etagen-/Zahlenreihe */
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; }
.opt-chip {
    position: relative;
    border: 1.5px solid var(--line);
    border-radius: 100px;
    padding: 9px 16px;
    cursor: pointer;
    font-weight: 600;
    font-size: .92rem;
    color: var(--text);
    transition: border-color .18s, background .18s, color .18s;
}
.opt-chip:hover { border-color: #b9c9cd; }
.opt-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.opt-chip.is-checked {
    border-color: var(--accent);
    background: var(--accent);
    color: #fff;
}
.opt-chip:focus-within { outline: 3px solid var(--highlight); outline-offset: 2px; }

/* ---------- Schalter (Ja/Nein) ---------- */
.switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line-soft);
}
.switch-row:last-child { border-bottom: none; }
.switch-row .sr-text strong { display: block; font-size: .96rem; color: var(--ink); }
.switch-row .sr-text span { display: block; font-size: .83rem; color: var(--muted); }

/* ---------- Zusatzleistungen ---------- */
.extra-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--line-soft);
}
.extra-row:last-child { border-bottom: none; }
.extra-main { flex: 1; min-width: 0; }
.extra-main strong { display: block; font-size: .96rem; color: var(--ink); font-weight: 600; }
.extra-main span { display: block; font-size: .83rem; color: var(--muted); }
.extra-price {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    color: var(--accent);
    font-size: .9rem;
    white-space: nowrap;
}
.extra-price.on-request {
    color: var(--muted);
    font-weight: 500;
    font-size: .82rem;
}

/* Kontrollkästchen */
.cb { display: inline-flex; align-items: center; cursor: pointer; }
.cb input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cb .cb-box {
    width: 24px; height: 24px;
    border: 1.5px solid #b9c9cd;
    border-radius: 6px;
    display: grid; place-items: center;
    transition: background .16s, border-color .16s;
}
.cb .cb-box svg { width: 15px; height: 15px; color: #fff; opacity: 0; transition: opacity .16s; }
.cb.is-checked .cb-box { background: var(--accent); border-color: var(--accent); }
.cb.is-checked .cb-box svg { opacity: 1; }
.cb:focus-within .cb-box { outline: 3px solid var(--highlight); outline-offset: 2px; }

/* Mengensteuerung */
.qty { display: inline-flex; align-items: center; gap: 2px; }
.qty button {
    width: 34px; height: 34px;
    border: 1.5px solid var(--line);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    line-height: 1;
    transition: border-color .15s, background .15s;
}
.qty button:hover:not(:disabled) { border-color: var(--accent); color: var(--accent); }
.qty button:disabled { opacity: .4; cursor: not-allowed; }
.qty input {
    width: 46px;
    height: 34px;
    text-align: center;
    border: 1.5px solid var(--line);
    border-radius: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: .95rem;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}
.qty input::-webkit-outer-spin-button,
.qty input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ---------- Formularfelder ---------- */
.field { margin-bottom: 15px; }
.field label {
    display: block;
    font-size: .88rem;
    font-weight: 600;
    color: var(--ink);
    margin-bottom: 5px;
}
.field .req { color: var(--accent); }
.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="date"],
.field textarea,
.field select {
    width: 100%;
    padding: 11px 13px;
    border: 1.5px solid var(--line);
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: .96rem;
    color: var(--text);
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.field textarea { min-height: 92px; resize: vertical; }
.field input:focus,
.field textarea:focus,
.field select:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 131, 150, .12);
}
.field input[aria-invalid="true"],
.field textarea[aria-invalid="true"] { border-color: #c0392b; }
.field .err {
    display: none;
    font-size: .82rem;
    color: #c0392b;
    margin-top: 4px;
}
.field.has-error .err { display: block; }
.field-row { display: grid; gap: 15px; }

/* Datei-Auswahl */
.filedrop {
    border: 1.5px dashed #b9c9cd;
    border-radius: var(--radius);
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: border-color .16s, background .16s;
}
.filedrop:hover { border-color: var(--accent); background: var(--bg-soft); }
.filedrop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.filedrop svg { width: 24px; height: 24px; color: var(--accent); margin-bottom: 6px; }
.filedrop strong { display: block; font-size: .92rem; color: var(--ink); }
.filedrop span { display: block; font-size: .82rem; color: var(--muted); margin-top: 2px; }
.filelist { list-style: none; margin-top: 10px; }
.filelist li {
    display: flex; align-items: center; justify-content: space-between; gap: 10px;
    font-size: .86rem; color: var(--muted);
    padding: 7px 0; border-bottom: 1px solid var(--line-soft);
}
.filelist button {
    border: none; background: none; cursor: pointer;
    color: #c0392b; font-size: .82rem; font-weight: 600;
}

/* Einwilligung */
.consent {
    display: flex; gap: 11px; align-items: flex-start;
    background: var(--bg-soft); border-radius: var(--radius);
    padding: 14px 16px; margin: 4px 0 16px;
}
.consent .cb { margin-top: 1px; }
.consent p { font-size: .86rem; color: var(--muted); line-height: 1.5; }
.consent a { color: var(--accent); text-decoration: underline; }

/* ---------- Navigation ---------- */
.calc-nav {
    display: flex; gap: 10px; align-items: center;
    padding: 18px 20px;
    border-top: 1px solid var(--line-soft);
    background: var(--bg-soft);
}
.calc-nav .spacer { flex: 1; }
.calc-nav .btn { padding: 12px 20px; }

/* ---------- Preisanzeige (Signature) ---------- */
.calc-price {
    background: linear-gradient(135deg, var(--ink) 0%, var(--ink-3) 100%);
    color: #fff;
    padding: 20px 22px;
}
.calc-price .cp-label {
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: var(--highlight);
    display: block;
    margin-bottom: 6px;
}
.calc-price .cp-value {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(1.55rem, 6vw, 2.1rem);
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.calc-price .cp-value .sep { color: rgba(255, 255, 255, .5); margin: 0 .18em; }
.calc-price .cp-sub {
    font-size: .84rem;
    color: rgba(255, 255, 255, .8);
    margin-top: 7px;
}
.calc-price .cp-breakdown {
    list-style: none;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, .18);
    display: grid;
    gap: 5px;
}
.calc-price .cp-breakdown li {
    display: flex; justify-content: space-between; gap: 12px;
    font-size: .84rem;
    color: rgba(255, 255, 255, .82);
}
.calc-price .cp-breakdown li b { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.calc-price .cp-breakdown li.request b { color: var(--highlight); font-weight: 500; }
.calc-price.is-quote .cp-value { font-size: clamp(1.15rem, 4.4vw, 1.5rem); }

/* ---------- Ergebnis / Bestätigung ---------- */
.calc-done { padding: 34px 24px; text-align: center; }
.calc-done .done-ico {
    width: 60px; height: 60px; border-radius: 50%;
    background: rgba(0, 131, 150, .1);
    display: grid; place-items: center; margin: 0 auto 16px;
}
.calc-done .done-ico svg { width: 30px; height: 30px; color: var(--accent); }
.calc-done h3 { font-size: 1.45rem; margin-bottom: 8px; }
.calc-done p { color: var(--muted); max-width: 440px; margin: 0 auto 8px; }
.calc-done .done-actions { margin-top: 22px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }

.calc-error {
    display: none;
    background: #fdecea;
    border-left: 3px solid #c0392b;
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 13px 16px;
    margin-bottom: 16px;
    font-size: .9rem;
    color: #8c2d22;
}
.calc-error.show { display: block; }

/* Ladezustand */
.btn.is-loading { pointer-events: none; opacity: .75; }
.btn .spin {
    width: 16px; height: 16px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Rechtlicher Hinweis ---------- */
.calc-legal {
    font-size: .8rem;
    color: var(--muted);
    line-height: 1.55;
    margin-top: 16px;
}
.calc-legal strong { color: var(--ink); }

/* ---------- Desktop ---------- */
@media (min-width: 768px) {
    .calc-progress { padding: 22px 30px 0; gap: 8px; }
    .calc-progress .step-label { display: inline; }
    .calc-body { padding: 30px 30px 32px; }
    .calc-nav { padding: 20px 30px; }
    .calc-price { padding: 26px 30px; }
    .opt-grid.cols-2, .opt-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
    .field-row { grid-template-columns: 1fr 1fr; }
    .calc-done { padding: 46px 30px; }
}

/* Mobil: Preisfeld steht über dem Formular. Nach jedem Schritt scrollt die
   Seite an den Anfang des Rechners – der Richtpreis ist damit immer als
   Erstes sichtbar. */
.calc-layout { display: flex; flex-direction: column; gap: 18px; }
.calc-layout > .calc-aside { order: -1; }
.calc-layout > .calc-legal { order: 2; }
.calc-price { border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }

@media (min-width: 992px) {
    /* Desktop: Formular links, Preis als eigene Spalte rechts,
       die beim Scrollen sichtbar bleibt. */
    .calc-layout {
        display: grid;
        grid-template-columns: 1fr 330px;
        grid-template-rows: auto 1fr;
        gap: 26px;
        align-items: start;
    }
    .calc-layout > .calc { grid-column: 1; grid-row: 1 / span 2; }
    .calc-layout > .calc-aside { grid-column: 2; grid-row: 1; position: sticky; top: 96px; }
    .calc-layout > .calc-legal { grid-column: 2; grid-row: 2; margin-top: 0; padding: 0 4px; }
    .calc-price { box-shadow: var(--shadow); }
}

/* ---------- Bewegung reduzieren ---------- */
@media (prefers-reduced-motion: reduce) {
    .calc-step.active { animation: none; }
    .btn .spin { animation-duration: 2s; }
    .opt, .opt-chip, .cb .cb-box, .qty button { transition: none; }
}

/* ---------- Kontextbezogene Hinweise ---------- */
.calc-hints { display: grid; gap: 8px; margin-bottom: 18px; }
.calc-hints:empty { display: none; }
.calc-hint {
    display: flex; gap: 10px; align-items: flex-start;
    background: var(--bg-soft);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 11px 14px;
    font-size: .88rem;
    color: var(--muted);
    line-height: 1.5;
}
.calc-hint svg { width: 17px; height: 17px; color: var(--accent); flex-shrink: 0; margin-top: 2px; }
.calc-hint strong { color: var(--ink); }
.calc-hint.warn { border-left-color: var(--star); background: #fff8ec; }
.calc-hint.warn svg { color: #c98a12; }

/* Vorschlag unter einer Zusatzleistung */
.extra-suggest {
    font-size: .8rem;
    color: var(--accent);
    margin-top: 3px;
}

/* ---------- Zusammenfassung vor dem Absenden ---------- */
.calc-summary {
    background: var(--bg-soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 22px;
}
.calc-summary h4 {
    font-family: var(--font-display);
    font-size: .96rem;
    color: var(--ink);
    margin-bottom: 10px;
}
.calc-summary dl { display: grid; gap: 6px; margin: 0; }
.calc-summary .sum-row {
    display: flex; justify-content: space-between; gap: 14px;
    font-size: .87rem;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--line-soft);
}
.calc-summary .sum-row:last-child { border-bottom: none; padding-bottom: 0; }
.calc-summary dt { color: var(--muted); flex-shrink: 0; }
.calc-summary dd { color: var(--ink); font-weight: 600; text-align: right; margin: 0; }
.calc-summary .sum-row.total dd { color: var(--accent); }

/* Ausgeblendete Zeilen */
.switch-row[hidden], .extra-row[hidden] { display: none; }

/* ---------- Möbelliste ---------- */
.volume-bar {
    display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px;
    background: var(--ink); color: #fff;
    border-radius: var(--radius); padding: 13px 16px; margin-bottom: 18px;
}
.volume-bar .vb-label {
    font-size: .7rem; font-weight: 700; letter-spacing: .09em;
    text-transform: uppercase; color: var(--highlight);
    flex-basis: 100%;
}
.volume-bar .vb-value {
    font-family: var(--font-display); font-weight: 800; font-size: 1.5rem;
    font-variant-numeric: tabular-nums;
}
.volume-bar .vb-note { font-size: .84rem; color: rgba(255,255,255,.8); }

.furn-group {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 10px;
    background: #fff;
    overflow: hidden;
}
.furn-group summary {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 14px 16px; cursor: pointer; list-style: none;
    font-family: var(--font-display); font-weight: 700; color: var(--ink);
    transition: background .15s;
}
.furn-group summary::-webkit-details-marker { display: none; }
.furn-group summary:hover { background: var(--bg-soft); }
.furn-group summary:focus-visible { outline: 3px solid var(--highlight); outline-offset: -3px; }
.furn-group summary::after {
    content: ''; width: 9px; height: 9px; flex-shrink: 0;
    border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted);
    transform: rotate(45deg); transition: transform .2s; margin-left: auto;
}
.furn-group[open] summary::after { transform: rotate(-135deg); }
.furn-group .fg-count {
    font-family: var(--font-body); font-size: .8rem; font-weight: 600;
    color: #fff; background: var(--accent);
    border-radius: 100px; padding: 2px 9px;
}
.furn-group .fg-count:empty { display: none; }
.furn-list { padding: 0 16px 8px; border-top: 1px solid var(--line-soft); }
.furn-row {
    display: flex; align-items: center; gap: 12px;
    padding: 11px 0; border-bottom: 1px solid var(--line-soft);
}
.furn-row:last-child { border-bottom: none; }
.furn-row.has-qty { background: linear-gradient(90deg, rgba(0,131,150,.05), transparent); }
.furn-main { flex: 1; min-width: 0; }
.furn-main strong { display: block; font-size: .94rem; color: var(--ink); font-weight: 600; }
.furn-main span { display: block; font-size: .79rem; color: var(--muted); }
.qty-furn button { width: 32px; height: 32px; }
.qty-furn input { width: 42px; height: 32px; }

/* Eigene Angaben */
.furn-custom {
    margin-top: 20px; padding: 16px 18px;
    background: var(--bg-soft); border-radius: var(--radius);
}
.furn-custom h4 { font-family: var(--font-display); font-size: .98rem; color: var(--ink); margin-bottom: 3px; }
.furn-custom > p { font-size: .85rem; color: var(--muted); margin-bottom: 12px; }
.custom-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.custom-row input[type="text"] {
    flex: 1; min-width: 0; padding: 9px 12px;
    border: 1.5px solid var(--line); border-radius: var(--radius);
    font-family: var(--font-body); font-size: .92rem; color: var(--text); background: #fff;
}
.custom-row input[type="text"]:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0,131,150,.12);
}
.custom-row .rm {
    border: none; background: none; cursor: pointer; padding: 6px;
    color: var(--muted); line-height: 0; border-radius: 6px;
}
.custom-row .rm:hover { color: #c0392b; background: #fdecea; }
.custom-row .rm svg { width: 17px; height: 17px; }
.btn.btn-sm { padding: 9px 15px; font-size: .88rem; }
.btn.btn-sm svg { width: 15px; height: 15px; }

@media (max-width: 420px) {
    .furn-main strong { font-size: .9rem; }
    .qty-furn button { width: 30px; height: 30px; }
    .qty-furn input { width: 38px; height: 30px; }
}
