/* Namirembe Guest House — food ordering on dining.html (menu buttons, cart bar, drawer).
   Uses tokens from styles.css :root. No left accent bars. */

.od-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
html.od-lock, html.od-lock body { overflow: hidden; }

/* ---------- Menu items with Order buttons ---------- */
.menu-item.od-item { grid-template-columns: minmax(0, 1fr) auto auto; gap: 6px 14px; align-items: center; }
.menu-item.od-item .desc { grid-column: 1 / -1; }
.od-add { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; min-width: 64px; justify-content: center; padding: 0 14px;
  border-radius: 999px; border: 1px solid var(--clay); background: transparent; color: var(--clay);
  font: 500 12px var(--font-body); letter-spacing: .06em; text-transform: uppercase; transition: background .15s, color .15s; }
.od-add span { font-size: 16px; line-height: 1; }
.od-add:hover { background: var(--clay); color: #fff; }
.od-add:focus-visible, .od-link:focus-visible, .od-bar:focus-visible, .od-x:focus-visible, .od-step button:focus-visible { outline: 2px solid var(--clay); outline-offset: 2px; }
.od-add-spacer { width: 0; }
.od-incart { grid-column: 1 / -1; font: 500 11px var(--font-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--clay-deep); }
[data-ngh-order-menu][aria-busy="true"] { opacity: .6; transition: opacity .2s; }

.od-tools { margin-top: 18px; }
.od-tools-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.od-lead { margin: 0; font-size: 14px; color: var(--ink-soft); }
.od-note { margin: 0 0 12px; padding: 12px 14px; background: var(--paper-deep); border-radius: 12px; font-size: 14px; color: var(--ink-soft); }
.od-note a { color: var(--clay); text-decoration: underline; }
.od-link { background: none; border: 0; padding: 8px 0; min-height: 44px; color: var(--clay); font: 500 14px var(--font-body); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Cart bar (sticky order CTA) ---------- */
.od-bar { position: fixed; z-index: 75; left: 50%; transform: translateX(-50%);
  bottom: calc(16px + env(safe-area-inset-bottom)); width: min(440px, calc(100vw - 32px));
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 8px 20px 8px 8px; border: 0; border-radius: 999px;
  background: var(--cathedral-deep); color: var(--paper); box-shadow: 0 14px 40px rgba(36, 22, 32, .32); font: 500 15px var(--font-body); text-align: left; }
.od-bar[hidden] { display: none; }
.od-bar-count { min-width: 40px; height: 40px; border-radius: 50%; background: var(--clay); color: #fff; display: grid; place-items: center; font: 500 15px var(--font-mono); }
.od-bar-label { flex: 1; }
.od-bar-total { white-space: nowrap; }
/* Keep floating buttons and the cookie banner clear of the bar */
body.od-has-bar .ngh-fabs { bottom: calc(88px + env(safe-area-inset-bottom)); }
body.od-has-bar .ngh-cookie { bottom: calc(88px + env(safe-area-inset-bottom)); }
body.od-has-bar .footer { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
@media (max-width: 560px) {
  .od-bar { left: 12px; right: 12px; width: auto; transform: none; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .menu-item.od-item { grid-template-columns: minmax(0, 1fr) auto; }
  .menu-item.od-item .price { grid-column: 2; grid-row: 1; }
  .menu-item.od-item .od-add { grid-column: 2; grid-row: 2; }
  .menu-item.od-item .desc { grid-column: 1; grid-row: 2; }
}

/* ---------- Drawer ---------- */
.od-drawer { position: fixed; inset: 0; z-index: 3500; }
.od-drawer[hidden] { display: none; }
.od-scrim { position: absolute; inset: 0; background: rgba(36, 22, 32, .5); opacity: 0; transition: opacity .2s; }
.od-panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(460px, 100vw); background: var(--paper); display: flex; flex-direction: column;
  box-shadow: -20px 0 60px rgba(36, 22, 32, .25); transform: translateX(24px); opacity: 0; transition: transform .22s ease, opacity .22s ease; }
.od-drawer.open .od-scrim { opacity: 1; }
.od-drawer.open .od-panel { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .od-panel, .od-scrim { transition: none; } }
.od-head { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; padding-top: calc(16px + env(safe-area-inset-top)); border-bottom: 1px solid var(--line); }
.od-head h2 { font-family: var(--font-display); font-size: 26px; margin: 0; outline: none; }
.od-x { width: 44px; height: 44px; border: 0; background: none; font-size: 26px; line-height: 1; color: var(--ink); border-radius: 50%; }
.od-x:hover { background: var(--paper-deep); }
.od-body { flex: 1; overflow-y: auto; padding: 18px 20px calc(28px + env(safe-area-inset-bottom)); overscroll-behavior: contain; }
.od-body[hidden] { display: none; }
.od-sub { color: var(--ink-soft); font-size: 14px; margin: 0 0 14px; }
.od-empty { text-align: center; padding: 30px 0; }
.od-empty p:first-child { font-family: var(--font-display); font-size: 22px; margin: 0 0 6px; }

.od-lines { list-style: none; margin: 0 0 18px; padding: 0; border-top: 1px solid var(--line); }
.od-lines li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.od-line-name { font-size: 15px; }
.od-line-name small { display: block; color: var(--ink-muted); font-size: 12.5px; }
.od-line-total { grid-column: 1 / -1; justify-self: end; font: 500 14px var(--font-body); margin-top: -4px; }
.od-step { display: inline-flex; align-items: center; border: 1px solid var(--line-strong); border-radius: 999px; background: #fff; }
.od-step button { width: 44px; height: 44px; border: 0; background: none; font-size: 20px; line-height: 1; color: var(--ink); border-radius: 50%; display: grid; place-items: center; }
.od-step button:disabled { opacity: .35; cursor: not-allowed; }
.od-step svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.od-qty { min-width: 24px; text-align: center; font: 500 15px var(--font-mono); }

.od-form { display: grid; gap: 14px; }
.od-form[hidden] { display: none; }
.od-type { border: 0; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.od-type legend { font: 500 13px var(--font-body); margin-bottom: 8px; padding: 0; }
.od-type label { position: relative; display: flex; }
.od-type input { position: absolute; opacity: 0; }
.od-type span { flex: 1; display: grid; place-items: center; text-align: center; min-height: 48px; padding: 6px 8px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; font-size: 13.5px; cursor: pointer; }
.od-type input:checked + span { border-color: var(--clay); box-shadow: 0 0 0 1px var(--clay); color: var(--clay-deep); font-weight: 500; }
.od-type input:focus-visible + span { outline: 2px solid var(--clay); outline-offset: 2px; }

/* Field styles (shared look with book.html, scoped to the drawer) */
.od-drawer .bk-field { display: flex; flex-direction: column; }
.od-drawer .bk-field[hidden] { display: none; }
.od-drawer .bk-field label { font: 500 13px var(--font-body); margin-bottom: 6px; }
.od-drawer .opt { color: var(--ink-muted); font-weight: 400; }
.od-drawer input[type="text"], .od-drawer input[type="tel"], .od-drawer input[type="time"], .od-drawer textarea {
  width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink); font: 400 16px var(--font-body); }
.od-drawer textarea { min-height: 72px; resize: vertical; }
.od-drawer input:focus, .od-drawer textarea:focus { border-color: var(--clay); box-shadow: 0 0 0 3px rgba(167, 34, 142, .14); outline: none; }
.od-drawer [aria-invalid="true"] { border-color: #B23A2E; background: #FFF8F6; }
.od-drawer .bk-hint { margin: 6px 0 0; font-size: 13px; color: var(--ink-muted); }
.od-drawer .bk-err { margin: 6px 0 0; font-size: 13.5px; color: #A32F23; font-weight: 500; }
.od-drawer .bk-err::before { content: "! "; font-weight: 700; }
.od-drawer .bk-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.od-drawer .bk-pay { border: 0; padding: 0; margin: 0; }
.od-drawer .bk-pay legend { font: 500 13px var(--font-body); margin-bottom: 8px; padding: 0; }
.od-drawer .bk-payopt { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--line-strong); border-radius: 12px; background: #fff; cursor: pointer; margin-bottom: 8px; }
.od-drawer .bk-payopt:has(input:checked) { border-color: var(--clay); box-shadow: 0 0 0 1px var(--clay); }
.od-drawer .bk-payopt input { accent-color: var(--clay); width: 18px; height: 18px; margin-top: 3px; }
.od-drawer .bk-payopt strong { display: block; font-weight: 500; }
.od-drawer .bk-payopt small { color: var(--ink-soft); font-size: 13px; }
.od-drawer .bk-payonly { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--paper-deep); color: var(--ink-soft); font-size: 14.5px; }
.od-drawer .bk-payonly strong { color: var(--ink); font-weight: 500; }
.od-drawer .bk-alert { margin: 0; padding: 14px 16px; border-radius: 12px; background: #FBEDEA; border: 1px solid #E6B8AF; color: #5E1A12; font-size: 14px; outline: none; }
.od-drawer .bk-alert p { margin: 0; }
.od-drawer .bk-alert-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px !important; }
.od-drawer .bk-alert .btn.ghost { color: #5E1A12; border-color: #C98A80; }
.od-drawer .ty-summary { margin: 16px 0 0; border-top: 1px solid var(--line); }
.od-drawer .ty-summary > div { display: grid; grid-template-columns: 80px 1fr; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.od-drawer .ty-summary dt { color: var(--ink-muted); font-size: 13.5px; }
.od-drawer .ty-summary dd { margin: 0; }

.od-totals { padding-top: 6px; }
.od-totals > div { display: flex; justify-content: space-between; align-items: baseline; }
.od-totals span { color: var(--ink-soft); font-size: 14px; }
.od-totals strong { font: 500 22px var(--font-body); }
.od-totals p { margin: 4px 0 0; font-size: 12.5px; color: var(--ink-muted); }
.od-submit { justify-content: center; min-height: 52px; width: 100%; }
.od-submit[aria-busy="true"] { opacity: .75; cursor: progress; }
@media (max-width: 360px) { .od-type { grid-template-columns: 1fr; } }
