/* Glow player chrome — light, warm, editorial (ShopMy/LTK register, boheme lean).
   The video is the hero; Glow's additions read as warm paper and soft gold light.

   Tokens:
     paper   #FAF6EF   page / glass fills
     linen   #F1E9DC   card fills
     sand    #E4D8C4   hairlines / borders
     ink     #2B2620   text
     fawn    #8C7A62   secondary text
     caramel #A9682F   accents, prices, links
     gold    (canvas)  the silhouette glow: warm champagne light
*/

.glow-root {
  --paper: #faf6ef;
  --linen: #f1e9dc;
  --sand: #e4d8c4;
  --ink: #2b2620;
  --fawn: #8c7a62;
  --caramel: #a9682f;
  --radius: 16px;
  --serif: "Iowan Old Style", "Palatino", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", sans-serif;
  position: relative;
  font-family: var(--sans);
  color: var(--ink);
}

.glow-stage {
  position: relative; border-radius: var(--radius); overflow: hidden;
  background: var(--linen); width: fit-content; max-width: 100%; margin: 0 auto;
  box-shadow: 0 1px 2px rgba(64, 50, 32, 0.08), 0 12px 40px -18px rgba(64, 50, 32, 0.25);
  /* container for proportional text: card/shelf font sizes scale with the
     player width via cqw units, so a tiny embed isn't crammed with huge text */
  container-type: inline-size;
}
/* Reasonable at any aspect: portrait phone video caps at ~2/3 viewport height
   instead of flooding the page; landscape still fills the column width. */
.glow-stage video {
  display: block; max-width: 100%; max-height: 66vh; width: auto; height: auto;
}
.glow-canvas { position: absolute; inset: 0; }

/* honest loading state — the player is never a silent blank box */
.glow-loading {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center; pointer-events: none;
}
.glow-loading span {
  padding: 9px 18px; border-radius: 999px;
  background: rgba(43, 38, 32, 0.6); color: #faf6ef;
  font-family: var(--sans, -apple-system, sans-serif); font-size: 12.5px; font-weight: 500;
  animation: glow-loading-pulse 1.6s ease-in-out infinite;
  max-width: 80%; text-align: center; line-height: 1.4;
}
@keyframes glow-loading-pulse { 50% { opacity: 0.55; } }
.glow-loading-hidden { display: none; }

/* --- pill: quiet linen tab; an assist, not a gate ----------------------- */

.glow-ctrls {
  position: absolute; left: 14px; bottom: 14px;
  display: flex; align-items: center; gap: 7px;
  opacity: 0; transform: translateY(6px); pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.glow-ctrls.visible { opacity: 1; transform: none; pointer-events: auto; }

/* Glow toggle (was the tag pill): a round glass button matching the others.
   Dims when glow is OFF; the state name flashes in the toast on each tap. */
.glow-pill {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 50%;
  background: rgba(250, 246, 239, 0.82); color: var(--ink);
  backdrop-filter: blur(12px) saturate(1.1); -webkit-backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: 0 2px 10px rgba(64, 50, 32, 0.16); cursor: pointer;
  transition: color 0.15s ease, opacity 0.2s ease, transform 0.06s ease;
}
.glow-pill:hover { color: var(--caramel); }
.glow-pill:active { transform: scale(0.94); }
.glow-btn-off { opacity: 0.5; }
.glow-btn-off:hover { opacity: 0.8; }

/* Play/pause: same glass round button, sits just left of the volume button. */
.glow-playpause {
  position: absolute; right: 54px; bottom: 12px; z-index: 6;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 50%;
  background: rgba(250, 246, 239, 0.82); color: var(--ink);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(64, 50, 32, 0.16); cursor: pointer;
  transition: color 0.15s ease, transform 0.06s ease;
}
.glow-playpause:hover { color: var(--caramel); }
.glow-playpause:active { transform: scale(0.94); }

/* Quick semi-opaque label pill for glow-state changes (Glow On / Off / Default). */
/* Glow-state label: an elegant dark pill floating just ABOVE the glow button
   (bottom-left), with a little pointer down to it. Fades on its own. */
.glow-toast {
  position: absolute; left: 12px; bottom: 56px;
  padding: 6px 13px; border-radius: 999px; white-space: nowrap;
  background: rgba(28, 23, 18, 0.82); color: #fff8ef;
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.01em;
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 4px 16px -4px rgba(0, 0, 0, 0.4);
  opacity: 0; transform: translateY(6px); pointer-events: none; z-index: 9;
  transition: opacity 0.22s ease, transform 0.22s ease;
}
.glow-toast::after { /* pointer down toward the glow button */
  content: ""; position: absolute; left: 15px; bottom: -5px;
  border-left: 5px solid transparent; border-right: 5px solid transparent;
  border-top: 5px solid rgba(28, 23, 18, 0.82);
}
.glow-toast-show { opacity: 1; transform: translateY(0); transition: opacity 0.12s ease, transform 0.12s ease; }
/* when chips sit bottom-left, the controls (glow button) move bottom-right —
   follow the toast to that side too */
.glow-pill-right ~ .glow-toast, .glow-root:has(.glow-pill-right) .glow-toast {
  left: auto; right: 12px;
}
.glow-root:has(.glow-pill-right) .glow-toast::after { left: auto; right: 15px; }

/* --- product card: warm paper, serif title ------------------------------- */

/* Product card = a BOTTOM SHEET (above the controls), so it never covers the
   subject's face. Slides up from the bottom; full width minus small margins. */
.glow-card {
  position: absolute; left: 8px; right: 8px; bottom: 54px;
  max-height: calc(100% - 66px);
  border-radius: var(--radius); overflow: hidden;
  background: var(--paper); border: 1px solid var(--sand);
  box-shadow: 0 16px 44px -14px rgba(0, 0, 0, 0.5);
  opacity: 0; transform: translateY(14px); pointer-events: none; z-index: 12;
  transition: opacity 0.24s ease, transform 0.24s ease;
  display: flex; flex-direction: column;
}
.glow-card.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
.glow-card-img { width: 100%; height: clamp(88px, 34cqw, 140px); object-fit: cover; display: block; flex: none; }
.glow-card-body { padding: 13px 15px 15px; min-height: 0; overflow: hidden; }
.glow-card-title {
  font-family: var(--serif); font-size: clamp(12px, 6cqw, 15.5px); font-weight: 600;
  line-height: 1.3; letter-spacing: 0.005em;
  /* clamp long titles to 2 lines instead of overflowing the frame */
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; overflow-wrap: anywhere;
}
.glow-card-price { margin-top: 4px; font-size: clamp(10px, 5cqw, 13px); color: var(--caramel); font-weight: 700; }
/* "Shop this" — taller + custom: warm-dark gradient, gold rim glow, inset
   highlight, and an arrow. The distinctive CTA of the whole card. */
.glow-card-cta {
  display: flex; align-items: center; justify-content: center;
  margin-top: 12px; min-height: clamp(40px, 17cqw, 52px); padding: 0 14px;
  border-radius: 12px; letter-spacing: 0.02em; text-decoration: none;
  background: linear-gradient(180deg, #3a332b 0%, var(--ink) 100%);
  color: var(--paper); font-size: clamp(12px, 5.2cqw, 14px); font-weight: 700;
  box-shadow: 0 5px 16px -5px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.12),
              0 0 0 1px rgba(232, 176, 75, 0.35);
  transition: transform 0.06s ease, box-shadow 0.16s ease;
}
.glow-card-cta::after { content: "  →"; opacity: 0.8; }
.glow-card-cta:hover {
  box-shadow: 0 7px 22px -5px rgba(0, 0, 0, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.16),
              0 0 0 1px rgba(232, 176, 75, 0.6);
}
.glow-card-cta:active { transform: translateY(1px); }
.glow-card-cta:focus-visible, .glow-pill:focus-visible, .glow-shelf-toggle:focus-visible {
  outline: 2px solid var(--caramel); outline-offset: 2px;
}
.glow-card-close {
  position: absolute; top: 8px; right: 8px; width: 26px; height: 26px;
  border: none; border-radius: 50%; background: rgba(250, 246, 239, 0.92);
  color: var(--ink); font-size: 15px; line-height: 1; cursor: pointer;
  box-shadow: 0 1px 4px rgba(64, 50, 32, 0.25);
}

/* --- in-stage icon buttons (lines toggle, shelf) ---------------------------- */

.glow-iconbtn {
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 50%;
  background: rgba(250, 246, 239, 0.82); color: var(--ink);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(64, 50, 32, 0.16); cursor: pointer;
  transition: color 0.15s ease, box-shadow 0.15s ease;
}
.glow-iconbtn:hover { color: var(--caramel); }

/* Audio: a small round unmute button pinned bottom-right of the stage. SAME
   glass register + hover as the other in-player controls (.glow-iconbtn) — the
   muted/unmuted state reads from the icon, not a different color. */
.glow-mute {
  position: absolute; right: 12px; bottom: 12px; z-index: 6;
  width: 34px; height: 34px; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.5); border-radius: 50%;
  background: rgba(250, 246, 239, 0.82); color: var(--ink);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 2px 10px rgba(64, 50, 32, 0.16); cursor: pointer;
  transition: color 0.15s ease, transform 0.06s ease;
}
.glow-mute:hover { color: var(--caramel); }
.glow-mute:active { transform: scale(0.94); }
.glow-mute-hidden { display: none; }

/* --- session shelf: a sheet INSIDE the stage (self-contained for embeds) ----- */

.glow-shelf {
  position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 6;
  max-height: 62%; overflow: hidden; border-radius: 14px;
  background: rgba(250, 246, 239, 0.96); border: 1px solid var(--sand);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 -6px 30px rgba(64, 50, 32, 0.25);
  transform: translateY(calc(100% + 12px)); transition: transform 0.3s ease;
  display: flex; flex-direction: column;
}
.glow-shelf.open { transform: none; }
.glow-shelf-head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 10px 14px 6px; flex: none;
  font-family: var(--serif); font-size: clamp(12px, 5.6cqw, 14.5px); font-weight: 700; color: var(--ink);
}
/* never wrap the header — on a narrow shelf it collided with the × ("Sidejoin this") */
.glow-shelf-head span {
  min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.glow-shelf-close {
  width: 26px; height: 26px; border: none; border-radius: 50%;
  background: rgba(43, 38, 32, 0.07); color: var(--ink);
  font-size: 15px; line-height: 1; cursor: pointer;
}
.glow-shelf ul { overflow-y: auto; overflow-x: hidden; padding: 0 10px 10px; }
.glow-shelf-list { list-style: none; margin: 0; display: grid; gap: 8px; }
/* Only at a truly tiny width does the GLOW toggle collapse (it goes first). The
   bag/play/volume always stay; the card + object taps always work. */
.glow-compact .glow-pill,
.glow-compact .glow-stack { display: none !important; }

/* [thumb][meta] — two columns only. The Shop button lives INSIDE the meta's
   info row (below the title), so a narrow shelf never crushes the title into
   one-letter-per-line. */
.glow-shelf-item {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px;
  border: 1px solid var(--sand); border-radius: 14px;
  background: rgba(241, 233, 220, 0.45); min-width: 0;
}
.glow-shelf-item img, .glow-shelf-thumbstub {
  width: clamp(38px, 15cqw, 46px); height: clamp(38px, 15cqw, 46px);
  flex: none; object-fit: cover; border-radius: 9px; border: 1px solid var(--sand);
}
.glow-shelf-meta { flex: 1; min-width: 0; }
/* text scales with the player width (cqw), clamped so it's never tiny or huge */
.glow-shelf-title {
  font-family: var(--serif); font-size: clamp(11px, 5.6cqw, 14.5px); font-weight: 600; line-height: 1.25;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; /* one clean line */
}
.glow-shelf-row { display: flex; align-items: center; gap: 4px 8px; margin-top: 4px; flex-wrap: wrap; }
.glow-shelf-price { font-size: clamp(10px, 4.8cqw, 12.5px); color: var(--caramel); font-weight: 700; }
.glow-shelf-seek {
  border: none; background: none; padding: 0;
  font-family: var(--sans); font-size: clamp(9.5px, 4.6cqw, 12px); color: var(--fawn);
  cursor: pointer; text-decoration: underline dotted; text-underline-offset: 3px;
}
.glow-shelf-seek:hover { color: var(--caramel); }
.glow-shelf-shop {
  flex: none; margin-left: auto; /* push to the right end of the info row */
  padding: 6px clamp(11px, 4cqw, 15px); border-radius: 999px;
  background: var(--ink); color: var(--paper);
  font-size: clamp(10px, 4.8cqw, 12.5px); font-weight: 600; text-decoration: none; white-space: nowrap;
  transition: background 0.15s ease;
}
.glow-shelf-shop:hover { background: #4a4237; }

/* --- in-frame stack: what's clickable right now, color-keyed --------------- */

.glow-stack {
  position: absolute; right: 14px; bottom: 14px; width: min(220px, 62%);
  max-height: calc(100% - 28px); overflow-y: auto;  /* many products can't overflow the frame */
  display: none; flex-direction: column; gap: 4px; padding: 8px;
  border-radius: 14px; background: rgba(250, 246, 239, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px) saturate(1.1); -webkit-backdrop-filter: blur(12px) saturate(1.1);
  box-shadow: 0 6px 24px rgba(64, 50, 32, 0.22);
}
.glow-stack.open { display: flex; }

.glow-stack-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 9px; border: none; border-radius: 9px; background: transparent;
  font-family: var(--sans); font-size: 12.5px; color: var(--ink);
  cursor: pointer; text-align: left; width: 100%;
  transition: background 0.12s ease;
}
.glow-stack-item:hover { background: rgba(43, 38, 32, 0.06); }
.glow-stack-dot {
  width: 10px; height: 10px; border-radius: 50%; flex: none;
  box-shadow: 0 0 6px currentColor;
}
.glow-stack-title {
  flex: 1; min-width: 0; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.glow-stack-price { color: var(--caramel); font-weight: 700; flex: none; }

/* --- monogram fallback (no product image scraped) --------------------------- */

.glow-monogram {
  display: grid; place-items: center; height: 124px;
  font-family: var(--serif); font-size: 44px; font-weight: 700;
}
.glow-shelf-thumbstub {
  width: 54px; height: 54px; border-radius: 10px; border: 1px solid;
}
.glow-shelf-nomoment { font-size: 12px; color: var(--fawn); font-style: italic; }

/* --- configurable corners (chips + card share a corner; pill sits opposite) --- */

.glow-at-br { top: auto; bottom: 14px; left: auto; right: 14px; }
.glow-at-bl { top: auto; bottom: 14px; right: auto; left: 14px; }
.glow-at-tr { bottom: auto; top: 14px; left: auto; right: 14px; }
.glow-at-tl { bottom: auto; top: 14px; right: auto; left: 14px; }

.glow-ctrls.glow-pill-left { left: 14px; right: auto; }
.glow-ctrls.glow-pill-right { left: auto; right: 14px; }

/* free-tier credit on embeds — quiet, bottom-left, above the gradient */
.glow-credit {
  position: absolute; left: 10px; bottom: 8px; z-index: 6;
  font: 600 10.5px/1 -apple-system, "SF Pro Text", sans-serif;
  letter-spacing: 0.04em; color: rgba(245, 239, 227, 0.85);
  background: rgba(20, 16, 12, 0.45); border-radius: 999px;
  padding: 5px 9px; text-decoration: none; backdrop-filter: blur(4px);
}
.glow-credit:hover { color: #ffe9c2; }

/* Davis 2026-07-19: the auto-appearing corner chip popups are RETIRED — the
   shelf (bag) is the one product surface besides the objects themselves.
   Kept in the DOM so player logic is untouched; simply never shown. */
.glow-root .glow-stack { display: none !important; }
