/* ════════════════════════════════════════════════════════════
   chrome-overrides.css
   Surgical fixes where the design's chrome interacts with
   sitewide chrome injected by nginx sub_filter (auth dialog,
   version popup, search overlay, chatbot, ticket widget).
   ════════════════════════════════════════════════════════════ */

/* The sitewide chatbot toggle and version-popup live in the
   bottom-right corner. Lift their z-index above our play bar
   so they remain accessible while audio is playing. */
#fcc-chatbot,
.fcc-version-popup,
.fcc-ticket-widget {
  z-index: 90 !important;
}

/* The Tweaks panel must NOT collide with the bottom-right chrome
   cluster — anchor it bottom-LEFT instead. */
.media-tweaks {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 85;
  width: 280px;
  max-height: calc(100vh - 120px);
  background: var(--paper, #f4efe7);
  color: var(--ink, #11100e);
  border: 1px solid var(--rule, #11100e);
  font-family: var(--mono, ui-monospace, monospace);
  font-size: 12px;
  overflow: hidden;
  display: none;
  flex-direction: column;
}
.media-tweaks.is-open { display: flex; }
body.has-playbar .media-tweaks { bottom: 80px; }

.media-tweaks__head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 12px;
  border-bottom: 1px solid var(--rule, #11100e);
  font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
}
.media-tweaks__head b { font-weight: 700; }
.media-tweaks__close {
  background: none; border: 0; cursor: pointer;
  font-family: inherit; color: var(--dim, #6b6863);
  padding: 4px 6px;
}
.media-tweaks__close:hover { color: var(--ink, #11100e); }

.media-tweaks__body {
  padding: 10px 12px 14px;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
}
.media-tweaks__sect {
  font-size: 9.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--dim, #6b6863);
  padding-top: 4px;
}
.media-tweaks__row {
  display: flex; flex-direction: column; gap: 4px;
}
.media-tweaks__row__lbl {
  display: flex; justify-content: space-between;
  font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase;
}
.media-tweaks__row__lbl span:last-child { color: var(--dim, #6b6863); }
.media-tweaks__seg {
  display: flex; border: 1px solid var(--rule, #11100e);
}
.media-tweaks__seg button {
  flex: 1; padding: 5px 4px;
  background: transparent; border: 0; cursor: pointer;
  font-family: inherit; font-size: 10.5px;
  text-transform: lowercase; color: var(--ink, #11100e);
  border-right: 1px solid var(--rule, #11100e);
}
.media-tweaks__seg button:last-child { border-right: 0; }
.media-tweaks__seg button[aria-pressed="true"] {
  background: var(--ink, #11100e);
  color: var(--bg, #ece7df);
}
.media-tweaks__toggle {
  display: flex; justify-content: space-between; align-items: center;
}
.media-tweaks__toggle button {
  position: relative; width: 32px; height: 18px;
  background: var(--hairline, rgba(17,16,14,.18));
  border: 0; cursor: pointer;
  transition: background .15s;
}
.media-tweaks__toggle button[aria-pressed="true"] { background: var(--accent, #ff3b1f); }
.media-tweaks__toggle button i {
  position: absolute; top: 2px; left: 2px;
  width: 14px; height: 14px;
  background: #fff;
  transition: transform .15s;
}
.media-tweaks__toggle button[aria-pressed="true"] i { transform: translateX(14px); }

/* The site-header (sitewide) sits on top of the media-app. The
   media-app's own .topbar is sticky; we don't want them stacked.
   We render the design's header markup INSIDE .media-app, so
   the sitewide site-header stays put and the design's strip
   sits below it. */
body[data-app="media"] .site-header {
  position: relative;
  z-index: 60;
}

/* Hide ticker when Tweaks panel toggles it off */
body.media-ticker-off .media-app .tickerstrip { display: none; }

/* ─── Meta-bar takeover ────────────────────────────────────────
   On /media/, the global 6-swatch theme picker is replaced by the
   media-app's own 4-theme picker (bone/ink/acid/pirate) plus a
   "tweaks" button. This is the ONLY way to open the Tweaks panel —
   no floating toggle. */

/* Belt-and-braces: keep fcc-editorial.js's relocator from re-injecting
   the global theme widget into our slot. We replace the slot's
   children in JS, but the relocator runs on every nav mutation. */
body[data-app="media"] .fcc-meta-bar [data-fcc-slot="theme"] .fcc-econav-desktop-themes,
body[data-app="media"] .topbar-content > .fcc-econav-desktop-themes {
  display: none !important;
}

.media-meta-tweaks {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}
.media-meta-tweaks__label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: oklch(0.62 0.008 85);
}
.media-meta-tweaks__chips {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.media-theme-chip {
  width: 12px;
  height: 12px;
  padding: 0;
  border: 1px solid oklch(0.62 0.008 85);
  border-radius: 50%;
  cursor: pointer;
  background: #ece7df;
}
.media-theme-chip.media-theme-bone   { background: #ece7df; }
.media-theme-chip.media-theme-ink    { background: #0a0a09; }
.media-theme-chip.media-theme-acid   { background: #d8ff2a; }
.media-theme-chip.media-theme-pirate { background: #ff7a3a; }
.media-theme-chip[aria-pressed="true"] {
  outline: 2px solid oklch(0.92 0.008 85);
  outline-offset: 1px;
}
.media-meta-tweaks__btn {
  font: 600 10px/1.4 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: oklch(0.77 0.008 85);
  background: transparent;
  border: 1px solid oklch(0.62 0.008 85);
  padding: 3px 8px;
  border-radius: 3px;
  cursor: pointer;
}
.media-meta-tweaks__btn:hover,
.media-meta-tweaks__btn.is-on {
  color: oklch(0.16 0.012 260);
  background: oklch(0.92 0.008 85);
}
