/* Re-skins the reading pages (player/browse/studio/watch/chaburah) with
   Cloud Chaburah's own editorial-blue palette (see chaburah.css's --cc-*
   tokens, the actual source of truth these values are drawn from) on top
   of the same dark-themed functional structure styles.css defines for the
   rest of the site (home page, sidebar, admin chrome) -- loaded after
   styles.css so these overrides win.

   styles.css is heavily driven by CSS custom properties, so redefining
   :root here recolors most of the page for free; the rest of this file is
   the handful of components that hardcode a literal rgba(255,255,255,...)
   or rgba(0,0,0,...) wash tuned for a dark background, which need their own
   light-mode equivalents rather than just following the variables.

   --card/--card-strong stay pure white against a cool --bg (rather than
   several near-white shades) so a card's background still reads as subtly
   distinct from the page behind it without needing its own border/shadow --
   which is also why .player-card/.daf-card below drop those entirely.

   --highlight/--highlight-text are deliberately NOT pulled from --cc-primary
   the way --accent is: the Vilna page draws two DIFFERENT highlight colors
   at once (the blue "now playing" sync rect and the gold "select text"
   selection rect, see .vilna-active-rect/.vilna-select-text-selection-rect
   in styles.css) specifically so a reader can tell them apart on sight.
   --highlight keeps the gold family here, matching chaburah.css's own
   reserved --cc-source-accent rather than the old independently-chosen
   gold -- still "Chaburah's colors," just its secondary accent rather than
   its primary one. */

:root {
  --bg: #f4f7fb;
  --bg-soft: #eef3f9;
  --card: #ffffff;
  --card-strong: #ffffff;
  --line: #d9e1eb;
  --line-strong: #c3cedc;
  --text: #132238;
  --muted: #65748a;
  --accent: #2f6ea5;
  --accent-soft: rgba(47, 110, 165, 0.14);
  --accent-strong: #255d8d;
  --blue: #2f6ea5;
  --highlight: #f4d68f;
  --highlight-text: #2d240f;
  --danger: #aa4238;
  --shadow: 0 18px 48px rgba(29, 57, 88, 0.12);
  --radius: 20px;
}

html { color-scheme: light; }
body { background: var(--bg); }

.card { backdrop-filter: none; border: 1px solid var(--line); }
/* The video player and the daf page specifically -- not every .card on
   these pages (the setup-strip, dialogs, etc. keep their own outline) --
   per a real request to drop their box chrome so they read as open panels
   on the white page rather than two bordered cards sitting on it. Still
   two separate side-by-side areas (the shared workspace/watch-layout grid
   and its gap are untouched), just without a visible line or shadow
   marking each one's edge. */
.player-card, .daf-card { border: 0; box-shadow: none; border-radius: 0; }

#lectureTitle, .brand-name, .daf-heading h2 {
  font-family: Georgia, "Times New Roman", serif;
}

.status-pill { background: rgba(23, 33, 43, 0.03); }

.button.primary { color: #fff; background: linear-gradient(135deg, #3d82b8, #255d8d); box-shadow: 0 10px 24px rgba(37, 93, 141, 0.28); }
.button.primary:hover { background: linear-gradient(135deg, #4a90c9, #2f6ea5); }
.button.secondary { background: rgba(23, 33, 43, 0.03); }
.button.secondary:hover, .button.ghost:hover { background: rgba(23, 33, 43, 0.07); }
.button { border-radius: 999px; }
.button.small { border-radius: 999px; }

.overlay-mode-label select { background: #fff; color: var(--text); }

.icon-button, .play-button { background: rgba(23, 33, 43, 0.04); }
.play-button { background: linear-gradient(145deg, #3d82b8, #2f6ea5); color: #fff; }
.large-play { border: 1px solid rgba(255, 255, 255, 0.4); background: rgba(23, 38, 61, 0.55); }
.large-play:hover { background: linear-gradient(145deg, #3d82b8, #2f6ea5); color: #fff; }

.view-switch { background: rgba(23, 33, 43, 0.05); }
.view-switch button.active { background: #fff; color: var(--text); box-shadow: 0 2px 8px rgba(29, 57, 88, 0.1); }

.toggle { background: rgba(23, 33, 43, 0.14); }

.video-source-badge { border: 1px solid rgba(255, 255, 255, 0.25); background: rgba(12, 38, 61, 0.72); color: #f4f7fb; }

dialog { background: var(--card); box-shadow: 0 30px 90px rgba(29, 57, 88, 0.28); }
.dialog-note { background: rgba(23, 33, 43, 0.03); }
/* The daf's own right-click/long-press menu, for exactly the reason the
   dialog rule above exists: styles.css paints it navy for the dark home
   page, but its labels are var(--text) -- which is dark ink here -- so
   without this it renders as unreadable dark-on-dark on every page that
   actually has a daf to right-click. */
.daf-context-menu { background: var(--card); box-shadow: 0 22px 54px rgba(29, 57, 88, 0.28); }
.daf-context-item:hover:not(:disabled) { background: rgba(23, 33, 43, 0.06); }
/* Every text-entry field on these pages (note/reply composer, search,
   auth, the various sync-dialog URL fields) still carries styles.css's
   own literal rgba(4,14,27,.7) -- a wash tuned for that file's dark base
   theme -- since none of them are driven by the --card/--text variables
   this file already recolors everything else through. Matched by the
   same id/class selectors styles.css uses so this genuinely overrides
   them (a bare `input, textarea` rule would lose to those id selectors on
   specificity regardless of load order). */
#noteBodyInput, .reply-body-input, #searchNotesInput,
#videoUrl, #syncDriveUrlInput, #syncYoutubeUrlInput, #syncVoiceUrlInput,
#authEmail, #authPassword {
  background: rgba(23, 33, 43, 0.03);
}
.toast { background: var(--navy, #132238); }

.source-tabs, .sync-tabs { background: rgba(23, 33, 43, 0.05); }
.source-tab.active, .sync-tab.active { background: #fff; box-shadow: 0 2px 8px rgba(29, 57, 88, 0.1); }

.amud-option, .shiur-variant-option, .language-option { background: rgba(23, 33, 43, 0.04); }
.amud-option.active, .shiur-variant-option.active, .language-option.active { color: #fff; }

kbd { color: #17302d; background: rgba(23, 33, 43, 0.08); border: 1px solid rgba(23, 33, 43, 0.15); box-shadow: 0 1px 0 rgba(255, 255, 255, 0.6) inset; }

.account-dropdown-item:hover { background: rgba(23, 33, 43, 0.05); }
.favorite-item { background: rgba(23, 33, 43, 0.02); }
.favorite-item:hover { background: rgba(23, 33, 43, 0.06); }

.admin-badge { color: #fff; }

.now-learning { border-color: var(--line); background: linear-gradient(135deg, rgba(47, 110, 165, .1), rgba(19, 34, 56, .04)); }
