/* BANSUR 28.11.2026: окно новой корзины (bansur-cart.js). Макет: docs/oformlenie/maket.src.html.
   Всё под префиксом bcart-, чтобы не задевать bootstrap и стили темы. */
.bcart-sheet {
	--bc-red: #CA142B; --bc-red-hi: #E2304A; --bc-blue: #278FDE; --bc-green: #1BA35C; --bc-green-bg: #DDF5E7;
	--bc-ink: #1D2C22; --bc-ink-2: #5B6B61; --bc-sky: #E7EFF6; --bc-sky-2: #F3F7FB; --bc-line: #DCE7F1;
	--bc-warn-bg: #FFF4E0; --bc-warn: #8A5A00; --bc-bad-bg: #FBE3E7;
	position: fixed; inset: 0; z-index: 2147483600; display: grid; place-items: center; padding: 16px;
	background: rgba(12,20,16,.42); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
	font-family: "Wix Madefor Display", 'Wix', -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 16px; line-height: 1.5; color: var(--bc-ink);
	-webkit-font-smoothing: antialiased;
}
.bcart-sheet[hidden] { display: none !important; }
.bcart-sheet *, .bcart-sheet *::before, .bcart-sheet *::after { box-sizing: border-box; }
:where(.bcart-sheet) button { font: inherit; color: inherit; cursor: pointer; }
.bcart-sheet :focus-visible { outline: 2px solid var(--bc-blue); outline-offset: 3px; }
html.bcart-lock, html.bcart-lock body { overflow: hidden; }
.bcart-num { font-variant-numeric: tabular-nums; }

.bcart-box { position: relative; width: min(640px, 100%); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain;
	border-radius: 32px; padding: 28px; background: linear-gradient(150deg, rgba(255,255,255,.98), rgba(244,248,252,.96)); border: 1px solid rgba(255,255,255,.9);
	box-shadow: inset 0 1px 0 #fff, 0 40px 90px -30px rgba(12,20,16,.55); animation: bcart-rise .4s cubic-bezier(.2,.8,.2,1); }
@keyframes bcart-rise { from { transform: translateY(18px); opacity: 0; } }
.bcart-box h2 { margin: 0 48px 0 0; font: 700 30px/1.05 Bellota, Georgia, serif; text-transform: uppercase; color: var(--bc-red); text-wrap: balance; }
.bcart-x { position: absolute; right: 18px; top: 18px; width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--bc-sky); font-size: 22px; line-height: 1; padding: 0; }
.bcart-box h4 { margin: 24px 0 10px; font-size: 12.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--bc-ink-2); font-weight: 600; font-family: inherit; }
.bcart-who { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 10px; font-size: 14px; color: var(--bc-ink-2); }
.bcart-who span { min-width: 0; }
.bcart-who i { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--bc-green); }

.bcart-lines { display: grid; gap: 10px; margin-top: 18px; }
.bcart-line { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px; border-radius: 18px; background: #fff; border: 1px solid var(--bc-line); transition: border-color .3s, background .3s; }
.bcart-line.is-bad { border-color: #F0B44C; background: var(--bc-warn-bg); }
.bcart-line img, .bcart-line .bcart-noimg { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: var(--bc-sky-2); display: block; }
.bcart-nm { min-width: 0; }
.bcart-nm a, .bcart-nm b { display: block; font-size: 15px; font-weight: 600; line-height: 1.25; color: var(--bc-ink); text-decoration: none; }
.bcart-nm a:hover { color: var(--bc-red); }
.bcart-nm small { display: block; color: var(--bc-ink-2); font-size: 13px; }
.bcart-nm small.is-lim { color: var(--bc-warn); }
.bcart-qty { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bc-sky); }
.bcart-qty button { width: 32px; height: 32px; border-radius: 50%; border: 0; background: #fff; font-size: 18px; line-height: 1; display: grid; place-items: center; padding: 0; }
.bcart-qty button:disabled { opacity: .35; cursor: default; }
.bcart-qty output { min-width: 26px; text-align: center; font-weight: 700; }
.bcart-r { text-align: right; font-weight: 700; white-space: nowrap; min-width: 84px; }
.bcart-del { display: block; margin: 2px 0 0 auto; border: 0; background: transparent; padding: 0; font-size: 12.5px; font-weight: 500; color: var(--bc-ink-2); text-decoration: underline; text-underline-offset: 3px; }
.bcart-del:hover { color: var(--bc-red); }
.bcart-empty { margin-top: 18px; padding: 26px; text-align: center; color: var(--bc-ink-2); border-radius: 18px; background: var(--bc-sky-2); }

.bcart-dest { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bcart-dest label { position: relative; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 2px 12px; align-items: center; margin: 0; padding: 12px 14px; border-radius: 18px; border: 1px solid var(--bc-line); background: #fff; cursor: pointer; font-weight: 400; transition: border-color .25s, box-shadow .25s, background .25s; }
.bcart-dest .bcart-ic2 { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; background: var(--bc-sky); color: var(--bc-red); display: grid; place-items: center; }
.bcart-dest .bcart-ic2 svg { width: 24px; height: 24px; }
.bcart-dest b { font-size: 14px; line-height: 1.25; }
.bcart-dest small { font-size: 12px; color: var(--bc-ink-2); line-height: 1.35; }
.bcart-dest input, .bcart-pay input { position: absolute; opacity: 0; pointer-events: none; }
.bcart-dest label:has(input:checked) { border-color: var(--bc-blue); background: var(--bc-sky-2); box-shadow: 0 0 0 3px rgba(39,143,222,.18); }
.bcart-dest label.is-on { border-color: var(--bc-blue); background: var(--bc-sky-2); box-shadow: 0 0 0 3px rgba(39,143,222,.18); }

.bcart-acc { width: 100%; display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 18px; border: 1px solid var(--bc-line); background: #fff; text-align: left; transition: border-color .3s, box-shadow .3s, background .3s; }
.bcart-acc .bcart-ic { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: var(--bc-sky); color: var(--bc-red); transition: background .3s, color .3s; }
.bcart-acc .bcart-ic svg { width: 24px; height: 24px; }
.bcart-acc b { display: block; font-size: 15px; }
.bcart-acc small { display: block; font-size: 13px; color: var(--bc-ink-2); }
.bcart-acc.is-on { border-color: var(--bc-green); background: #F4FBF7; box-shadow: 0 0 0 3px rgba(27,163,92,.14); }
.bcart-acc.is-on .bcart-ic { background: var(--bc-green-bg); color: var(--bc-green); }
.bcart-acc.is-on small { color: var(--bc-green); font-weight: 600; }
.bcart-acc.is-zero { cursor: default; }
.bcart-acc.is-zero .bcart-ic { color: var(--bc-ink-2); }
.bcart-sw { position: relative; width: 52px; height: 30px; border-radius: 999px; background: #C9D5E0; transition: background .3s; flex: none; }
.bcart-sw::after { content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.bcart-acc.is-on .bcart-sw { background: var(--bc-green); }
.bcart-acc.is-on .bcart-sw::after { transform: translateX(22px); }
.bcart-restlbl { margin: 14px 0 8px; font-size: 14px; color: var(--bc-ink-2); }
.bcart-restlbl b { color: var(--bc-ink); }
.bcart-pay { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bcart-pay label { position: relative; display: grid; gap: 2px; align-content: start; margin: 0; padding: 12px 14px; border-radius: 16px; border: 1px solid var(--bc-line); background: #fff; cursor: pointer; font-size: 14px; font-weight: 600; transition: border-color .2s, box-shadow .2s; }
.bcart-pay label small { font-weight: 500; color: var(--bc-ink-2); font-size: 12px; line-height: 1.35; }
.bcart-pay label.is-on { border-color: var(--bc-blue); box-shadow: 0 0 0 3px rgba(39,143,222,.18); }
.bcart-enough { margin-top: 12px; padding: 12px 14px; border-radius: 16px; background: var(--bc-green-bg); color: #145C36; font-size: 14px; }

.bcart-cl { display: grid; grid-template-rows: 1fr; opacity: 1; transition: grid-template-rows .45s cubic-bezier(.2,.8,.2,1), opacity .35s ease; }
.bcart-cl > div { min-height: 0; overflow: hidden; }
.bcart-cl.is-shut { grid-template-rows: 0fr; opacity: 0; }
.bcart-fade { animation: bcart-fd .35s ease; }
@keyframes bcart-fd { from { opacity: 0; transform: translateY(-3px); } }

.bcart-totals { margin-top: 20px; display: grid; gap: 6px; font-size: 15px; }
.bcart-row { display: flex; justify-content: space-between; gap: 12px; }
.bcart-muted { color: var(--bc-ink-2); }
.bcart-accline { color: var(--bc-green); }
.bcart-grand { font-size: 20px; font-weight: 800; padding-top: 10px; margin-top: 4px; border-top: 1px solid var(--bc-line); }
.bcart-grand span:last-child { color: var(--bc-red); }

.bcart-btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%; height: 56px; padding: 0 24px; border-radius: 999px; border: 0; font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap; margin-top: 18px; }
.bcart-btn:hover, .bcart-btn:focus { text-decoration: none; }
.bcart-red { position: relative; overflow: hidden; color: #fff !important; background: linear-gradient(180deg, var(--bc-red-hi), var(--bc-red)); box-shadow: inset 0 1px 0 rgba(255,255,255,.35), 0 14px 30px -10px rgba(202,20,43,.7); transition: transform .2s, opacity .2s; }
.bcart-red::before { content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.45), transparent); transform: skewX(-18deg); transition: left .7s ease; }
.bcart-red:hover { transform: translateY(-1px); }
.bcart-red:hover::before { left: 120%; }
.bcart-red:disabled { opacity: .55; transform: none; cursor: default; }
.bcart-soft { background: var(--bc-sky); color: var(--bc-ink) !important; }
.bcart-soft:hover { background: #DAE6F1; }
.bcart-link { border: 0; background: transparent; padding: 0; color: var(--bc-blue); font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.bcart-fine { margin: 12px 0 0; font-size: 12.5px; color: var(--bc-ink-2); text-align: center; text-wrap: balance; }
.bcart-note { margin-top: 16px; padding: 12px 14px; border-radius: 16px; font-size: 14px; }
.bcart-note.is-warn { background: var(--bc-warn-bg); color: var(--bc-warn); }
.bcart-note.is-bad { background: var(--bc-bad-bg); color: #8E0F20; }

.bcart-login { display: grid; gap: 10px; margin-top: 4px; }
.bcart-login input { height: 50px; padding: 0 16px; border-radius: 14px; border: 1px solid var(--bc-line); background: #fff; font: inherit; font-size: 15px; width: 100%; }
.bcart-login input:focus { outline: none; border-color: var(--bc-blue); box-shadow: 0 0 0 3px rgba(39,143,222,.18); }
.bcart-login .bcart-btn { margin-top: 0; }
.bcart-lk { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.bcart-lk a { color: var(--bc-blue); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.bcart-state { text-align: center; padding-top: 6px; }
.bcart-ico { width: 84px; height: 84px; margin: 4px auto 14px; border-radius: 50%; display: grid; place-items: center; }
.bcart-ico svg { width: 40px; height: 40px; }
.bcart-ico.is-ok { background: var(--bc-green-bg); color: var(--bc-green); }
.bcart-ico.is-wait { background: var(--bc-sky); color: var(--bc-blue); }
.bcart-ico.is-off { background: var(--bc-warn-bg); color: var(--bc-warn); }
.bcart-state h2 { margin: 0; }
.bcart-state p { margin: 10px auto 0; max-width: 30em; color: var(--bc-ink-2); }
.bcart-state .bcart-lines, .bcart-state .bcart-totals { text-align: left; }
.bcart-timer { display: inline-flex; align-items: baseline; gap: 8px; margin-top: 16px; padding: 10px 20px; border-radius: 999px; background: var(--bc-sky); font-size: 14px; color: var(--bc-ink-2); }
.bcart-timer b { font: 700 26px/1 Bellota, Georgia, serif; color: var(--bc-ink); font-variant-numeric: tabular-nums; }
.bcart-acts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 20px; }
.bcart-acts .bcart-btn { margin: 0; height: 52px; padding: 0 18px; }
.bcart-next { margin-top: 18px; padding: 16px; border-radius: 18px; background: var(--bc-sky); text-align: left; display: grid; grid-template-columns: 40px minmax(0, 1fr); gap: 4px 12px; align-items: center; }
.bcart-next .bcart-ic2 { grid-row: span 2; width: 40px; height: 40px; border-radius: 12px; background: #fff; color: var(--bc-red); display: grid; place-items: center; }
.bcart-next .bcart-ic2 svg { width: 24px; height: 24px; }
.bcart-next b { font-size: 15px; }
.bcart-next small { color: var(--bc-ink-2); font-size: 13px; }
.bcart-spin { width: 40px; height: 40px; border-radius: 50%; border: 4px solid var(--bc-sky); border-top-color: var(--bc-blue); animation: bcart-sp 1s linear infinite; }
@keyframes bcart-sp { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
	.bcart-sheet { place-items: end stretch; padding: 0; }
	.bcart-box { width: 100%; max-height: 92vh; max-height: 92dvh; border-radius: 28px 28px 0 0; padding: 22px max(16px, env(safe-area-inset-left, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)); animation-name: bcart-up; }
	@keyframes bcart-up { from { transform: translateY(40px); opacity: 0; } }
	.bcart-box h2 { font-size: 25px; }
	.bcart-line { grid-template-columns: 48px minmax(0, 1fr) auto; }
	.bcart-line img, .bcart-line .bcart-noimg { width: 48px; height: 48px; }
	.bcart-line .bcart-qty { grid-column: 2; justify-self: start; }
	.bcart-r { grid-column: 3; grid-row: 1 / span 2; align-self: center; min-width: 0; }
	.bcart-acts, .bcart-dest { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .bcart-sheet *, .bcart-sheet *::before, .bcart-sheet *::after { animation: none !important; transition: none !important; } }
