/* Composer shell, compose panel and pop-ups.
   Variant styles are injected by compose.js, each scoped to its own sections. */

:root {
  --cmp-bg: #ffffff;
  --cmp-surface: #f5f6f8;
  --cmp-text: #1f2937;
  --cmp-muted: #5b6270;
  --cmp-border: #e4e6ea;
  --cmp-orange: #f37d30;
  --cmp-orange-text: #b94c13;
  --cmp-shadow: 0 12px 40px rgb(17 24 39 / 0.18), 0 2px 8px rgb(17 24 39 / 0.08);

  --pop-bg: #ffffff;
  --pop-text: #222222;
  --pop-border: rgb(17 24 39 / 0.06);
  --pop-ico-bg: #fff1e7;
  --pop-ico: #e0661a;
  --pop-shadow: 0 10px 30px rgb(17 24 39 / 0.14), 0 2px 6px rgb(17 24 39 / 0.06);
}
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])):not([data-theme="light"]) {
    --cmp-bg: #1f2937; --cmp-surface: #111827; --cmp-text: #f4f5f7; --cmp-muted: #b9c0cc;
    --cmp-border: rgb(255 255 255 / 0.1); --cmp-orange-text: #f8984f;
    --cmp-shadow: 0 12px 40px rgb(0 0 0 / 0.5);
    --pop-bg: #1f2937; --pop-text: #f4f5f7; --pop-border: rgb(255 255 255 / 0.08);
    --pop-ico-bg: rgb(243 125 48 / 0.16); --pop-ico: #f8984f;
    --pop-shadow: 0 10px 30px rgb(0 0 0 / 0.45);
  }
}

  :root:where([data-theme="dark"]):not([data-theme="light"]) {
    --cmp-bg: #1f2937; --cmp-surface: #111827; --cmp-text: #f4f5f7; --cmp-muted: #b9c0cc;
    --cmp-border: rgb(255 255 255 / 0.1); --cmp-orange-text: #f8984f;
    --cmp-shadow: 0 12px 40px rgb(0 0 0 / 0.5);
    --pop-bg: #1f2937; --pop-text: #f4f5f7; --pop-border: rgb(255 255 255 / 0.08);
    --pop-ico-bg: rgb(243 125 48 / 0.16); --pop-ico: #f8984f;
    --pop-shadow: 0 10px 30px rgb(0 0 0 / 0.45);
  }

:root[data-theme="dark"] {
  --cmp-bg: #1f2937; --cmp-surface: #111827; --cmp-text: #f4f5f7; --cmp-muted: #b9c0cc;
  --cmp-border: rgb(255 255 255 / 0.1); --cmp-orange-text: #f8984f;
  --cmp-shadow: 0 12px 40px rgb(0 0 0 / 0.5);
  --pop-bg: #1f2937; --pop-text: #f4f5f7; --pop-border: rgb(255 255 255 / 0.08);
  --pop-ico-bg: rgb(243 125 48 / 0.16); --pop-ico: #f8984f;
  --pop-shadow: 0 10px 30px rgb(0 0 0 / 0.45);
}

html { overflow-x: clip; }
body { margin: 0; background: var(--cmp-surface); }
.cmp-loading { margin: 0; padding: 120px 20px; text-align: center; font: 500 15px/1.5 Inter, system-ui, sans-serif; color: var(--cmp-muted); }

/* Each section lives in a slot; the slot carries its variant's tokens. */
.cmp-slot { position: relative; }
.cmp-slot[data-section="S01"] { position: sticky; top: 0; z-index: 100; } /* below the booking widget (9998) */
.cmp-sprites { display: none; }

/* ---------- Pop-ups ---------- */

.pop {
  position: absolute; z-index: 20; pointer-events: none;
  opacity: 0; transform: translateY(18px) scale(0.82);
  transition: opacity 450ms ease, transform 700ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
.pop.is-in { opacity: 1; transform: none; animation: pop-bob 6s ease-in-out 900ms infinite; }
.pop--b.is-in { animation-duration: 7s; animation-delay: 2.4s; }
[data-pops="off"] .pop { display: none; }

.pop-card {
  position: relative; display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 8px; border-radius: 14px; overflow: hidden; white-space: nowrap;
  background: var(--pop-bg); color: var(--pop-text); border: 1px solid var(--pop-border);
  box-shadow: var(--pop-shadow);
  font: 500 14px/1.2 Inter, system-ui, sans-serif; letter-spacing: -0.005em;
  transition: width 400ms cubic-bezier(0.2, 0.8, 0.2, 1);
}
.pop-card.is-new { animation: pop-flash 900ms ease-out; }
.pop-ico {
  flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 10px;
  background: var(--pop-ico-bg); color: var(--pop-ico);
}
.pop-ico svg { width: 16px; height: 16px; }
.pop-card.is-new .pop-ico { animation: pop-icon 650ms cubic-bezier(0.34, 1.56, 0.64, 1); }
.pop-card.is-new .pop-ico[data-icon="bell"] svg { animation: pop-ring 900ms ease-in-out; transform-origin: 50% 10%; }
.pop-body { display: inline-flex; align-items: center; min-height: 18px; }
.pop-txt { display: inline-block; animation: pop-txt-in 380ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.pop-dots { display: inline-flex; gap: 4px; padding: 0 4px; }
.pop-dots i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.35; animation: pop-dot 900ms ease-in-out infinite; }
.pop-dots i:nth-child(2) { animation-delay: 150ms; }
.pop-dots i:nth-child(3) { animation-delay: 300ms; }
.pop-ping {
  position: absolute; top: 6px; left: 32px; width: 8px; height: 8px; border-radius: 50%;
  background: var(--cmp-orange); box-shadow: 0 0 0 2px var(--pop-bg); opacity: 0; transform: scale(0);
}
.pop-card.is-new .pop-ping { animation: pop-dot-in 2.4s ease forwards; }

/* The variant's own floating cards: a little life every few seconds. */
.pop-alive { animation: pop-alive 5.5s ease-in-out var(--pop-delay, 0s) infinite; }
[data-pops="off"] .pop-alive { animation: none; }

@keyframes pop-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -7px; } }
@keyframes pop-flash {
  0% { box-shadow: var(--pop-shadow), 0 0 0 0 rgb(243 125 48 / 0.55); }
  100% { box-shadow: var(--pop-shadow), 0 0 0 12px rgb(243 125 48 / 0); }
}
@keyframes pop-icon { 0% { scale: 0.6; } 60% { scale: 1.15; } 100% { scale: 1; } }
@keyframes pop-ring {
  0%, 100% { rotate: 0deg; } 15% { rotate: 16deg; } 30% { rotate: -14deg; }
  45% { rotate: 10deg; } 60% { rotate: -6deg; } 75% { rotate: 3deg; }
}
@keyframes pop-txt-in { from { opacity: 0; translate: 0 8px; } to { opacity: 1; translate: 0 0; } }
@keyframes pop-dot { 0%, 100% { translate: 0 0; opacity: 0.35; } 40% { translate: 0 -4px; opacity: 0.9; } }
@keyframes pop-dot-in { 0% { opacity: 0; transform: scale(0); } 12% { opacity: 1; transform: scale(1.3); } 20%, 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; transform: scale(1); } }
@keyframes pop-alive {
  0%, 18%, 100% { scale: 1; rotate: 0deg; }
  4% { scale: 1.07; rotate: -2deg; }
  8% { scale: 0.98; rotate: 1.5deg; }
  12% { scale: 1.02; rotate: 0deg; }
}

@media (max-width: 639px) {
  .pop-card { font-size: 12.5px; padding: 6px 11px 6px 6px; gap: 8px; border-radius: 12px; }
  .pop-ico { width: 26px; height: 26px; border-radius: 8px; }
  .pop-ico svg { width: 14px; height: 14px; }
  .pop-ping { left: 26px; top: 4px; }
}

@media (prefers-reduced-motion: reduce) {
  .pop { transition: opacity 200ms ease; transform: none; }
  .pop.is-in, .pop-alive, .pop-card.is-new, .pop-card.is-new .pop-ico, .pop-txt { animation: none; }
}

/* ---------- Compose panel ---------- */

.cmp { position: fixed; left: 16px; bottom: 16px; z-index: 9990; font: 400 14px/1.4 Inter, system-ui, sans-serif; color: var(--cmp-text); }
.cmp-toggle {
  display: inline-flex; align-items: center; gap: 8px; height: 44px; padding: 0 16px 0 14px;
  border-radius: 999px; border: 1px solid var(--cmp-border); background: var(--cmp-bg); color: var(--cmp-text);
  font: 600 14px/1 Inter, system-ui, sans-serif; box-shadow: var(--cmp-shadow); cursor: pointer;
}
.cmp-toggle svg { width: 18px; height: 18px; color: var(--cmp-orange); }
.cmp-toggle[aria-expanded="true"] { border-color: var(--cmp-orange); }
.cmp-toggle:focus-visible, .cmp button:focus-visible, .cmp select:focus-visible, .cmp input:focus-visible { outline: 3px solid rgb(243 125 48 / 0.5); outline-offset: 2px; }

.cmp-panel {
  position: absolute; left: 0; bottom: 56px; width: min(360px, calc(100vw - 32px));
  max-height: calc(100dvh - 104px); overflow: auto; overscroll-behavior: contain;
  padding: 16px; border-radius: 18px; background: var(--cmp-bg); border: 1px solid var(--cmp-border); box-shadow: var(--cmp-shadow);
}
.cmp-panel[hidden] { display: none; }
.cmp-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.cmp-head strong { font-size: 16px; font-weight: 600; }
.cmp-close { width: 32px; height: 32px; border-radius: 8px; border: 0; background: var(--cmp-surface); color: var(--cmp-text); font-size: 20px; line-height: 1; cursor: pointer; }
.cmp-hint { margin: 6px 0 12px; font-size: 12.5px; color: var(--cmp-muted); }
.cmp-rows { display: grid; gap: 6px; }
.cmp-row { display: grid; grid-template-columns: 38px 1fr minmax(128px, 46%); align-items: center; gap: 8px; }
.cmp-code { font: 700 12px/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--cmp-orange-text); }
.cmp-name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmp select {
  width: 100%; height: 34px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--cmp-border);
  background: var(--cmp-surface); color: var(--cmp-text); font: 500 13px Inter, system-ui, sans-serif; cursor: pointer;
}
.cmp-opts { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--cmp-border); }
.cmp-seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--cmp-surface); }
.cmp-seg button { height: 28px; padding: 0 10px; border: 0; border-radius: 8px; background: transparent; color: var(--cmp-muted); font: 500 12.5px Inter, system-ui, sans-serif; cursor: pointer; }
.cmp-seg button[aria-pressed="true"] { background: var(--cmp-bg); color: var(--cmp-text); box-shadow: 0 1px 3px rgb(0 0 0 / 0.12); }
.cmp-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 500; cursor: pointer; }
.cmp-check input { width: 16px; height: 16px; accent-color: var(--cmp-orange); }
.cmp-foot { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.cmp-copy { height: 34px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--cmp-border); background: var(--cmp-surface); color: var(--cmp-text); font: 500 13px Inter, system-ui, sans-serif; cursor: pointer; }
.cmp-status { font-size: 12.5px; color: var(--cmp-muted); }
.cmp-link { display: inline-flex; align-items: center; text-decoration: none; border-color: var(--cmp-orange); }

@media (max-width: 639px) {
  .cmp { left: 12px; bottom: 12px; }
  .cmp-panel { bottom: 54px; width: calc(100vw - 24px); max-height: calc(100dvh - 160px); }
}

/* Website (site mode): the V08 hero's review player is tooling, not part of the site */
html[data-site] .story .player { display: none; }
