/* Free-session booking dialog and sticky booking bar, shared by every page.
   Self-contained: works on the homepage and on pages that use /styles.css.
   On phones the dialog is a sheet that rises from the bottom and the calendar starts near the top. */
body.booking-open { overflow: hidden; }

.booking-dialog {
  --bk-ink: #2a1019;
  --bk-ink-2: #4c3540;
  --bk-paper: #fffaf6;
  --bk-muted: #75606a;
  --bk-wine: #7a2240;
  --bk-wine-dark: #5a102b;
  --bk-night: #2a0f1d;
  --bk-gold: #e6c98f;
  --bk-gold-deep: #c79a5b;
  --bk-line: rgba(42, 16, 25, .14);
  --bk-ease: cubic-bezier(.22, 1, .36, 1);
  --bk-spring: cubic-bezier(.34, 1.56, .64, 1);
  width: min(1060px, calc(100% - 32px));
  max-width: none;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  margin: auto;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  color: var(--bk-ink);
  background: var(--bk-paper);
  box-shadow: 0 0 0 1px rgba(230, 201, 143, .34), 0 42px 120px -28px rgba(20, 4, 13, .82);
  font-family: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  text-align: left;
}

/* Zero-specificity resets so page stylesheets can't leak in and component rules always win. */
:where(.booking-dialog) :where(*, *::before, *::after) { box-sizing: border-box; margin: 0; padding: 0; }
:where(.booking-dialog) :where(button, input, select, textarea) { font: inherit; color: inherit; }
:where(.booking-dialog) :where(a) { color: inherit; }
/* Element-level (0,0,1) on purpose: ties with page rules like `p { color }` and wins by loading later. */
:where(.booking-dialog) p,
:where(.booking-dialog) li,
:where(.booking-dialog) label,
:where(.booking-dialog) strong { color: inherit; }
.booking-dialog h2,
.booking-dialog h3 {
  color: inherit;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.booking-dialog :focus-visible { outline: 3px solid #c79a5b; outline-offset: 3px; box-shadow: none; }
.booking-dialog::backdrop { background: rgba(27, 8, 17, .76); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); }

.booking-shell {
  display: grid;
  grid-template-columns: minmax(290px, .72fr) minmax(0, 1.28fr);
  min-height: min(720px, calc(100vh - 32px));
  min-height: min(720px, calc(100dvh - 32px));
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  overscroll-behavior: contain;
}

.booking-aside {
  display: flex;
  flex-direction: column;
  min-height: 100%;
  padding: clamp(32px, 4vw, 52px);
  overflow: hidden;
  color: var(--bk-paper);
  background:
    radial-gradient(90% 50% at 100% 100%, rgba(150, 56, 90, .5), transparent 70%),
    radial-gradient(70% 34% at 0% 0%, rgba(199, 154, 91, .14), transparent 70%),
    var(--bk-night);
}
.booking-mark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  width: fit-content;
  color: var(--bk-gold);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .14em;
  line-height: 1.3;
  text-transform: uppercase;
}
.booking-mark img { width: 38px; height: 38px; }
.booking-aside h2 { max-width: 9ch; margin-top: 44px; font-size: clamp(2.9rem, 4.4vw, 4.2rem); }
.booking-aside > p { max-width: 31ch; margin-top: 22px; color: rgba(255, 250, 246, .78); }

.booking-facts { display: grid; margin-top: 30px; border-top: 1px solid rgba(230, 201, 143, .24); list-style: none; }
.booking-facts li { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid rgba(230, 201, 143, .24); color: rgba(255, 250, 246, .88); font-size: 15px; line-height: 1.4; }
.booking-facts li::before {
  content: "";
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23e6c98f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2.5 8.6l3.4 3.4 7.6-8'/%3E%3C/svg%3E");
}

.booking-main { padding: clamp(30px, 4vw, 52px); }
/* The close button belongs to the dialog itself, so it stays put while the calendar scrolls. */
.booking-close {
  position: absolute;
  z-index: 3;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(42, 16, 25, .2);
  border-radius: 50%;
  color: var(--bk-wine);
  background: var(--bk-paper);
  box-shadow: 0 8px 20px -10px rgba(42, 15, 29, .5);
  cursor: pointer;
  font-size: 0;
  line-height: 1;
  transition: transform .3s var(--bk-ease), background-color .2s ease, color .2s ease, border-color .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.booking-close::before,
.booking-close::after { content: ""; position: absolute; width: 15px; height: 1.5px; border-radius: 2px; background: currentColor; transform: rotate(45deg); }
.booking-close::after { transform: rotate(-45deg); }
.booking-close:active { color: var(--bk-paper); border-color: var(--bk-wine); background: var(--bk-wine); transform: rotate(90deg) scale(.9); }
@media (hover: hover) { .booking-close:hover { border-color: var(--bk-wine); transform: rotate(90deg); } }

.booking-eyebrow { color: #7d5a2a; font-size: 12px; font-weight: 700; letter-spacing: .16em; line-height: 1.3; text-transform: uppercase; }
.booking-main h3 { max-width: 12ch; margin-top: 10px; padding-right: 44px; font-size: clamp(2.4rem, 3.6vw, 3.6rem); }
.booking-intro { max-width: 52ch; margin-top: 14px; padding: 10px 14px; border-left: 2px solid var(--bk-gold-deep); color: var(--bk-ink-2); background: #f8f1eb; font-size: 15px; }
.booking-cal { position: relative; min-height: 460px; margin-top: 22px; }
.booking-cal iframe { width: 100%; border: 0; }
.booking-cal-loading { display: flex; align-items: center; gap: 12px; padding: 40px 0; color: var(--bk-muted); font-size: 15px; }
.booking-cal-loading::before { content: ""; width: 18px; height: 18px; border: 2px solid rgba(122, 34, 64, .22); border-top-color: var(--bk-wine); border-radius: 50%; animation: booking-spin .8s linear infinite; }
.booking-cal-loading[hidden],
.booking-success[hidden],
.booking-flow[hidden],
.booking-fallback[hidden] { display: none !important; }

.booking-submit {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 56px;
  padding: 14px 26px;
  border: 0;
  border-radius: 14px;
  color: var(--bk-paper);
  background: var(--bk-wine);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .14), 0 14px 28px -16px rgba(42, 15, 29, .7);
  cursor: pointer;
  font-weight: 700;
  line-height: 1.2;
  transition: transform .2s var(--bk-ease), background-color .3s ease;
}
.booking-submit:active { transform: scale(.975); }
@media (hover: hover) { .booking-submit:hover { background: var(--bk-wine-dark); } }
.booking-submit:disabled { opacity: .7; cursor: progress; transform: none; }
.booking-submit.ghost { width: auto; }
.booking-fallback { margin-top: 18px; padding: 12px 14px; border-left: 2px solid var(--bk-wine); background: #f8e9e7; font-size: 14.5px; }
.booking-fallback a { color: var(--bk-wine-dark); font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.booking-success { display: grid; min-height: 420px; align-content: center; justify-items: start; }
.booking-success-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: var(--bk-night); background: linear-gradient(180deg, #efd9aa, #d6ac6c); font-size: 24px; }
.booking-success h3 { margin-top: 22px; }
.booking-success > p { max-width: 46ch; margin-top: 15px; color: var(--bk-ink-2); }
.booking-success .booking-success-time { color: var(--bk-wine-dark); font-weight: 700; }
.booking-next { display: grid; max-width: 48ch; margin-top: 22px; border-top: 1px solid var(--bk-line); list-style: none; counter-reset: next; }
.booking-next li { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 8px; align-items: baseline; padding: 12px 0; border-bottom: 1px solid var(--bk-line); color: var(--bk-ink); font-size: 15px; counter-increment: next; }
.booking-next li::before { content: counter(next); color: #8a6430; font-family: "Fraunces", Georgia, serif; font-size: 22px; font-style: italic; line-height: 1; }
.booking-success .booking-submit { width: auto; margin-top: 26px; padding-inline: 34px; }

@media (min-width: 761px) and (max-height: 860px) {
  .booking-aside h2 { margin-top: 30px; font-size: clamp(2.5rem, 3.8vw, 3.4rem); }
  .booking-aside > p { margin-top: 16px; font-size: 15px; }
  .booking-facts { margin-top: 20px; }
  .booking-facts li { padding: 9px 0; }
}

@media (max-width: 760px) {
  .booking-dialog { width: 100%; max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px); margin: auto 0 0; border-radius: 20px 20px 0 0; }
  .booking-shell { grid-template-columns: 1fr; min-height: 0; max-height: calc(100vh - 12px); max-height: calc(100dvh - 12px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .booking-aside { min-height: 0; padding: 14px 66px 14px 20px; }
  .booking-aside h2,
  .booking-aside > p,
  .booking-facts { display: none; }
  .booking-mark { gap: 10px; font-size: 12px; letter-spacing: .12em; }
  .booking-mark img { width: 34px; height: 34px; }
  .booking-close { top: 9px; right: 12px; border-color: rgba(230, 201, 143, .45); }
  .booking-main { padding: 20px 20px 30px; }
  .booking-main h3 { max-width: none; margin-top: 6px; padding-right: 0; font-size: 1.95rem; }
  .booking-cal { margin-top: 14px; margin-inline: -12px; }
  .booking-success { min-height: 0; padding-block: 12px; }
}

/* Sticky booking bar on phones (pages that opt in with data-booking-sticky). */
.rm-sticky {
  position: fixed;
  z-index: 60;
  left: 12px;
  right: 12px;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: none;
  align-items: center;
  gap: 14px;
  padding: 7px 16px 7px 7px;
  border: 1px solid rgba(230, 201, 143, .34);
  border-radius: 18px;
  background: rgba(42, 15, 29, .96);
  box-shadow: 0 20px 44px -16px rgba(0, 0, 0, .7);
  transform: translateY(160%);
  transition: transform .45s cubic-bezier(.4, 0, 1, 1);
}
.rm-sticky.show { transform: none; transition: transform .65s cubic-bezier(.34, 1.56, .64, 1); }
.rm-sticky a {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 10px 16px;
  border-radius: 12px;
  color: #2a0f1d;
  background: linear-gradient(180deg, #efd9aa 0%, #d6ac6c 100%);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .55);
  font-family: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}
.rm-sticky small { flex: 0 0 auto; color: rgba(255, 250, 246, .78); font-family: "Hanken Grotesk", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif; font-size: 13px; font-weight: 600; line-height: 1.3; text-align: center; }
@media (max-width: 760px) { .rm-sticky { display: flex; } }

/* Dialog entrance and small feedback touches. */
.booking-dialog[open] { animation: booking-enter .5s var(--bk-ease) both; }
.booking-dialog[open]::backdrop { animation: booking-fade .4s ease both; }
.booking-success:not([hidden]) { animation: booking-rise .45s var(--bk-ease) both; }
.booking-success-mark { animation: booking-pop .6s var(--bk-spring) .1s both; }
@media (max-width: 760px) { .booking-dialog[open] { animation-name: booking-sheet; animation-duration: .55s; } }
@keyframes booking-enter { from { opacity: 0; transform: translateY(26px) scale(.975); } to { opacity: 1; transform: none; } }
@keyframes booking-sheet { from { transform: translateY(100%); } to { transform: none; } }
@keyframes booking-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes booking-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes booking-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: none; } }
@keyframes booking-spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  .booking-dialog[open],
  .booking-dialog[open]::backdrop,
  .booking-success:not([hidden]),
  .booking-success-mark,
  .booking-cal-loading::before { animation: none; }
  .booking-submit,
  .booking-close,
  .rm-sticky,
  .rm-sticky.show { transition: none; }
}
