/* ============================================================
   bufet — калькулятор-превью.
   Перенос из docs/02/design_2/assets/calc.css целиком, включая
   собственные медиазапросы макета (900px и 520px).
   ============================================================ */
.calc { padding-block: var(--section-y); }
.calc__head { max-width: 720px; margin-bottom: 44px; }
.calc__head .sec-title { margin-top: 14px; }
.calc__head p { color: var(--ink-2); font-size: var(--fs-lead); margin: 18px 0 0; max-width: 52ch; }

.calc-card {
  display: grid; grid-template-columns: 1.25fr 1fr;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-3); overflow: hidden; box-shadow: var(--sh-2);
}

/* ---- controls ---- */
.calc-controls { padding: clamp(26px, 3.4vw, 50px); }
.calc-field { padding-block: clamp(20px, 2.4vw, 30px); border-top: 1px solid var(--line-2); }
.calc-field:first-child { border-top: 0; padding-top: 0; }
.calc-field__lab {
  display: flex; align-items: baseline; justify-content: space-between; gap: 14px;
  font-family: var(--font-display); font-weight: 700; font-size: .76rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 16px;
}
.calc-field__val { font-size: .92rem; letter-spacing: 0; text-transform: none; color: var(--ink); font-weight: 700; }
.calc-field__val b { color: var(--accent); }

.opt-row { display: flex; flex-wrap: wrap; gap: 10px; }
.opt {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 17px; border-radius: var(--r-pill);
  border: 1.5px solid var(--line); background: var(--surface);
  font-family: var(--font-display); font-weight: 600; font-size: .92rem; color: var(--ink-2);
  cursor: pointer; transition: transform var(--dur-fast) var(--ease);
}
.opt:hover { border-color: var(--ink-3); }
.opt:active { transform: scale(.97); }
.opt.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.calc-hint { margin: 12px 0 0; max-width: 60ch; font-size: .88rem; line-height: 1.5; color: var(--ink-2); }
.calc-hint[hidden] { display: none; }
/* ряд вариантов с картинкой (PARITY-CHECK 123) */
.opt-row.opt-row--tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.opt-row--tiles .opt { flex-direction: column; align-items: stretch; gap: 10px; padding: 6px 6px 12px; border-radius: var(--r-2); text-align: left; }
.opt__img { display: block; aspect-ratio: 1; border-radius: var(--r-1); box-shadow: none; }
.opt__lab { padding-inline: 6px; line-height: 1.3; }
.opt__ic { width: 18px; height: 18px; }
.opt__ic svg { width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.7; }

/* range */
.range-wrap { padding-top: 4px; }
.range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 6px;
  /* outline: none тут был, пока в проекте не было стилей фокуса; теперь
     кольцо задаётся глобально в base.css, и гасить его нельзя */
  border-radius: 999px; background: var(--line); cursor: pointer;
}
.range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; border: 2px solid var(--accent); box-shadow: var(--sh-2); cursor: grab; transition: transform var(--dur-fast) var(--ease);
}
.range::-webkit-slider-thumb:active { transform: scale(1.12); cursor: grabbing; }
.range::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: #fff; border: 2px solid var(--accent); box-shadow: var(--sh-2); cursor: grab; }
.range-ticks { display: flex; justify-content: space-between; margin-top: 10px; font-family: var(--font-display); font-weight: 600; font-size: .76rem; color: var(--ink-3); }

/* toggle chips */
.chip-toggle { border-color: var(--line); }
.chip-toggle.is-on { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-deep); }
.chip-toggle .opt__check { width: 16px; height: 16px; border-radius: 50%; border: 1.5px solid currentColor; display: grid; place-items: center; }
.chip-toggle.is-on .opt__check { background: var(--accent); border-color: var(--accent); }
.chip-toggle .opt__check svg { width: 11px; height: 11px; opacity: 0; stroke: #fff; stroke-width: 2.6; fill: none; transition: opacity var(--dur-fast) var(--ease); }
.chip-toggle.is-on .opt__check svg { opacity: 1; }

/* ---- summary (accent panel) ---- */
.calc-summary {
  background: var(--accent); color: #fff;
  padding: clamp(28px, 3.4vw, 48px); display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.calc-summary__glow { position: absolute; right: -30%; top: -20%; width: 80%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle at 40% 40%, rgba(255,255,255,.24), transparent 62%); pointer-events: none; }
/* кадр собранного изделия над сводкой (PARITY-CHECK 124) */
.calc-view { margin: 0 0 24px; aspect-ratio: 4 / 3; box-shadow: none; }
.calc-view[hidden] { display: none; }
.calc-summary__lab { position: relative; font-family: var(--font-display); font-weight: 700; font-size: .74rem; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.78); }
.calc-summary__type { position: relative; font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; margin-top: 6px; color: #fff; }
.calc-summary__inc { position: relative; font-size: .86rem; line-height: 1.5; color: rgba(255,255,255,.86); margin-top: 8px; }
.calc-price { position: relative; font-family: var(--font-display); font-weight: 800; line-height: 1; letter-spacing: -.03em; margin: 18px 0 6px; display: flex; align-items: baseline; gap: .25em; flex-wrap: wrap; }
.calc-price__pre { font-size: 1.1rem; font-weight: 600; color: rgba(255,255,255,.78); }
.calc-price__num { font-size: clamp(2.6rem, 4.4vw, 3.9rem); font-variant-numeric: tabular-nums; }
.calc-price__cur { font-size: clamp(1.6rem, 2.6vw, 2.2rem); }
.calc-month { position: relative; font-family: var(--font-display); font-weight: 600; font-size: .96rem; color: rgba(255,255,255,.9); padding: 12px 0 4px; }
.calc-month b { color: #fff; }

.calc-break { position: relative; margin: 22px 0; border-top: 1px solid rgba(255,255,255,.22); }
.calc-break__row { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; padding: 11px 0; border-bottom: 1px solid rgba(255,255,255,.16); font-size: .9rem; }
.calc-break__row span { color: rgba(255,255,255,.74); }
.calc-break__row b { font-weight: 700; color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; }

.calc-summary__spacer { flex: 1; min-height: 8px; }
.calc-cta { width: 100%; justify-content: center; background: #fff; color: var(--accent-deep); box-shadow: 0 14px 30px rgba(0,0,0,.18); }
.calc-cta:hover { box-shadow: 0 20px 44px rgba(0,0,0,.26); }
.calc-note { position: relative; font-size: .8rem; color: rgba(255,255,255,.72); margin-top: 16px; line-height: 1.5; }

/* тизер вместо карточки на телефоне — перенос .m-band (design_2/assets/mobile.css:72-77) */
.calc__teaser { display: none; }

/* выбор набора на /raschet/ — ряд .opt ссылками (PARITY-CHECK 118) */
.calc-sets { margin-bottom: clamp(20px, 2.4vw, 30px); }
.opt[hidden] { display: none; }

@media (max-width: 900px) {
  .calc-card { grid-template-columns: 1fr; }
  .calc-summary { order: -1; }
}
@media (max-width: 767px) {
  .opt-row.opt-row--tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc--teased .calc__head,
  .calc--teased .calc-card { display: none; }
  .calc__teaser { display: block; padding: 28px 22px; border-radius: var(--r-3); background: var(--accent); color: #fff; }
  .calc__teaser-eye { color: rgba(255,255,255,.8); }
  .calc__teaser-eye::before { background: rgba(255,255,255,.8); }
  .calc__teaser-t { display: block; font-family: var(--font-display); font-weight: 800; font-size: 1.6rem; line-height: 1.1; letter-spacing: -.02em; margin: 12px 0 10px; }
  .calc__teaser-p { display: block; color: rgba(255,255,255,.86); font-size: .92rem; margin: 0 0 20px; }
  .calc__teaser-btn { justify-content: center; width: 100%; }
}
@media (max-width: 520px) {
  .opt { padding: 10px 14px; font-size: .88rem; }
}
