/* Reservation popup (site/reserve-popup.js). Colours come from the venue tokens (shared/tokens.css);
   the one literal is the review-star yellow. */
.rp-sr { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }

dialog.reserve-popup { padding: 0; border: 0; background: transparent; width: min(1060px, 100vw - 32px); max-width: none; max-height: calc(100dvh - 32px); overflow: visible; color: var(--ink); }
dialog.reserve-popup::backdrop { background: color-mix(in srgb, var(--ink) 62%, transparent); backdrop-filter: blur(6px); }
dialog.reserve-popup[open] { animation: rp-pop .32s cubic-bezier(.2, .8, .2, 1); }
dialog.reserve-popup[open]::backdrop { animation: rp-fade .3s ease; }
@keyframes rp-pop { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rp-fade { from { opacity: 0; } to { opacity: 1; } }

.reserve-popup__shell { display: grid; grid-template-columns: .82fr 1.35fr; background: var(--surface); border-radius: calc(var(--radius) + 12px); overflow: hidden; max-height: calc(100dvh - 32px); box-shadow: 0 40px 90px -20px color-mix(in srgb, var(--ink) 60%, transparent); }
.reserve-popup__visual { position: relative; display: flex; color: var(--surface); background: linear-gradient(color-mix(in srgb, var(--ink) 45%, transparent), color-mix(in srgb, var(--ink) 90%, transparent)), var(--reserve-photo) center / cover; }
.reserve-popup__visual-inner { padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 14px; justify-content: flex-end; width: 100%; }
.reserve-popup__logo { width: 76px; height: 76px; border-radius: 14px; object-fit: contain; margin-bottom: auto; }
.reserve-popup__visual .eyebrow { margin: 0; letter-spacing: .18em; color: color-mix(in srgb, var(--surface) 78%, transparent); }
.reserve-popup__visual h2 { font-family: var(--font-heading); font-size: clamp(1.9rem, 3vw, 2.7rem); line-height: 1.05; margin: 0; color: var(--surface); }
.reserve-popup__place { margin: 0; font-size: 1rem; color: color-mix(in srgb, var(--surface) 92%, transparent); }
.reserve-popup__rating { margin: 0; font-size: .95rem; color: color-mix(in srgb, var(--surface) 88%, transparent); }
.reserve-popup__rating b { font-size: 1.5rem; font-family: var(--font-heading); margin-right: 4px; }
.reserve-popup__rating span { display: block; font-size: .82rem; opacity: .8; }
.reserve-popup .review-stars { font-style: normal; color: #F5B301; letter-spacing: 1px; }
.reserve-popup__hours { margin: 8px 0 0; padding-top: 14px; border-top: 1px solid color-mix(in srgb, var(--surface) 22%, transparent); font-size: .8rem; line-height: 1.5; color: color-mix(in srgb, var(--surface) 76%, transparent); }

.reserve-popup__main { position: relative; padding: clamp(22px, 3vw, 38px); overflow-y: auto; max-height: calc(100dvh - 32px); background: var(--surface); }
.reserve-popup__close { position: absolute; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 0; background: color-mix(in srgb, var(--ink) 8%, transparent); color: var(--ink); font-size: 1.7rem; line-height: 1; cursor: pointer; z-index: 3; transition: background .2s, transform .2s; }
.reserve-popup__close:hover { background: var(--brand); color: var(--brand-ink); transform: rotate(90deg); }
.reserve-popup__close:focus-visible, .rp-chip:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.rp-steps { list-style: none; display: flex; gap: 0; margin: 0 56px 26px 0; padding: 0; }
.rp-steps li { flex: 1; display: flex; align-items: center; gap: 9px; position: relative; font-size: .8rem; color: var(--muted); min-width: 0; }
.rp-steps li + li::before { content: ''; position: absolute; left: -10%; width: 20%; top: 50%; height: 2px; background: color-mix(in srgb, var(--ink) 14%, transparent); }
.rp-steps li span { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; background: color-mix(in srgb, var(--ink) 9%, transparent); color: var(--muted); transition: all .25s; position: relative; z-index: 1; }
/* labels wrap rather than truncate ("Fecha y personas" was cut to "Fecha y pers…" at 1440) */
.rp-steps li b { font-weight: 700; line-height: 1.2; min-width: 0; overflow-wrap: break-word; }
.rp-steps li.is-current { color: var(--ink); }
.rp-steps li.is-current span { background: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 20%, transparent); }
.rp-steps li.is-done span { background: var(--accent); color: var(--ink); }

/* the template's own #reserve section, re-skinned inside the popup */
.reserve-popup .reservation-bar { display: block; padding: 0; background: transparent; color: var(--ink); }
.reserve-popup .reservation-bar > div:first-child { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.reserve-popup .booking-form { display: grid; gap: 22px; grid-template-columns: 1fr; }
.reserve-popup .booking-form label { color: var(--ink); }
.rp-field { border: 0; margin: 0; padding: 0; min-width: 0; }
.rp-field legend { font-size: .74rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--brand); padding: 0; margin-bottom: 10px; }
.rp-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.rp-chips__label { margin: 10px 0 8px; font-size: .8rem; font-weight: 700; color: var(--muted); }
.rp-chips__label:first-child { margin-top: 0; }
.rp-chip { appearance: none; border: 2px solid color-mix(in srgb, var(--ink) 14%, transparent); background: var(--surface); color: var(--ink); border-radius: calc(var(--radius) + 2px); min-height: 48px; min-width: 52px; padding: 8px 14px; font: inherit; font-weight: 700; cursor: pointer; display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; transition: border-color .15s, background .15s, color .15s, transform .15s, box-shadow .15s; }
.rp-chip:hover { border-color: var(--brand); transform: translateY(-1px); }
.rp-chip[aria-checked="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 8px 18px -8px color-mix(in srgb, var(--brand) 70%, transparent); }
.rp-chip span { font-size: .72rem; font-weight: 600; opacity: .8; text-transform: capitalize; }
.rp-chip b { font-size: 1.05rem; }
.rp-chip--num b { font-size: 1.25rem; font-family: var(--font-heading); }
.rp-chip--date { min-width: 78px; }
.rp-chip--time { flex-direction: row; min-width: 74px; }
.rp-datepick { display: flex; align-items: center; gap: 12px; margin-top: 12px; font-size: .86rem; font-weight: 600; color: var(--muted); }
.rp-datepick em { font-style: normal; white-space: nowrap; }
.rp-datepick > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.rp-closed { margin: 0; padding: 14px 16px; border-radius: var(--radius); background: color-mix(in srgb, var(--accent) 14%, var(--surface)); color: var(--ink); font-weight: 600; }

.reserve-popup .booking-form .button, .reserve-popup #continueBooking, .reserve-popup .guest-details .button[type="submit"] { width: 100%; min-height: 54px; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: 1.02rem; grid-column: auto; }
.reserve-popup .button:disabled { opacity: .45; cursor: not-allowed; }
.reserve-popup .form-note { color: var(--muted); margin: 8px 0 0; }
.reserve-popup[data-step="2"] .booking-form, .reserve-popup[data-step="3"] .booking-form, .reserve-popup[data-step="4"] .booking-form { display: none; }

/* steps 2-4 (rendered by experience-upgrade.js into #bookingExperience): readable on the light sheet */
.reserve-popup .booking-experience { margin-top: 0; padding: 0; background: transparent; color: var(--ink); }
.reserve-popup .booking-experience :where(h3, p, label, legend, small, strong, b, span, div) { color: var(--ink); }
.reserve-popup .booking-experience :where(.booking-guidance, .table-selection) { color: var(--muted); }
.reserve-popup .booking-step-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 8px; }
.reserve-popup .booking-step-head h3 { font-family: var(--font-heading); font-size: 1.55rem; margin: 2px 0 0; text-align: left; }
.reserve-popup .booking-step-head .eyebrow { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.reserve-popup .booking-back { background: transparent; border: 0; color: var(--brand); cursor: pointer; text-decoration: underline; font: inherit; font-weight: 700; font-size: .9rem; padding: 6px 0; text-transform: none; letter-spacing: 0; }
.reserve-popup .booking-guidance, .reserve-popup .table-selection { margin: 6px 0 14px; line-height: 1.5; }
.reserve-popup .guest-fields { display: grid; gap: 14px; }
.reserve-popup .guest-details label { display: grid; gap: 6px; font-weight: 700; font-size: .9rem; }
.reserve-popup .guest-details input:not([type="radio"]) { min-height: 48px; border: 2px solid color-mix(in srgb, var(--ink) 14%, transparent); border-radius: calc(var(--radius) + 2px); padding: 8px 12px; font: inherit; background: var(--surface); color: var(--ink); }
.reserve-popup .guest-details input:focus { outline: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); border-color: var(--brand); }
.reserve-popup .deposit-choice { border: 2px solid color-mix(in srgb, var(--brand) 25%, transparent); border-radius: calc(var(--radius) + 2px); margin: 16px 0; padding: 14px 16px; color: var(--ink); }
.reserve-popup .deposit-choice label { display: flex; gap: 10px; font-weight: 600; margin-top: 8px; }
.reserve-popup .booking-success { text-align: center; padding: 26px 8px 8px; }
.reserve-popup .booking-success h3 { font-family: var(--font-heading); font-size: 1.7rem; margin: 6px 0 10px; }
.reserve-popup .booking-success .eyebrow { color: var(--brand); text-transform: uppercase; letter-spacing: .12em; font-weight: 800; font-size: .76rem; }
.reserve-popup .booking-success p:not(.eyebrow) { color: var(--muted); max-width: 46ch; margin-inline: auto; }
.reserve-popup .booking-success .text-link { color: var(--brand); background: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; margin-top: 8px; }

/* light floor plan inside the popup */
.reserve-popup .guest-floor-plan { min-height: 560px; background: color-mix(in srgb, var(--brand) 9%, var(--bg)); border: 2px solid color-mix(in srgb, var(--brand) 22%, transparent); border-radius: calc(var(--radius) + 4px); }
.reserve-popup .guest-table { background: var(--surface); border: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); color: var(--ink); box-shadow: 0 8px 18px -12px color-mix(in srgb, var(--ink) 40%, transparent); }
.reserve-popup .guest-table * { color: inherit; }
.reserve-popup .guest-table.is-selected { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); box-shadow: 0 0 0 5px color-mix(in srgb, var(--brand) 25%, transparent); }
.reserve-popup .guest-table.is-unavailable { background: color-mix(in srgb, var(--ink) 8%, var(--bg)); border-style: dashed; color: var(--muted); opacity: .75; }
.reserve-popup .guest-table.is-available:hover { border-color: var(--brand); }
/* Floor tables never move. Every table is centred on its plan coordinates with
   transform: translate(-50%, -50%); the hover/selected lift (translate(-50%, -54%)) replaced that
   centring and made the table jump under the cursor. */
.guest-table, .guest-table:hover:not(:disabled), .guest-table.is-selected { transform: translate(-50%, -50%) !important; }

.reserve-group { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid color-mix(in srgb, var(--ink) 12%, transparent); font-size: .9rem; color: var(--muted); }
.reserve-group a { color: var(--brand); font-weight: 700; }

@media (max-width: 860px) {
  dialog.reserve-popup { width: 100vw; max-height: 100dvh; margin: 0; max-width: 100vw; }
  .reserve-popup__shell { grid-template-columns: 1fr; border-radius: 0; max-height: 100dvh; height: 100dvh; grid-template-rows: auto 1fr; }
  .reserve-popup__visual { min-height: 0; }
  .reserve-popup__visual-inner { padding: 18px 70px 16px 20px; gap: 6px; flex-direction: row; align-items: center; justify-content: flex-start; flex-wrap: wrap; }
  .reserve-popup__logo { width: 48px; height: 48px; margin: 0 6px 0 0; border-radius: 10px; }
  .reserve-popup__visual h2 { font-size: 1.25rem; flex: 1 1 60%; }
  .reserve-popup__visual .eyebrow, .reserve-popup__hours, .reserve-popup__rating span { display: none; }
  .reserve-popup__place { font-size: .85rem; flex-basis: 100%; }
  .reserve-popup__rating { font-size: .8rem; flex-basis: 100%; }
  .reserve-popup__rating b { font-size: 1rem; }
  .reserve-popup__main { max-height: none; padding: 20px 18px 28px; }
  .reserve-popup__close { top: 10px; right: 10px; background: color-mix(in srgb, var(--surface) 90%, transparent); }
  .rp-steps { margin-right: 0; }
  .rp-steps li b { display: none; }
  .rp-steps li.is-current { flex: 2.4; }
  .rp-steps li.is-current b { display: block; overflow: visible; }
  .reserve-popup .guest-floor-plan { min-height: 620px; }
}
@media (prefers-reduced-motion: reduce) {
  dialog.reserve-popup[open], dialog.reserve-popup[open]::backdrop { animation: none; }
  .rp-chip, .reserve-popup__close { transition: none; }
}
