/* Конфигуратор батареи — интерфейс для компьютера (от 1024px): шаги слева, сводка справа.
   Поведение — battery-configurator-d.js. Исходная вёрстка (.bc-desk) остаётся скрытым движком расчёта. */

.bcd { display: none; }

@media (min-width: 1024px) {
  .bcd-ready .bc-desk { display: none !important; }

  .bcd {
    --c-ink: #1b1b1b; --c-muted: #6f6f6f; --c-line: #e4e4e4; --c-soft: #f8f8f6;
    --c-accent: #febd22; --c-accent-soft: #fffaeb; --c-orange: #c24d00;
    display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; margin: 8px 0 40px;
    color: var(--c-ink); font-size: 16px; line-height: 1.4;
  }
  .bcd *, .bcd *::before, .bcd *::after { box-sizing: border-box; }
  .bcd button { font: inherit; color: inherit; cursor: pointer; margin: 0; }
  .bcd h2 { margin: 0; font-size: 21px; line-height: 1.2; text-transform: none; letter-spacing: 0; }
  .bcd [hidden] { display: none !important; }
  .bcd b { font-weight: 700; }

  .bcd-steps { flex: 999 1 540px; min-width: 0; display: flex; flex-direction: column; gap: 18px; }
  .bcd-card { border: 1px solid var(--c-line); border-radius: 16px; padding: 20px 22px; background: #fff; }
  .bcd-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; min-width: 0; }
  .bcd-num { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%; background: var(--c-accent);
    font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
  .bcd-picked { margin-left: auto; font-size: 14px; color: var(--c-muted); text-align: right; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

  /* ---------- ячейки ---------- */
  .bcd-cells { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
  .bcd-cell { border: 2px solid var(--c-line); border-radius: 14px; background: #fff; padding: 14px; text-align: left;
    display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, box-shadow .15s, transform .15s; }
  .bcd-cell:hover { border-color: #cfcfcf; transform: translateY(-2px); }
  .bcd-cell.is-on { border-color: var(--c-accent); background: #fffdf6; box-shadow: 0 6px 18px rgba(254, 189, 34, .28); }
  .bcd-cell-top { display: flex; gap: 12px; align-items: flex-end; min-height: 80px; }
  .bcd-cellpic { flex: 0 0 auto; display: block; }
  .bcd-cell-name { display: block; font-weight: 700; font-size: 18px; line-height: 1.1; }
  .bcd-chem { display: inline-block; margin-top: 5px; font-size: 12px; font-weight: 600; padding: 2px 8px;
    border-radius: 999px; background: #f0f0ee; color: #444; }
  .bcd-spec { display: block; font-size: 13px; color: var(--c-muted); }
  .bcd-spec-row { display: flex; justify-content: space-between; gap: 6px; margin-bottom: 3px; }
  .bcd-spec-row b { color: var(--c-ink); }
  .bcd-spec-row.bcd-hi b { color: var(--c-orange); }
  .bcd-bar { height: 5px; border-radius: 3px; background: #eee; margin-bottom: 8px; overflow: hidden; }
  .bcd-bar i { display: block; height: 100%; background: var(--c-accent); border-radius: 3px; }
  .bcd-cell-price { margin-top: auto; display: flex; justify-content: space-between; align-items: baseline;
    border-top: 1px dashed var(--c-line); padding-top: 8px; font-size: 13px; color: var(--c-muted); }
  .bcd-cell-price b { font-size: 18px; color: var(--c-ink); }

  .bcd-more { font-size: 14px; color: #444; }
  .bcd-card + .bcd-more, .bcd-cells + .bcd-more { margin-top: 14px; }
  .bcd-more summary { cursor: pointer; font-weight: 600; color: var(--c-orange); }
  .bcd-more-body { margin-top: 10px; }
  .bcd-more-body img { max-width: 100%; height: auto; }
  .bcd-more-body br + br + br { display: none; }

  /* ---------- S / P ---------- */
  .bcd-sp { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .bcd-sp-box { background: var(--c-soft); border-radius: 14px; padding: 16px; min-width: 0; }
  .bcd-sp-lbl { font-weight: 700; }
  .bcd-sp-hint { font-size: 13px; color: var(--c-muted); margin-bottom: 10px; min-height: 36px; }
  .bcd-stepper { display: flex; align-items: center; gap: 8px; }
  .bcd-stepper button { width: 44px; height: 44px; padding: 0; border-radius: 50%; border: 1.5px solid #dcdcdc;
    background: #fff; font-size: 22px; line-height: 1; display: inline-flex; align-items: center; justify-content: center; }
  .bcd-stepper button:hover:not(:disabled) { border-color: var(--c-accent); background: #fff6dc; }
  .bcd-stepper button:disabled { opacity: .4; cursor: default; }
  .bcd-x { font-size: 22px; font-weight: 700; color: var(--c-muted); width: 22px; }
  .bcd .bcd-sp-input { width: 72px; height: 44px; border: 1.5px solid #dcdcdc; border-radius: 10px; text-align: center;
    font: inherit; font-size: 22px; font-weight: 700; padding: 0; background: #fff; box-shadow: none; }
  .bcd .bcd-range { -webkit-appearance: none; appearance: none; width: 100%; height: 28px; margin: 12px 0 8px;
    background: transparent; border: 0; padding: 0; cursor: pointer; --p: 0%; }
  .bcd-range:focus { outline: none; }
  .bcd-range::-webkit-slider-runnable-track { height: 6px; border-radius: 3px;
    background: linear-gradient(to right, var(--c-accent) var(--p), #e4e4e4 var(--p)); }
  .bcd-range::-moz-range-track { height: 6px; border-radius: 3px; background: #e4e4e4; }
  .bcd-range::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--c-accent); }
  .bcd-range::-webkit-slider-thumb { -webkit-appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
    background: #fff; border: 4px solid var(--c-accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .25); }
  .bcd-range::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 4px solid var(--c-accent); }
  .bcd-range:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(254, 189, 34, .4); }
  .bcd-chips { display: flex; flex-wrap: wrap; gap: 6px; }
  .bcd-chip { background: #fff; border: 1px solid var(--c-line); border-radius: 8px; padding: 4px 10px; font-size: 13px; color: #555; }
  .bcd-chip b { color: var(--c-ink); font-size: 15px; }
  .bcd-formula { margin-top: 12px; font-size: 13px; color: var(--c-muted); }

  /* ---------- BMS ---------- */
  .bcd-opts { display: flex; flex-direction: column; gap: 8px; }
  .bcd-opt { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; gap: 12px; align-items: center; text-align: left;
    border: 1.5px solid var(--c-line); border-radius: 12px; padding: 11px 14px; background: #fff; }
  .bcd-opt:hover { border-color: #cfcfcf; }
  .bcd-opt.is-on { border-color: var(--c-accent); background: var(--c-accent-soft); }
  .bcd-dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #c9c9c9; display: inline-flex; align-items: center; justify-content: center; }
  .bcd-opt.is-on .bcd-dot { border-color: var(--c-accent); }
  .bcd-opt.is-on .bcd-dot::after { content: ''; width: 10px; height: 10px; border-radius: 50%; background: var(--c-accent); }
  .bcd-opt-price { font-weight: 700; white-space: nowrap; }
  .bcd-warn { margin-top: 10px; background: #fff1eb; color: #8f3000; border-radius: 10px; padding: 10px 12px; font-size: 14px; }

  /* ---------- форма ---------- */
  .bcd-shapes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
  .bcd-shape { border: 2px solid var(--c-line); border-radius: 14px; padding: 12px; background: #fff; text-align: left;
    display: flex; flex-direction: column; gap: 6px; min-height: 140px; min-width: 0; }
  .bcd-shape:hover { border-color: #cfcfcf; }
  .bcd-shape.is-on { border-color: var(--c-accent); background: #fffdf6; }
  .bcd-shape-pic { height: 56px; display: flex; align-items: center; justify-content: center; }
  .bcd-shape-pic svg { max-width: 100%; }
  .bcd-shape-name { font-weight: 700; }
  .bcd-shape-price { font-size: 13px; color: var(--c-muted); margin-top: auto; }
  .bcd-dims { margin-top: 14px; }
  .bcd-custom { margin-top: 12px; }
  .bcd-custom textarea { display: block; width: 100%; min-height: 72px; border: 1.5px solid #dcdcdc; border-radius: 10px;
    padding: 10px; font: inherit; font-size: 14px; resize: vertical; margin-bottom: 6px; }

  /* ---------- зарядка ---------- */
  .bcd-pills { display: flex; gap: 8px; flex-wrap: wrap; }
  .bcd-pill { border: 1.5px solid var(--c-line); border-radius: 999px; padding: 9px 16px; background: #fff; min-height: 44px; }
  .bcd-pill:hover { border-color: #cfcfcf; }
  .bcd-pill.is-on { border-color: var(--c-accent); background: var(--c-accent); font-weight: 700; }
  .bcd-pill small { color: var(--c-muted); margin-left: 6px; font-size: 13px; }
  .bcd-pill.is-on small { color: var(--c-ink); }

  /* ---------- сводка ---------- */
  .bcd-sum { flex: 1 1 290px; max-width: 320px; position: sticky; top: 16px;
    max-height: calc(100vh - 32px); overflow-y: auto; scrollbar-width: thin; border-radius: 18px; }
  .bcd-sum-card { border-radius: 18px; background: #f5f5f3; border-top: 4px solid var(--c-accent); padding: 18px 20px 16px; }
  .bcd-sum-k { font-size: 13px; color: var(--c-muted); text-transform: uppercase; letter-spacing: .6px; }
  .bcd-sum-code { font-size: 21px; font-weight: 700; margin: 2px 0 14px; }
  .bcd-big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
  .bcd-big div { background: #fff; border-radius: 12px; padding: 10px 6px; text-align: center; box-shadow: 0 1px 2px rgba(0, 0, 0, .06); }
  .bcd-big b { display: block; font-size: 24px; line-height: 1.1; font-variant-numeric: tabular-nums; }
  .bcd-big span { font-size: 12px; color: var(--c-muted); }
  .bcd-rows { font-size: 14px; border-top: 1px solid #e4e4e0; }
  .bcd-rows div { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid #e4e4e0; }
  .bcd-rows span { color: var(--c-muted); }
  .bcd-rows b { text-align: right; }
  .bcd-range3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 14px 0 8px; }
  .bcd-range3 div { background: #fff; border-radius: 10px; padding: 8px 4px; text-align: center; }
  .bcd-range3 b { display: block; font-size: 20px; }
  .bcd-range3 span { font-size: 11px; color: var(--c-muted); }
  .bcd-note { font-size: 11px; color: var(--c-muted); line-height: 1.3; }
  .bcd-price { background: #fff; border: 1px solid var(--c-line); border-radius: 18px; padding: 18px 20px; margin-top: 12px; }
  .bcd-line { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; color: #555; padding: 3px 0; }
  .bcd-line span:last-child { white-space: nowrap; }
  .bcd-total { display: flex; justify-content: space-between; align-items: baseline; border-top: 1px solid var(--c-line); margin-top: 8px; padding-top: 10px; }
  .bcd-total b { font-size: 28px; white-space: nowrap; }
  .bcd-buy { width: 100%; margin-top: 12px !important; height: 50px; border: 0; border-radius: 12px; background: var(--c-accent);
    font-weight: 700; font-size: 17px; }
  .bcd-buy:hover:not(:disabled) { background: #f5b000; }
  .bcd-buy:disabled { opacity: .6; cursor: default; }
  .bcd-link { width: 100%; margin-top: 8px !important; min-height: 44px; border: 1.5px solid var(--c-line); border-radius: 12px;
    background: #fff; font-weight: 600; font-size: 14px; }
  .bcd-link:hover { border-color: #cfcfcf; }
  .bcd-contact { font-size: 12px; color: var(--c-muted); margin-top: 10px; }

  @media (prefers-reduced-motion: reduce) { .bcd-cell { transition: none; } .bcd-cell:hover { transform: none; } }
}
