/* Калькулятор «Банкеты» (components/calc/BanquetCalc.tsx).
   Вечерний зал: винно-чёрный фон, текст цвета скатерти, шампань — единственный
   акцент. Заголовки Georgia, схема зала — SVG с волосяными линиями,
   итог крутится барабаном. Всё заперто под .bnq. */

.bnq {
  --bnq-bg: #19121a; --bnq-bg2: #20171f; --bnq-ink: #f2ece3; --bnq-mute: #a3958f; --bnq-line: rgba(242, 236, 227, .14);
  --bnq-gold: #d8bf8c; --bnq-gold-d: #b89c66; --bnq-serif: Georgia, 'Times New Roman', serif;
  display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  grid-template-areas: 'plan ctrl' 'sum ctrl'; grid-template-rows: auto 1fr;
  min-height: 560px; background: var(--bnq-bg); color: var(--bnq-ink);
  font-family: var(--font-onest, system-ui, sans-serif);
}
.bnq button { font-family: inherit; }
.bnq h3 { margin: 0; font-family: var(--bnq-serif); font-weight: 400; letter-spacing: 0; }

/* ── схема зала ── */
.bnq-plan { grid-area: plan; padding: 30px 30px 0; }
.bnq-plan-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.bnq-plan-head h3 { font-size: 1.15rem; }
.bnq-plan-head span { font-size: .8rem; color: var(--bnq-mute); font-variant-numeric: tabular-nums; }
.bnq-svg { display: block; width: 100%; height: auto; margin-top: 14px; }
.bnq-wall { fill: none; stroke: var(--bnq-line); stroke-width: 1.2; }
.bnq-door { fill: none; stroke: var(--bnq-line); stroke-width: 1; stroke-dasharray: 2 3; }
.bnq-table { fill: var(--bnq-bg2); stroke: var(--bnq-gold); stroke-width: 1; }
.bnq-long { fill: rgba(216, 191, 140, .08); }
.bnq-line-t { fill: rgba(216, 191, 140, .14); stroke: var(--bnq-gold); stroke-width: .8; }
.bnq-tno { font: 11px var(--bnq-serif); fill: var(--bnq-gold); opacity: .8; }
.bnq-lbl { font: 10px var(--bnq-serif); fill: var(--bnq-mute); letter-spacing: .04em; }
.bnq-seat { fill: none; stroke: rgba(242, 236, 227, .3); stroke-width: 1; transition: fill .25s, stroke .25s; }
.bnq-seat.is-on { fill: var(--bnq-ink); stroke: var(--bnq-ink); }
.bnq-guest { fill: var(--bnq-ink); }
.bnq-cup { fill: none; stroke: var(--bnq-gold); stroke-width: 1; }
.bnq-pop { transform-box: fill-box; transform-origin: center; animation: bnq-pop .45s var(--d, 0ms) cubic-bezier(.2, .8, .3, 1.15) both; }
@keyframes bnq-pop { from { opacity: 0; transform: scale(.4); } }

/* ── параметры ── */
.bnq-ctrl { grid-area: ctrl; padding: 30px 30px 26px; border-left: 1px solid var(--bnq-line); display: flex; flex-direction: column; }
.bnq-h { font-size: 1.55rem; line-height: 1.2; }

.bnq-guests { display: grid; grid-template-columns: 1fr auto; align-items: baseline; margin-top: 22px; cursor: pointer; }
.bnq-guests > span { font-size: .85rem; color: var(--bnq-mute); }
.bnq-guests b { font: 400 2.1rem/1 var(--bnq-serif); color: var(--bnq-gold); font-variant-numeric: lining-nums tabular-nums; }
.bnq-guests input { grid-column: 1 / -1; width: 100%; height: 40px; margin: 4px 0 0; background: none; -webkit-appearance: none; appearance: none; cursor: pointer; }
.bnq-guests input::-webkit-slider-runnable-track { height: 2px; background: linear-gradient(90deg, var(--bnq-gold) var(--p), var(--bnq-line) var(--p)); }
.bnq-guests input::-moz-range-track { height: 2px; background: var(--bnq-line); }
.bnq-guests input::-moz-range-progress { height: 2px; background: var(--bnq-gold); }
.bnq-guests input::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; margin-top: -9px; border-radius: 50%; background: var(--bnq-gold); border: 5px solid var(--bnq-bg); box-shadow: 0 0 0 1px var(--bnq-gold); }
.bnq-guests input::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: var(--bnq-gold); border: 5px solid var(--bnq-bg); box-shadow: 0 0 0 1px var(--bnq-gold); }

/* формат — как строки винной карты */
.bnq-fmt { margin-top: 10px; border-top: 1px solid var(--bnq-line); }
.bnq-fmt button {
  display: grid; grid-template-columns: 1fr auto; gap: 2px 14px; width: 100%; min-height: 54px; padding: 10px 0 10px 18px;
  position: relative; background: none; border: 0; border-bottom: 1px solid var(--bnq-line);
  color: var(--bnq-ink); text-align: left; cursor: pointer;
}
.bnq-fmt button::before {
  content: ''; position: absolute; left: 2px; top: 17px; width: 6px; height: 6px; transform: rotate(45deg) scale(.4);
  border: 1px solid var(--bnq-mute); opacity: .7; transition: transform .2s, background .2s, border-color .2s;
}
.bnq-fmt button[aria-checked="true"]::before { transform: rotate(45deg) scale(1); background: var(--bnq-gold); border-color: var(--bnq-gold); opacity: 1; }
.bnq-fmt b { font: 400 1.08rem/1.2 var(--bnq-serif); }
.bnq-fmt span { grid-column: 1; font-size: .76rem; color: var(--bnq-mute); }
.bnq-fmt em { grid-column: 2; grid-row: 1 / 3; align-self: center; font-style: normal; font-size: .8rem; color: var(--bnq-mute); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bnq-fmt button[aria-checked="true"] em { color: var(--bnq-gold); }
.bnq-fmt button:hover b { color: var(--bnq-gold); }

.bnq-menu { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 16px; border: 1px solid var(--bnq-line); }
.bnq-menu button {
  min-height: 42px; padding: 8px 4px; background: none; border: 0; border-left: 1px solid var(--bnq-line);
  color: var(--bnq-mute); font-size: .84rem; cursor: pointer; transition: color .15s, background .15s;
}
.bnq-menu button:first-child { border-left: 0; }
.bnq-menu button:hover { color: var(--bnq-ink); }
.bnq-menu button[aria-checked="true"] { color: var(--bnq-bg); background: var(--bnq-gold); }

.bnq-ex { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; margin-top: 14px; }
.bnq-ex label { display: flex; gap: 10px; align-items: flex-start; padding: 9px 0; min-height: 44px; cursor: pointer; }
.bnq-ex input {
  flex: none; width: 16px; height: 16px; margin: 2px 0 0; -webkit-appearance: none; appearance: none; cursor: pointer;
  border: 1px solid var(--bnq-mute); background: none; display: grid; place-items: center;
}
.bnq-ex input::after { content: ''; width: 8px; height: 8px; background: var(--bnq-gold); transform: scale(0); transition: transform .15s; }
.bnq-ex input:checked { border-color: var(--bnq-gold); }
.bnq-ex input:checked::after { transform: scale(1); }
.bnq-ex b { display: block; font-size: .85rem; font-weight: 500; }
.bnq-ex small { display: block; margin-top: 2px; font-size: .74rem; color: var(--bnq-mute); font-variant-numeric: tabular-nums; }

/* ── итог ── */
.bnq-sum { grid-area: sum; padding: 8px 30px 28px; display: flex; flex-direction: column; justify-content: flex-end; }
.bnq-rows div { display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--bnq-line); font-size: .8rem; color: var(--bnq-mute); font-variant-numeric: tabular-nums; }
.bnq-rows b { font-weight: 500; color: var(--bnq-ink); }
.bnq-total { display: flex; justify-content: space-between; align-items: flex-end; gap: 12px; margin: 14px 0 16px; }
.bnq-total > span { font-size: .82rem; color: var(--bnq-mute); padding-bottom: 6px; font-variant-numeric: tabular-nums; }
.bnq-total b { font: 400 2.5rem/1 var(--bnq-serif); color: var(--bnq-ink); white-space: nowrap; }
.bnq-total small { font: 500 .85rem var(--font-onest, system-ui, sans-serif); color: var(--bnq-gold); }
.bnq-roll { display: inline-flex; align-items: flex-end; vertical-align: bottom; font-variant-numeric: lining-nums tabular-nums; }
.bnq-dig { display: inline-block; height: 1.15em; overflow: hidden; }
.bnq-dig > span { display: block; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.bnq-dig i { display: block; height: 1.15em; line-height: 1.15em; font-style: normal; text-align: center; }
.bnq-sp { width: .25em; }
.bnq-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bnq-btn {
  min-height: 52px; padding: 14px 18px; border: 1px solid var(--bnq-gold); cursor: pointer;
  background: var(--bnq-gold); color: var(--bnq-bg); font-size: .95rem; font-weight: 600; letter-spacing: .01em; transition: background .15s;
}
.bnq-btn:hover { background: #e6d1a6; }
.bnq-btn:focus-visible, .bnq-fmt button:focus-visible, .bnq-menu button:focus-visible, .bnq-ex input:focus-visible, .bnq-guests input:focus-visible {
  outline: 2px solid var(--bnq-gold); outline-offset: 3px;
}

@media (max-width: 720px) {
  .bnq { grid-template-columns: 1fr; grid-template-areas: 'plan' 'ctrl' 'sum'; grid-template-rows: auto; min-height: 0; }
  .bnq-plan { padding: 22px 18px 0; }
  .bnq-ctrl { padding: 22px 18px 8px; border-left: 0; border-top: 1px solid var(--bnq-line); margin-top: 18px; }
  .bnq-sum { padding: 8px 18px 22px; }
  .bnq-ex { gap: 0 12px; }
  .bnq-menu button { font-size: .78rem; }
  .bnq-total b { font-size: 2.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  .bnq-pop { animation: none; }
  .bnq-dig > span, .bnq-seat, .bnq-fmt button::before, .bnq-ex input::after { transition: none; }
}
