/* Cart drawer: slides in from the right; full width on phones. */
.cart-drawer { position: fixed; inset: 0 0 0 auto; margin: 0; width: min(440px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; padding: 0; border: 0; border-left: 3px solid var(--orange); background: var(--night-2); color: var(--cream); box-shadow: -24px 0 60px rgb(0 0 0 / 45%); }
.cart-drawer[open] { animation: drawer-in .28s cubic-bezier(.2, .8, .2, 1); }
.cart-drawer::backdrop { background: rgb(10 0 30 / 65%); backdrop-filter: blur(3px); }
@keyframes drawer-in { from { transform: translateX(100%); } to { transform: none; } }

.drawer { display: flex; flex-direction: column; height: 100%; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 28px; background: url('../img/border.svg') repeat-x left bottom / 32px 14px, var(--violet); }
.drawer-head h2 { flex: 1; font-family: var(--display); font-variation-settings: 'SOFT' 100; font-weight: 900; color: var(--marigold); font-size: 1.7rem; line-height: 1.1; }
.drawer-head h2:focus { outline: none; }
.drawer-close, .drawer-back { display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 50%; border: 1px solid rgb(255 255 255 / 25%); background: transparent; font-size: 1.4rem; line-height: 1; }
.drawer-close:disabled, .drawer-back:disabled { opacity: .4; cursor: not-allowed; }
.drawer-notice { margin: 12px 18px 0; padding: 10px 14px; border-radius: 12px; background: rgb(240 112 16 / 18%); border: 1px solid var(--orange); font-size: .95rem; }
.drawer-step { flex: 1; display: flex; flex-direction: column; gap: 14px; overflow-y: auto; padding: 16px 18px 20px; }

.cart-lines { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.cart-line { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px; border-radius: 14px; background: rgb(54 23 101 / 60%); border: 1px solid rgb(255 255 255 / 8%); }
.line-name { font-weight: 600; font-size: 1.1rem; }
.line-variant { color: var(--teal-soft); font-weight: 400; }
.line-opts { color: var(--muted); font-size: .9rem; }
.line-price { margin-top: 4px; color: var(--marigold); font-weight: 600; }
.line-controls { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.qty { display: inline-flex; align-items: center; border: 1px solid rgb(255 255 255 / 20%); border-radius: 999px; }
.qty-btn { width: 40px; height: 40px; border: 0; border-radius: 50%; background: transparent; font-size: 1.2rem; }
.qty-btn:disabled { opacity: .35; cursor: not-allowed; }
.qty-num { min-width: 26px; text-align: center; font-weight: 600; }
.line-remove { padding: 4px; border: 0; background: none; color: var(--muted); text-decoration: underline; font-size: .85rem; }
.cart-empty { padding: 32px 8px; text-align: center; color: var(--muted); }

.cart-totals { margin: 0; display: grid; gap: 6px; padding: 14px; border: 1px dashed var(--orange); border-radius: 14px; }
.cart-totals div { display: flex; justify-content: space-between; }
.cart-totals dt { color: var(--muted); }
.cart-totals dd { margin: 0; font-weight: 600; }
.cart-totals .total { padding-top: 6px; border-top: 1px solid rgb(255 255 255 / 12%); font-size: 1.25rem; }
.cart-totals .total dt { color: var(--cream); }
.cart-totals .total dd { color: var(--marigold); }
.cart-min, .cart-closed, .form-error { padding: 10px 14px; border-radius: 12px; font-size: .95rem; }
.cart-min { background: rgb(0 168 184 / 15%); border: 1px solid var(--teal); }
.cart-closed, .form-error { background: rgb(240 64 72 / 15%); border: 1px solid var(--chilli); }
.cart-closed a, .form-error a { color: var(--marigold); font-weight: 600; white-space: nowrap; }
.step-footer { position: sticky; bottom: -20px; margin-top: auto; padding: 12px 0 4px; background: linear-gradient(transparent, var(--night-2) 35%); }

.checkout-form { display: grid; gap: 4px; }
.checkout-form label { display: grid; gap: 6px; margin-top: 10px; color: var(--muted); font-size: .95rem; }
.checkout-form .opt { color: rgb(201 184 232 / 60%); font-size: .8rem; }
.checkout-form input, .checkout-form textarea { width: 100%; min-height: 48px; padding: 10px 14px; border-radius: 12px; border: 1px solid rgb(255 255 255 / 20%); background: rgb(29 2 75 / 70%); color: var(--cream); font-size: 1rem; }
.checkout-form textarea { min-height: 84px; resize: vertical; }
.checkout-form input:not([type="radio"]):focus, .checkout-form textarea:focus { outline: none; border-color: var(--marigold); box-shadow: 0 0 0 3px rgb(249 196 34 / 25%); }
.checkout-form .pay-option input:focus-visible { outline: 3px solid var(--teal-soft); outline-offset: 3px; }
.checkout-form [aria-invalid="true"] { border-color: var(--chilli); }
.field-error { color: #FF8A90; font-size: .88rem; }
.field-error:empty { display: none; }
.pay { display: grid; gap: 8px; margin: 14px 0 0; padding: 0; border: 0; }
.pay legend { margin-bottom: 8px; padding: 0; color: var(--muted); font-size: .95rem; }
.checkout-form .pay-option { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 0; padding: 10px 14px; border-radius: 12px; border: 1px solid rgb(255 255 255 / 16%); color: var(--cream); font-size: 1rem; cursor: pointer; }
.checkout-form .pay-option:has(input:checked) { border-color: var(--marigold); background: rgb(249 196 34 / 10%); }
.checkout-form .pay-option input { width: 18px; height: 18px; min-height: 0; margin: 0; padding: 0; accent-color: var(--marigold); flex: none; }
.staff-lookup { padding: 4px 12px 12px; border: 1px dashed var(--teal-soft); border-radius: 14px; background: rgb(0 168 184 / 8%); }
.lookup-results { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.lookup-results:empty { display: none; }
.lookup-result { width: 100%; display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid rgb(255 255 255 / 16%); background: rgb(29 2 75 / 70%); text-align: left; }
.lookup-result:hover, .lookup-result:focus-visible { border-color: var(--marigold); }
.lookup-name { font-weight: 600; }
.lookup-meta, .lookup-empty { color: var(--muted); font-size: .9rem; }
.hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.done { display: grid; justify-items: center; gap: 12px; padding-top: 12px; text-align: center; }
.done h3 { font-family: var(--display); font-variation-settings: 'SOFT' 100; font-weight: 900; color: var(--marigold); font-size: 1.9rem; line-height: 1.1; }
.done-lines { list-style: none; width: 100%; margin: 0; padding: 0; display: grid; gap: 6px; text-align: left; }
.done-lines li { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px dotted rgb(255 255 255 / 20%); }
.done-total { font-size: 1.2rem; }
.done-total strong { color: var(--marigold); }

@media (max-width: 520px) {
  .cart-drawer { width: 100%; border-left: 0; }
}
