/* =====================================================================
 * GeekPress Movie Theme — geekui-vars.css
 * Single source of truth for ALL --geekui-* variables consumed by
 * the plugin's movie/tv/episode/catalog/name/char/profile/articles
 * structural CSS. Declared on body AND [id^="geekui-root"] in BOTH
 * dark and light modes so every SPA shell inherits the same palette
 * regardless of where it mounts in the DOM.
 *
 * Palette: cinematic gold-on-parchment — deep brown-black + warm gold
 * accent + cream body text (dark) / cream paper + deeper amber + dark
 * ink (light). Fonts mirror the theme chrome (Cormorant Garamond
 * display, Inter body).
 * ===================================================================== */

/* DARK — "Reel Noir transmission" */
body,
[id^="geekui-root"] {
  /* Canvas & text */
  --geekui-bg:               #0e0c09;
  --geekui-bg-2:             #181410;
  --geekui-text:             #f0e6d2;
  --geekui-text-dim:         #c4b89d;
  --geekui-text-mute:        #8a8175;

  /* Accent — warm gold, with a softer amber companion */
  --geekui-accent:           #d4a24a;
  --geekui-accent-2:         #e8bf6f;
  --geekui-accent-d:         #b9893a;

  /* Poster-less catalog placeholders — per type, on-brand cinematic trio */
  --geekui-noposter-movie:   #d4a24a;
  --geekui-noposter-tv:      #7aa7d4;
  --geekui-noposter-game:    #b487d6;
  --geekui-noposter-person:  #d4a24a;
  --geekui-noposter-char:    #c98a6a;

  /* Typography */
  --geekui-font-base:        "Inter", system-ui, -apple-system, sans-serif;
  --geekui-font-title:       "Cormorant Garamond", "EB Garamond", Georgia, serif;
  --geekui-font-mono:        "JetBrains Mono", ui-monospace, monospace;

  /* Surfaces & borders */
  --geekui-surface:          #181410;
  --geekui-surface-2:        rgba(212, 162, 74, 0.10);
  --geekui-border:           rgba(212, 162, 74, 0.22);
  --geekui-border-strong:    rgba(212, 162, 74, 0.55);
  --geekui-modal-bg:         #221c16;
  --geekui-modal-text:       #f0e6d2;

  /* Card & effects */
  --geekui-card-radius:      6px;
  --geekui-card-shadow:      0 8px 24px rgba(0, 0, 0, 0.55);
  --geekui-card-hover-shadow: 0 18px 40px rgba(0, 0, 0, 0.65), 0 0 24px rgba(212, 162, 74, 0.18);
  --geekui-glow:             0 0 0 1px rgba(212, 162, 74, 0.50), 0 0 22px rgba(212, 162, 74, 0.25);

  --geekui-hero-fade:        linear-gradient(180deg, rgba(14, 12, 9, 0.30) 0%, rgba(14, 12, 9, 0.78) 55%, rgba(14, 12, 9, 0.96) 100%);
  --geekui-hero-tint:        linear-gradient(110deg, rgba(212, 162, 74, 0.10) 0%, transparent 40%, rgba(185, 137, 58, 0.08) 100%);
  --geekui-hero-text-shadow: 0 2px 18px rgba(0, 0, 0, 0.85), 0 0 6px rgba(212, 162, 74, 0.20);

  /* Tone scale — warm spectrum */
  --geekui-tone-exceptional: #e8bf6f;
  --geekui-tone-great:       #d4a24a;
  --geekui-tone-good:        #6ee7b7;
  --geekui-tone-mixed:       #f0c674;
  --geekui-tone-poor:        #ff6b9a;
  --geekui-tone-muted:       #6b6353;

  /* Private skin extras — short prefix so per-context skins can riff
     without colliding with the plugin's reserved --geekui-* namespace. */
  --reel-paper:              #f0e6d2;
  --reel-ink:                #1a1611;
  --reel-grain:              rgba(240, 230, 210, 0.04);

  /* Compat aliases — Chroma's copied skin files reference --chroma-*
     for a few decorative accents (violet glow stripes). Map them to
     our amber companion so those decorations still light up. */
  --chroma-violet:           #b9893a;
  --chroma-violet-2:         #d4a24a;
  --chroma-grid:             rgba(212, 162, 74, 0.04);
}

/* LIGHT — "Daylight Marquee" */
body[data-theme="light"],
body[data-theme="light"] [id^="geekui-root"] {
  --geekui-bg:               #f5efe2;
  --geekui-bg-2:             #faf4e7;
  --geekui-text:             #1a1611;
  --geekui-text-dim:         #4a4036;
  --geekui-text-mute:        #6e655a;

  /* Gold darkened for AA contrast on cream paper */
  --geekui-accent:           #9a6f1f;
  --geekui-accent-2:         #b9893a;
  --geekui-accent-d:         #6e4f12;

  --geekui-surface:          #ffffff;
  --geekui-surface-2:        rgba(154, 111, 31, 0.08);
  --geekui-border:           rgba(154, 111, 31, 0.22);
  --geekui-border-strong:    rgba(154, 111, 31, 0.55);
  --geekui-modal-bg:         #ffffff;
  --geekui-modal-text:       #1a1611;

  --geekui-card-shadow:      0 6px 18px rgba(26, 22, 17, 0.08);
  --geekui-card-hover-shadow: 0 14px 32px rgba(26, 22, 17, 0.14), 0 0 18px rgba(154, 111, 31, 0.14);
  --geekui-glow:             0 0 0 1px rgba(154, 111, 31, 0.55), 0 0 18px rgba(154, 111, 31, 0.20);

  --geekui-hero-fade:        linear-gradient(180deg, rgba(245, 239, 226, 0.85) 0%, rgba(245, 239, 226, 0.96) 55%, rgba(245, 239, 226, 0.99) 100%);
  --geekui-hero-tint:        linear-gradient(110deg, rgba(154, 111, 31, 0.07) 0%, transparent 40%, rgba(245, 239, 226, 0.45) 100%);
  --geekui-hero-text-shadow: 0 0 12px rgba(255, 255, 255, 0.95), 0 0 2px rgba(255, 255, 255, 1);

  --geekui-tone-exceptional: #6e4f12;
  --geekui-tone-great:       #9a6f1f;
  --geekui-tone-good:        #1f9b4a;
  --geekui-tone-mixed:       #b88600;
  --geekui-tone-poor:        #c2253a;
  --geekui-tone-muted:       #8a8175;

  --reel-paper:              #1a1611;
  --reel-ink:                #f0e6d2;
  --reel-grain:              rgba(26, 22, 17, 0.03);

  --chroma-violet:           #6e4f12;
  --chroma-violet-2:         #9a6f1f;
  --chroma-grid:             rgba(26, 22, 17, 0.03);
}

/* =====================================================================
 * Movie loader — cinematic gold ring via ::after.
 *
 * Loader.jsx mounts <div class="geekfp-spinner"> with an inner React
 * Icons <RiLoader3Fill class="geekfp-spinner geekfp-rotating"/>. The
 * default teal RiLoader3Fill is hidden (opacity:0) and replaced by a
 * ::after gold ring that always renders — not gated by :empty, because
 * the React loader DOES inject the icon child.
 *
 * IMPORTANT: rules must NOT be scoped to `.geekui-container`. Loader
 * renders TWICE — firstLoad (lang.length===0 || isPending) at the app
 * root BEFORE <Movie>/.geekui-container mounts, and in-content (tab/
 * pagination) inside .geekui-container. A scoped selector misses
 * firstLoad and the raw teal icon leaks.
 * ===================================================================== */
.geekfp-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 200px;
  position: relative;
  color: var(--geekui-accent);
}
.geekfp-spinner .geekfp-rotating {
  opacity: 0 !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute !important;
}
.geekfp-spinner::after {
  content: '';
  width: 42px;
  height: 42px;
  border: 3px solid transparent;
  border-top-color: var(--geekui-accent);
  border-right-color: var(--geekui-accent-2);
  border-radius: 50%;
  box-shadow: 0 0 22px var(--geekui-accent-d, transparent);
  animation: geekui-cine-spin 0.9s linear infinite;
}
@keyframes geekui-cine-spin {
  to { transform: rotate(360deg); }
}
