/* ============ КАЛЬКУЛЯТОР СТОИМОСТИ ============ */
.scene--calc { padding-top: clamp(40px, 6vh, 72px); }

/* --- Акция --- */
.calc-promo {
  margin-top: 36px;
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 18px 22px;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(56, 189, 248, 0.1), rgba(139, 92, 246, 0.1) 55%, rgba(236, 72, 153, 0.1));
  border: 1px solid rgba(139, 92, 246, 0.2);
}
.calc-promo__badge {
  flex: none;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: #fff;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--accent-gradient);
  letter-spacing: -0.01em;
}
.calc-promo__text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.calc-promo__text b { font-family: var(--font-display); font-weight: 600; font-size: 17px; color: var(--line); }
.calc-promo__text span { font-size: 14.5px; color: var(--ink-2); }
.calc-promo__spots { display: flex; flex-direction: column; align-items: flex-end; gap: 7px; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
.calc-promo__dots { display: flex; gap: 5px; }
.calc-promo__dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent-gradient); }
.calc-promo__dot.is-taken { background: rgba(11, 14, 20, 0.15); }

/* --- Сетка --- */
.calc {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
  gap: 24px;
  align-items: start;
}

.calc-step { border: 0; padding: 0; margin: 0 0 28px; min-width: 0; }
.calc-step[hidden] { display: none; }
.calc-step legend {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  color: var(--line);
  margin-bottom: 14px;
  padding: 0;
}
.calc-step__group { font-size: 14px; font-weight: 600; color: var(--ink-2); margin: 4px 0 10px; }

/* --- Выбор услуги --- */
.calc-chips { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-bottom: 14px; }
.calc-chip { position: relative; cursor: pointer; display: block; }
.calc-chip input { position: absolute; opacity: 0; pointer-events: none; }
.calc-chip__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  height: 100%;
  padding: 14px 16px;
  border-radius: 14px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s var(--ease);
}
.calc-chip:hover .calc-chip__body { border-color: rgba(139, 92, 246, 0.45); }
.calc-chip input:checked + .calc-chip__body {
  border-color: var(--accent-2);
  box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.15);
}
.calc-chip input:focus-visible + .calc-chip__body { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.calc-chip__title { font-weight: 600; font-size: 15px; color: var(--ink); line-height: 1.35; }
.calc-chip__meta { font-size: 13px; color: var(--ink-2); line-height: 1.4; }
.calc-chip__price { margin-top: auto; padding-top: 6px; font-weight: 600; font-size: 14.5px; color: var(--accent-ink); }
.calc-chip__price s { color: var(--ink-2); font-weight: 400; margin-right: 4px; }

/* --- Количество --- */
.calc-qty { display: flex; align-items: center; gap: 10px; }
.calc-qty__btn {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  font-size: 22px;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.12s;
}
.calc-qty__btn:hover { border-color: var(--accent-2); }
.calc-qty__btn:active { transform: scale(0.94); }
.calc-qty__btn:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.calc-qty__val { min-width: 36px; text-align: center; font-family: var(--font-display); font-weight: 600; font-size: 22px; color: var(--line); }
.calc-qty__unit { font-size: 15px; color: var(--ink-2); }

/* --- Опции --- */
.calc-opts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.calc-opt {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid var(--line-soft);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.2s;
}
.calc-opt:hover { border-color: rgba(139, 92, 246, 0.45); }
.calc-opt input { position: absolute; opacity: 0; pointer-events: none; }
.calc-opt__box {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border-radius: 6px;
  border: 1.5px solid rgba(11, 14, 20, 0.3);
  transition: background 0.2s, border-color 0.2s;
}
.calc-opt input:checked ~ .calc-opt__box {
  border-color: transparent;
  background: var(--accent-gradient) center / cover;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.2);
}
.calc-opt input:checked ~ .calc-opt__box::after {
  content: '';
  display: block;
  width: 6px;
  height: 10px;
  margin: 2px auto 0;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.calc-opt:has(input:checked) { border-color: var(--accent-2); }
.calc-opt input:focus-visible ~ .calc-opt__box { outline: 2px solid var(--accent-ink); outline-offset: 2px; }
.calc-opt__text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.calc-opt__text b { font-weight: 600; font-size: 14.5px; color: var(--ink); }
.calc-opt__text span { font-size: 13px; color: var(--ink-2); }
.calc-opt__price { font-size: 14px; font-weight: 600; color: var(--accent-ink); white-space: nowrap; }

/* --- Срочность --- */
.calc-rush { display: flex; align-items: center; gap: 14px; cursor: pointer; font-size: 14.5px; color: var(--ink-2); position: relative; }
.calc-rush b { color: var(--ink); font-weight: 600; margin-right: 4px; }
.calc-rush input { position: absolute; opacity: 0; pointer-events: none; }
.calc-rush__switch {
  flex: none;
  position: relative;
  width: 44px;
  height: 26px;
  border-radius: 13px;
  background: rgba(11, 14, 20, 0.15);
  transition: background 0.25s;
}
.calc-rush__switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(11, 14, 20, 0.25);
  transition: transform 0.25s var(--ease);
}
.calc-rush input:checked + .calc-rush__switch { background: var(--accent-gradient); }
.calc-rush input:checked + .calc-rush__switch::after { transform: translateX(18px); }
.calc-rush input:focus-visible + .calc-rush__switch { outline: 2px solid var(--accent-ink); outline-offset: 2px; }

/* --- Итог --- */
.calc__sum {
  position: sticky;
  top: calc(var(--nav-h) + 20px);
  padding: 24px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  box-shadow: 0 30px 60px -30px rgba(11, 14, 20, 0.2);
}
.calc-sum__title { font-family: var(--font-display); font-weight: 600; font-size: 18px; color: var(--line); margin-bottom: 14px; }
.calc-sum__lines { list-style: none; margin: 0 0 16px; padding: 0 0 14px; border-bottom: 1px solid var(--line-soft); }
.calc-sum__lines li { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; color: var(--ink-2); padding: 5px 0; }
.calc-sum__lines li span:last-child { color: var(--ink); white-space: nowrap; }
.calc-sum__total { display: flex; flex-direction: column; gap: 2px; margin-bottom: 10px; }
.calc-sum__old { font-size: 15px; color: var(--ink-2); text-decoration: line-through; min-height: 1em; }
.calc-sum__new { font-family: var(--font-display); font-weight: 700; font-size: clamp(30px, 3.4vw, 38px); letter-spacing: -0.02em; color: var(--line); }
.calc-sum__note { font-size: 13px; color: var(--ink-2); margin-bottom: 18px; line-height: 1.5; }
.calc-btn {
  display: block;
  text-align: center;
  padding: 14px 18px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid var(--line-soft);
  background: var(--surface);
  transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}
.calc-btn + .calc-btn { margin-top: 10px; }
.calc-btn:hover { border-color: var(--accent-2); }
.calc-btn:active { transform: scale(0.98); }
.calc-btn:focus-visible { outline: 2px solid var(--accent-ink); outline-offset: 3px; }
.calc-btn--main { color: #fff; border-color: transparent; background: var(--line); }
.calc-btn--main:hover { box-shadow: 0 12px 28px -10px rgba(11, 14, 20, 0.5); border-color: transparent; }
.calc-sum__hint { font-size: 13px; color: var(--accent-ink); margin-top: 10px; min-height: 1.2em; }

@media (max-width: 960px) {
  .calc { grid-template-columns: 1fr; }
  .calc__sum { position: static; }
}
@media (max-width: 720px) {
  .calc-promo { flex-wrap: wrap; gap: 14px; }
  .calc-promo__spots { align-items: flex-start; width: 100%; }
  .calc-opts { grid-template-columns: 1fr; }
  .calc-chips { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .calc-chip__body, .calc-rush__switch, .calc-rush__switch::after { transition: none; }
}
