/* Book-a-call tab and calendar panel: loaded ONLY when SITE.features.bookTab is on (src/layouts/Base.astro links it).
   Kept out of the Astro bundle on purpose: Astro 4 bundles an imported component's CSS and scripts
   into every page whether or not it renders, so a flag-off build would still have changed all 223
   pages (measured 2026-10-15). Markup lives in src/components/BookTab.astro. */
.sx-booktab, .sx-book {
  --sx-forest: #21312F; --sx-cream: #FFFDF8; --sx-coral: #FF8B64;
  --sx-label: 12px; --sx-track: 1.68px;
  font-family: 'Source Serif 4', Georgia, 'Times New Roman', serif;
}
.sx-booktab {
  position: fixed; right: 0; top: 50%; transform: translateY(-50%); z-index: 58;
  display: flex; align-items: center; gap: 10px;
  writing-mode: vertical-rl;
  background: var(--sx-coral); color: var(--sx-forest); text-decoration: none;
  font-weight: 600; font-size: var(--sx-label); letter-spacing: var(--sx-track); text-transform: uppercase;
  padding: 20px 12px; border-radius: 12px 0 0 12px;
  box-shadow: -10px 0 30px -12px rgba(0, 0, 0, .45);
  transition: padding .25s cubic-bezier(.2, .7, .2, 1);
}
/* Hover pulls the tab out a little. The color never changes. */
.sx-booktab:hover, .sx-booktab:focus-visible { padding-right: 18px; color: var(--sx-forest); }
.sx-booktab:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sx-booktab-label { transform: rotate(180deg); }
.sx-booktab-ico {
  width: 14px; height: 14px; flex: 0 0 auto; border: 1.6px solid currentColor; border-radius: 3px;
  box-shadow: inset 0 3px 0 currentColor;
}
.sx-bookback {
  position: fixed; inset: 0; z-index: 79;
  background: rgba(10, 16, 15, .55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
}
.sx-bookback[hidden], .sx-book[hidden] { display: none; }
.sx-book {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 80;
  width: min(540px, 100vw);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, #22322f 0%, #1a2725 100%);
  border-left: 1px solid rgba(255, 253, 248, .10);
  box-shadow: -40px 0 90px -30px rgba(0, 0, 0, .6);
  color: var(--sx-cream);
}
/* Position only, never opacity: a hidden document would otherwise leave it invisible. */
.sx-book.is-open { animation: sxBookIn .32s cubic-bezier(.22, 1, .36, 1); }
@keyframes sxBookIn { from { transform: translateX(40px); } to { transform: translateX(0); } }
.sx-book-head { display: flex; gap: 18px; align-items: flex-start; justify-content: space-between; padding: 26px 26px 16px; }
.sx-book-eyebrow { margin: 0 0 8px; font-size: var(--sx-label); letter-spacing: var(--sx-track); text-transform: uppercase; color: #DDA88A; }
.sx-book-head h2 { margin: 0 0 8px; font-family: inherit; font-weight: 400; font-size: 30px; line-height: 1.1; letter-spacing: -.015em; color: #fff; }
.sx-book-sub { margin: 0; font-size: 15px; line-height: 1.55; color: var(--sx-cream); }
.sx-book-close {
  flex: 0 0 auto; width: 40px; height: 40px; border-radius: 999px; border: 0; cursor: pointer;
  background: rgba(255, 253, 248, .10); color: #fff; font-size: 24px; line-height: 1;
  display: grid; place-items: center;
}
.sx-book-close:hover { background: rgba(255, 253, 248, .18); }
.sx-book-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sx-book-frame-wrap { position: relative; flex: 1 1 auto; min-height: 0; margin: 0 16px; border-radius: 12px; overflow: hidden; background: var(--sx-cream); }
.sx-book-frame { position: relative; z-index: 1; display: block; width: 100%; height: 100%; border: 0; background: transparent; }
.sx-book-loading { position: absolute; inset: 0; z-index: 0; display: grid; place-items: center; margin: 0; color: var(--sx-forest); font-size: 15px; }
.sx-book.is-loaded .sx-book-loading { display: none; }
.sx-book-foot { display: grid; gap: 6px; padding: 14px 26px 20px; font-size: 13px; line-height: 1.5; color: var(--sx-cream); }
.sx-book-foot a { color: #fff; border-bottom: 1px solid rgba(255, 253, 248, .45); text-decoration: none; }

@media (max-width: 760px) {
  .sx-booktab {
    top: auto; bottom: 16px; right: 16px; transform: none;
    writing-mode: horizontal-tb; border-radius: 999px; padding: 14px 18px;
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .55);
  }
  .sx-booktab:hover, .sx-booktab:focus-visible { padding-right: 18px; }
  .sx-booktab-label { transform: none; }
  .sx-book-head { padding: 20px 18px 12px; }
  .sx-book-head h2 { font-size: 26px; }
  .sx-book-frame-wrap { margin: 0 10px; }
  .sx-book-foot { padding: 12px 18px 16px; }
}
/* MEASURED on a 666px-tall window: the full header left the calendar 410px and cut off the
   dates. On short screens the header condenses so the calendar gets the height. */
@media (max-height: 780px) {
  .sx-book-head { padding: 16px 22px 10px; }
  .sx-book-head h2 { font-size: 24px; margin-bottom: 0; }
  .sx-book-sub { display: none; }
  .sx-book-foot { padding: 10px 22px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .sx-book.is-open { animation: none; }
  .sx-booktab { transition: none; }
}
html.sx-book-open, html.sx-book-open body { overflow: hidden; }
html.sx-book-open .sx-booktab, html.sx-drawer-open .sx-booktab { visibility: hidden; }
