/* Price calculator. Uses the colour and type tokens from styles.css. */
.calc-page-head { display: flex; flex-direction: column; gap: 12px; max-width: 680px; margin-bottom: 28px; }
.calc-page-head h1 { font-size: var(--step-4); font-weight: 800; letter-spacing: -0.02em; }
.calc-page-head .lead { font-size: var(--step-1); color: var(--muted); }

.calc-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-bottom: 20px; }
.calc-tab {
  display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 10px 16px;
  border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); color: var(--ink);
  font: 700 1.05rem/1.2 var(--f-display); cursor: pointer; text-align: left; transition: border-color .15s, background .15s;
}
.calc-tab:hover { border-color: var(--muted); }
.calc-tab[aria-selected="true"] { background: var(--night); color: var(--night-ink); border-color: var(--night); }
.calc-ico { width: 34px; height: 34px; flex: none; color: var(--accent-ink); }
.calc-tab[aria-selected="true"] .calc-ico { color: var(--accent); }
.calc-ico .ray { stroke: var(--accent); }

.calc-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }
.calc-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 3.5vw, 32px); min-width: 0; }
.calc-questions { display: flex; flex-direction: column; }
.calc-q { display: flex; flex-direction: column; gap: 10px; padding-block: 18px; border-top: 1px solid var(--line); }
.calc-q:first-child { border-top: 0; padding-top: 0; }
.calc-q:last-child { padding-bottom: 0; }
.calc-label { font: 700 1.08rem/1.3 var(--f-display); }
.calc-hint { color: var(--muted); font-size: 0.9rem; }

.calc-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.calc-chips-rich { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.calc-chip { position: relative; min-width: 0; }
.calc-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.calc-chip span {
  display: flex; flex-direction: column; justify-content: center; gap: 2px; height: 100%;
  min-height: 44px; padding: 8px 16px; border: 1.5px solid var(--line); border-radius: 12px;
  background: var(--bg); cursor: pointer; transition: border-color .15s, background .15s;
}
.calc-chip strong { font-weight: 600; font-size: 0.97rem; }
.calc-chip small { color: var(--muted); font-size: 0.82rem; line-height: 1.35; }
.calc-chip span:hover { border-color: var(--muted); }
.calc-chip input:checked + span { border-color: var(--green); background: color-mix(in srgb, var(--green) 18%, var(--surface)); }
.calc-chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

.calc-stepper { display: inline-flex; align-items: center; gap: 8px; }
.calc-stepper select { width: 84px; min-height: 48px; text-align: center; font: 700 1.1rem var(--f-body); color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 0 10px; }
.calc-step { width: 48px; height: 48px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--surface); color: var(--ink); font: 600 1.4rem/1 var(--f-body); cursor: pointer; }
.calc-step:hover:not(:disabled) { border-color: var(--accent); }
.calc-step:disabled { opacity: .35; cursor: default; }

.calc-panel {
  position: sticky; top: calc(var(--header-h) + 20px);
  background: var(--night); color: var(--night-ink); border-radius: 20px; padding: 26px;
  display: flex; flex-direction: column; gap: 12px; overflow: hidden; isolation: isolate;
}
.calc-panel::before {
  content: ""; position: absolute; z-index: -1; right: -90px; top: -120px; width: 300px; height: 300px;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--accent) 40%, transparent), transparent);
}
.calc-eyebrow { font-family: var(--f-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--accent); }
.calc-total { font: 800 clamp(2.8rem, 2rem + 3vw, 3.6rem)/1 var(--f-display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.calc-for { color: var(--night-muted); }
.calc-lines { margin: 4px 0 0; display: flex; flex-direction: column; border-top: 1px solid var(--night-line); }
.calc-lines div { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--night-line); font-size: 0.92rem; }
.calc-lines dt { color: var(--night-muted); display: flex; flex-direction: column; min-width: 0; }
.calc-lines dt span { color: var(--night-ink); font-weight: 600; }
.calc-lines dd { margin: 0; font-family: var(--f-mono); font-size: 0.82rem; white-space: nowrap; align-self: center; color: var(--accent); }
.calc-how summary { cursor: pointer; color: var(--night-muted); font-size: 0.9rem; }
.calc-how summary:hover { color: var(--night-ink); }
.calc-worked { margin-top: 8px; font-family: var(--f-mono); font-size: 0.8rem; color: var(--night-ink); overflow-wrap: anywhere; background: color-mix(in srgb, var(--night-ink) 7%, var(--night)); padding: 10px 12px; border-radius: 8px; }
.calc-book { width: 100%; margin-top: 6px; }
.calc-note { color: var(--night-muted); font-size: 0.82rem; line-height: 1.45; }
.calc-mobile-bar { display: none; }

/* Booking step */
.book { margin-top: 28px; }
.book-card { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(18px, 3.5vw, 32px); display: flex; flex-direction: column; gap: 18px; }
.book-summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 14px 18px; border-radius: 12px; background: color-mix(in srgb, var(--accent) 14%, var(--surface)); }
.book-summary strong { font: 800 var(--step-2)/1 var(--f-display); }

@media (max-width: 900px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-panel { position: relative; top: auto; }
}
@media (max-width: 600px) {
  .calc-tabs { gap: 6px; }
  .calc-tab { flex-direction: column; justify-content: center; gap: 6px; text-align: center; font-size: 0.88rem; min-height: 84px; padding: 10px 6px; }
  .calc-ico { width: 30px; height: 30px; }
  .calc-chips-rich { grid-template-columns: 1fr; }
  .in-calc .calc-mobile-bar, .calc-page .calc-mobile-bar {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
    background: var(--night); color: var(--night-ink);
  }
  .calc-mobile-bar span { display: flex; flex-direction: column; line-height: 1.1; }
  .calc-mobile-bar small { color: var(--night-muted); font-size: 0.75rem; }
  .calc-mobile-bar strong { font: 800 1.6rem var(--f-display); font-variant-numeric: tabular-nums; }
  .calc-mobile-bar .btn { min-width: 120px; }
  .calc-page .mobile-bar, .in-calc .mobile-bar { display: none; }
}
.calc-page .site-footer { padding-block: 24px 96px; }
.calc-page .footer-base { margin-top: 0; padding-top: 0; border-top: 0; }
.calc-custom .calc-total { font-size: clamp(2.2rem, 1.8rem + 2vw, 2.8rem); }


/* Length input for roofline lighting */
.calc-len-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.calc-unit { display: inline-flex; border: 1.5px solid var(--line); border-radius: 999px; padding: 3px; background: var(--bg); }
.calc-unit label { position: relative; }
.calc-unit input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.calc-unit span { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 32px; border-radius: 999px; font-weight: 600; cursor: pointer; color: var(--muted); }
.calc-unit input:checked + span { background: var(--night); color: var(--night-ink); }
.calc-unit input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.calc-len { display: grid; grid-template-columns: auto auto 1fr; align-items: center; gap: 10px 12px; }
.calc-len input[type="number"] { width: 110px; min-height: 52px; font: 700 1.4rem var(--f-display); text-align: center; color: var(--ink); background: var(--bg); border: 1.5px solid var(--line); border-radius: 12px; padding: 0 8px; font-variant-numeric: tabular-nums; }
.calc-len input[type="number"]:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 30%, transparent); }
.calc-len-unit { font-weight: 600; color: var(--muted); }
.calc-len input[type="range"] { width: 100%; min-width: 0; accent-color: var(--green); height: 32px; }
@media (max-width: 600px) { .calc-len { grid-template-columns: auto 1fr; } .calc-len input[type="range"] { grid-column: 1 / -1; } }

/* Simplified estimate panel: total, what it covers, one action */
.calc-notice { color: var(--accent); font-size: 0.88rem; }
.calc-notice:empty { display: none; }
.calc-covers { border-top: 1px solid var(--night-line); padding-top: 14px; display: flex; flex-direction: column; gap: 8px; }
.calc-covers > p:first-child { font-weight: 600; font-size: 0.92rem; }
.calc-covers ul { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; color: var(--night-muted); }
.calc-covers li { position: relative; padding-left: 22px; }
.calc-covers li::before { content: ""; position: absolute; left: 2px; top: 0.35em; width: 10px; height: 6px; border-left: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(-45deg); }
.calc-excludes { font-size: 0.85rem; color: var(--night-muted); }
.calc-tabs[hidden] { display: none; }
