/* ===== TABLE RESERVATIONS — Kahramana Baghdad (/reserve) =====
   Page-specific only. Everything the site already owns comes from
   shared.min.css and is deliberately NOT restated here:
     tokens (--col-*, --radius*, --ease-*), .container, .section,
     .section-label, .live-pulse-dot, .section-title, .premium-hero-split
     (incl. its `p` rule, which is what .hero-sub was in the prototype),
     .hero-text/.stagger, .hero-visual, .bento-image, .glass-inset,
     .form-group, .form-input, .reveal, :focus-visible, the navbar, the
     footer, and the prefers-reduced-motion block.
   Source of truth for this page's design:
   design-references/reserve-approved-2026-08-06.html */

/* ===== HERO ===== */
.hero-wrap {
  padding-top: 8.5rem;
  padding-bottom: 2.5rem;
}

.hero-ratings {
  display: flex;
  gap: 1rem;
  margin-top: 2rem;
  flex-wrap: wrap;
}

.rating-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius-btn);
  border: 1px solid rgba(209, 159, 81, 0.18);
  background: rgba(209, 159, 81, 0.06);
  font-size: 0.83rem;
  color: var(--col-cream);
}

.rating-chip svg.star {
  width: 14px;
  height: 14px;
  fill: var(--col-gold);
  stroke: none;
  flex-shrink: 0;
}

.rating-chip b {
  color: var(--col-gold);
  font-weight: 800;
}

/* ===== BOOKING LAYOUT ===== */
.booking-section {
  padding-top: 1.5rem;
  padding-bottom: 6rem;
}

.booking-layout {
  display: grid;
  grid-template-columns: 1.55fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* min-width:0 breaks the grid min-content chain — without it the 14-chip date
   scroller forces the whole column (and the page) wider than the viewport on
   mobile. */
.booking-layout > * {
  min-width: 0;
}

.step-block {
  background: var(--col-dark);
  border: 1px solid rgba(209, 159, 81, 0.08);
  border-radius: var(--radius);
  padding: 2rem;
  margin-bottom: 1.6rem;
  transition: border-color 0.4s var(--ease-magnetic);
}

.step-block:focus-within {
  border-color: rgba(209, 159, 81, 0.28);
}

.step-head {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--col-gold-dim);
  letter-spacing: 0.1em;
}

.step-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--col-cream);
}

.step-done {
  margin-inline-start: auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(74, 222, 128, 0.12);
  border: 1px solid rgba(74, 222, 128, 0.4);
  display: none;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-block.is-done .step-done {
  display: inline-flex;
}

.step-done svg {
  width: 12px;
  height: 12px;
  stroke: var(--col-success);
  stroke-width: 3;
  fill: none;
}

/* ===== STEP 1 — BRANCH SELECTOR ===== */
.branch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.branch-option {
  position: relative;
  text-align: start;
  cursor: pointer;
  background: var(--col-deep);
  border: 1.5px solid rgba(209, 159, 81, 0.12);
  border-radius: var(--radius-sm);
  padding: 1.4rem;
  transition: transform 0.35s var(--ease-magnetic),
    border-color 0.35s var(--ease-magnetic),
    box-shadow 0.35s var(--ease-magnetic);
  color: var(--col-parchment);
  font-family: var(--font-primary);
  font-size: 0.92rem;
}

.branch-option:hover {
  transform: translateY(-3px);
  border-color: rgba(209, 159, 81, 0.3);
}

.branch-option[aria-checked="true"] {
  border-color: var(--col-gold);
  box-shadow: 0 0 0 1px var(--col-gold), 0 12px 36px rgba(0, 0, 0, 0.35);
  background: linear-gradient(160deg, rgba(209, 159, 81, 0.09), var(--col-deep) 55%);
}

.branch-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--col-gold);
  margin-bottom: 0.2rem;
}

.branch-meta {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-top: 0.55rem;
  opacity: 0.88;
}

.branch-meta svg {
  width: 15px;
  height: 15px;
  stroke: var(--col-gold-dim);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
}

.open-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.7rem;
  border-radius: 30px;
  margin-top: 0.7rem;
}

.open-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  flex-shrink: 0;
}

.open-badge.is-open {
  color: var(--col-success);
  background: rgba(74, 222, 128, 0.1);
  border: 1px solid rgba(74, 222, 128, 0.25);
}

.open-badge.is-closed {
  color: #f0b429;
  background: rgba(240, 180, 41, 0.08);
  border: 1px solid rgba(240, 180, 41, 0.25);
}

.branch-check {
  position: absolute;
  top: 1rem;
  inset-inline-end: 1rem;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(209, 159, 81, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 0.3s, border-color 0.3s;
}

.branch-option[aria-checked="true"] .branch-check {
  background: var(--col-gold);
  border-color: var(--col-gold);
}

.branch-check svg {
  width: 12px;
  height: 12px;
  stroke: var(--col-dark);
  stroke-width: 3.5;
  fill: none;
  opacity: 0;
}

.branch-option[aria-checked="true"] .branch-check svg {
  opacity: 1;
}

/* ===== STEP 2 — DATE SCROLLER ===== */
.date-scroller {
  display: flex;
  gap: 0.7rem;
  overflow-x: auto;
  padding: 0.3rem 0.1rem 0.9rem;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.date-chip {
  flex: 0 0 auto;
  min-width: 74px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
  background: var(--col-deep);
  border: 1.5px solid rgba(209, 159, 81, 0.12);
  border-radius: var(--radius-sm);
  color: var(--col-parchment);
  font-family: var(--font-primary);
  transition: border-color 0.3s var(--ease-magnetic),
    background-color 0.3s var(--ease-magnetic),
    transform 0.3s var(--ease-magnetic);
}

.date-chip:hover {
  border-color: rgba(209, 159, 81, 0.35);
  transform: translateY(-2px);
}

.date-chip[aria-checked="true"] {
  background: var(--col-gold);
  border-color: var(--col-gold);
  color: var(--col-dark);
}

.date-chip .dow {
  font-size: 0.72rem;
  font-weight: 700;
  opacity: 0.75;
}

.date-chip .dnum {
  font-size: 1.25rem;
  font-weight: 800;
  line-height: 1.2;
}

.date-chip .mon {
  font-size: 0.7rem;
  opacity: 0.75;
}

.date-chip[aria-checked="true"] .dow,
.date-chip[aria-checked="true"] .mon {
  opacity: 0.85;
}

.date-chip .today-tag {
  font-size: 0.62rem;
  font-weight: 800;
  color: var(--col-gold);
  background: rgba(209, 159, 81, 0.12);
  padding: 0.05rem 0.5rem;
  border-radius: 20px;
  margin-top: 0.15rem;
}

.date-chip[aria-checked="true"] .today-tag {
  color: var(--col-dark);
  background: rgba(45, 24, 11, 0.18);
}

/* ===== STEP 2 — TIME SLOTS ===== */
.slot-groups {
  display: flex;
  flex-direction: column;
  gap: 1.3rem;
  margin-top: 0.4rem;
}

.slot-group-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--col-gold-dim);
  margin-bottom: 0.6rem;
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

html[dir="rtl"] .slot-group-label {
  letter-spacing: 0.03em;
}

.slot-group-label::after {
  content: '';
  height: 1px;
  flex: 1;
  background: rgba(209, 159, 81, 0.12);
}

.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(86px, 1fr));
  gap: 0.6rem;
}

.slot-btn {
  padding: 0.6rem 0.4rem;
  font-family: var(--font-primary);
  font-size: 0.86rem;
  font-weight: 700;
  cursor: pointer;
  background: var(--col-deep);
  color: var(--col-parchment);
  border: 1.5px solid rgba(209, 159, 81, 0.12);
  border-radius: 12px;
  transition: border-color 0.25s var(--ease-magnetic),
    background-color 0.25s var(--ease-magnetic),
    transform 0.25s var(--ease-magnetic);
}

.slot-btn:hover:not(:disabled) {
  border-color: rgba(209, 159, 81, 0.4);
  transform: translateY(-1px);
}

.slot-btn[aria-checked="true"] {
  background: var(--col-gold);
  border-color: var(--col-gold);
  color: var(--col-dark);
}

.slot-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
  text-decoration: line-through;
}

.slots-hint {
  font-size: 0.8rem;
  opacity: 0.6;
  margin-top: 1rem;
}

.slots-empty {
  font-size: 0.9rem;
  opacity: 0.7;
  padding: 1rem 0;
}

/* ===== STEP 3 — GUESTS STEPPER ===== */
.guests-row {
  display: flex;
  align-items: center;
  gap: 1.6rem;
  flex-wrap: wrap;
}

.stepper {
  display: inline-flex;
  align-items: center;
  gap: 0;
  background: var(--col-deep);
  border: 1.5px solid rgba(209, 159, 81, 0.15);
  border-radius: var(--radius-btn);
  overflow: hidden;
}

.stepper button {
  width: 52px;
  height: 52px;
  border: none;
  background: transparent;
  cursor: pointer;
  color: var(--col-gold);
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
  transition: background-color 0.25s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.stepper button:hover:not(:disabled) {
  background: rgba(209, 159, 81, 0.1);
}

.stepper button:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.stepper .count {
  min-width: 72px;
  text-align: center;
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--col-cream);
  font-variant-numeric: tabular-nums;
}

.guests-label {
  font-size: 0.95rem;
  opacity: 0.85;
}

.big-party-note {
  display: none;
  margin-top: 1rem;
  padding: 0.8rem 1.1rem;
  font-size: 0.85rem;
  background: rgba(209, 159, 81, 0.07);
  border: 1px solid rgba(209, 159, 81, 0.2);
  border-inline-start: 3px solid var(--col-gold);
  border-radius: var(--radius-sm);
  color: var(--col-cream);
}

.big-party-note.show {
  display: block;
}

/* ===== STEP 3 — SEATING / OCCASION CHIPS ===== */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.chip {
  padding: 0.55rem 1.2rem;
  font-family: var(--font-primary);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  background: var(--col-deep);
  color: var(--col-parchment);
  border: 1.5px solid rgba(209, 159, 81, 0.14);
  border-radius: var(--radius-btn);
  transition: border-color 0.25s var(--ease-magnetic),
    background-color 0.25s var(--ease-magnetic), color 0.25s;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.chip:hover {
  border-color: rgba(209, 159, 81, 0.4);
}

.chip svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.chip[aria-checked="true"] {
  background: var(--col-gold);
  border-color: var(--col-gold);
  color: var(--col-dark);
  font-weight: 700;
}

.sub-label {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--col-cream);
  margin: 1.4rem 0 0.7rem;
  opacity: 0.9;
}

.sub-label:first-of-type {
  margin-top: 0;
}

/* ===== STEP 4 — FORM =====
   .form-group / .form-input / textarea.form-input come from shared.css. Only
   the layout and the two contrast deltas this page needs are restated: the
   step card is --col-dark, so shared's --col-dark input background would make
   the field invisible against it. Scoped to .booking-layout so no other page
   (and no future shared component on this page) is affected. */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.booking-layout .form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.form-group.full {
  grid-column: 1 / -1;
}

.booking-layout .form-input {
  background: var(--col-deep);
  color: var(--col-cream);
}

.booking-layout .form-input::placeholder {
  color: var(--col-parchment);
  opacity: 0.4;
}

.booking-layout .form-input.invalid {
  border-color: var(--col-error);
}

.booking-layout textarea.form-input {
  min-height: 96px;
}

.phone-wrap {
  position: relative;
}

.phone-wrap .form-input {
  padding-inline-start: 4.4rem;
  direction: ltr;
  text-align: start;
}

html[dir="rtl"] .phone-wrap .form-input {
  text-align: end;
}

.phone-prefix {
  position: absolute;
  inset-inline-start: 1.1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--col-gold-dim);
  pointer-events: none;
}

.field-error {
  display: none;
  font-size: 0.78rem;
  color: var(--col-error);
  margin-top: 0.4rem;
}

.field-error.show {
  display: block;
}

/* ===== SUMMARY (sticky) ===== */
.summary-card {
  position: sticky;
  top: 6.5rem;
  background: linear-gradient(170deg, rgba(209, 159, 81, 0.07), var(--col-dark) 40%);
  border: 1px solid rgba(209, 159, 81, 0.18);
  border-radius: var(--radius);
  padding: 2rem;
  box-shadow: 0 24px 60px -20px rgba(0, 0, 0, 0.5);
}

.summary-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--col-cream);
  margin-bottom: 1.4rem;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.summary-title svg {
  width: 20px;
  height: 20px;
  stroke: var(--col-gold);
  fill: none;
  stroke-width: 2;
}

.summary-rows {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  margin-bottom: 1.5rem;
}

.summary-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.9rem;
}

.summary-row svg {
  width: 16px;
  height: 16px;
  stroke: var(--col-gold-dim);
  fill: none;
  stroke-width: 2;
  flex-shrink: 0;
  margin-top: 3px;
}

.summary-row .val {
  color: var(--col-cream);
  font-weight: 600;
}

.summary-row .placeholder {
  opacity: 0.45;
  font-weight: 400;
}

.summary-divider {
  height: 1px;
  background: rgba(209, 159, 81, 0.12);
  margin: 0.4rem 0 1.4rem;
}

/* ===== CONFIRM BUTTON ===== */
.btn-confirm {
  position: relative;
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1.05rem 2rem;
  border: none;
  border-radius: var(--radius-btn);
  font-family: var(--font-primary);
  font-weight: 800;
  font-size: 1.02rem;
  color: var(--col-dark);
  background: var(--col-gold);
  cursor: pointer;
  overflow: hidden;
  transition: transform 0.4s var(--ease-magnetic),
    box-shadow 0.4s var(--ease-magnetic);
  z-index: 1;
}

.btn-confirm::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--col-cream);
  transform: translateY(100%);
  transition: transform 0.45s var(--ease-magnetic);
  z-index: -1;
  border-radius: var(--radius-btn);
}

.btn-confirm:hover {
  transform: scale(1.02);
  box-shadow: 0 8px 40px rgba(209, 159, 81, 0.25);
}

.btn-confirm:hover::before {
  transform: translateY(0);
}

.btn-confirm:active {
  transform: scale(0.98) translateY(1px);
}

.btn-confirm .wa-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.btn-confirm.shake {
  animation: reserve-shake 0.4s ease;
}

@keyframes reserve-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}

.confirm-note {
  font-size: 0.78rem;
  opacity: 0.65;
  text-align: center;
  margin-top: 0.9rem;
  line-height: 1.6;
}

.call-alt {
  display: flex;
  justify-content: center;
  margin-top: 1.1rem;
}

.call-alt a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--col-parchment);
  text-decoration: none;
  padding: 0.6rem 1.4rem;
  border: 1.5px solid rgba(209, 159, 81, 0.25);
  border-radius: var(--radius-btn);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.call-alt a:hover {
  background: var(--col-gold);
  color: var(--col-dark);
  border-color: var(--col-gold);
}

.call-alt svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ===== MOBILE STICKY CONFIRM BAR =====
   Geometry is stated in the ≤900px block below, next to the two pieces of
   site chrome it has to coexist with. */
.mobile-confirm-bar {
  display: none;
  position: fixed;
  inset-inline: 0;
  z-index: 900;
  padding: 0.9rem 1.2rem;
  background: rgba(17, 11, 5, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-top: 1px solid rgba(209, 159, 81, 0.2);
  border-bottom: 1px solid rgba(209, 159, 81, 0.2);
}

.mobile-confirm-bar .mini-sum {
  font-size: 0.78rem;
  opacity: 0.8;
  margin-bottom: 0.55rem;
  text-align: center;
  min-height: 1.1em;
}

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 2rem;
  left: 50%;
  transform: translate(-50%, 20px);
  background: var(--col-black);
  color: var(--col-cream);
  border: 1px solid rgba(209, 159, 81, 0.3);
  border-radius: var(--radius-btn);
  padding: 0.85rem 1.8rem;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  z-index: 10000;
  transition: opacity 0.4s var(--ease-magnetic), transform 0.4s var(--ease-magnetic);
  max-width: 90vw;
  text-align: center;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast.error {
  border-color: rgba(224, 96, 79, 0.5);
}

/* ===== ASSURANCE STRIP ===== */
.assure-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
}

.assure-item {
  background: var(--col-dark);
  border: 1px solid rgba(209, 159, 81, 0.08);
  border-radius: var(--radius-sm);
  padding: 1.5rem;
  font-size: 0.88rem;
}

.assure-item svg {
  width: 22px;
  height: 22px;
  stroke: var(--col-gold);
  fill: none;
  stroke-width: 2;
  margin-bottom: 0.8rem;
}

.assure-item b {
  display: block;
  color: var(--col-cream);
  margin-bottom: 0.3rem;
  font-size: 0.95rem;
}

.assure-item p {
  opacity: 0.7;
  line-height: 1.65;
}

/* ===== SITE CHROME — /reserve-only overrides =====
   shared.js injects the floating WhatsApp CTA on every page. On /reserve it is
   both redundant (the entire page IS a WhatsApp CTA, and the generic prefill
   would start an ORDER conversation mid-reservation) and physically in the way
   of the sticky confirm bar. Hidden here rather than in shared.js so no other
   page is touched — same page-scoped technique menu-cards.css uses.
   Kept in the DOM, not removed: tests/unit/branch-pages.test.js asserts every
   page's #floating-wa-cta hydrates to its branch's number. */
#floating-wa-cta {
  display: none;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1024px) {
  .booking-layout {
    grid-template-columns: 1fr;
  }

  .summary-card {
    position: static;
  }
}

@media (max-width: 900px) {
  .hero-wrap {
    padding-top: 7rem;
  }

  .assure-grid {
    grid-template-columns: 1fr;
  }

  .desktop-summary-cta {
    display: none;
  }

  /* Bottom-chrome stack, from the bottom up:
        0    → 24px : gap (shared.css puts .mobile-capsule-nav at bottom: 1.5rem)
       24px  → 94px : the capsule nav's 70px .capsule-inner
       94px  → 104px: gap
      104px  → …    : this bar
     6.5rem = 104px is therefore the smallest offset that clears the capsule
     nav. The capsule keeps its site-wide position — it is the primary mobile
     navigation on all 15 pages and must not move on one of them.
     Verified by getBoundingClientRect() hit-testing at 360/375/390/414 in both
     languages; if the capsule's height ever changes in shared.css, this number
     changes with it. */
  .mobile-confirm-bar {
    display: block;
    bottom: 6.5rem;
  }

  /* shared.css already applies 90px here for the capsule alone. This has to
     clear the capsule AND the bar stacked above it, or the footer sits under
     both. */
  body {
    padding-bottom: 15rem;
  }

  /* Above the whole stack — the default 2rem would land the toast behind the
     capsule nav. */
  .toast {
    bottom: 17rem;
  }
}

@media (max-width: 640px) {
  .branch-grid {
    grid-template-columns: 1fr;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .step-block {
    padding: 1.4rem;
    border-radius: var(--radius-sm);
  }
}
