/* Ojasys TMS - Launch Reel player (site-embedded copy).
 *
 * DIVERGES DELIBERATELY from reel-production/player/player.css. Keep this when
 * re-syncing:
 *
 * 1. Only the player itself is styled here. The copy beside it - eyebrow,
 *    heading, lead, feature list, CTA - uses the site's own components
 *    (.ojasys-eyebrow, h2, .lead, .feature-list, .btn-ojasys-primary) so the
 *    section reads as part of the page rather than as an embedded widget. The
 *    canonical file's parallel rules for those are deleted here.
 *
 * 2. Every selector is scoped under `.ojasys-reel-section`. The canonical file
 *    uses bare class selectors, and `.ojasys-eyebrow` is also a site class used
 *    eight times on the home page; unscoped, this file loads after
 *    ojasys-brand.css and silently restyled every one of them.
 *
 * 3. The palette is the site's own tokens, so the player follows the light/dark
 *    switch. Each var() keeps the reel's original dark value as a fallback.
 *
 * What stays dark in both themes is anything painted ON the video - the caption
 * bar, the play scrim, the video stage - because it sits over video frames.
 */

.ojasys-reel-section {
  /* site tokens, with the reel's original dark values as fallbacks */
  --ojasys-bg: var(--surface-3, #081526);
  --ojasys-card: var(--surface-card, #132b47);
  --ojasys-border: var(--line, rgba(125, 211, 252, 0.24));
  --ojasys-primary: var(--accent, #0d6efd);
  --ojasys-wash: var(--accent-wash, rgba(255, 255, 255, 0.08));
  --ojasys-text: var(--ink, #f8fafc);
  --ojasys-muted: var(--ink-2, #94a3b8);
  --ojasys-focus: var(--accent-hot, #fde047);

  /* the site font for Latin, then Nirmala UI - neither Barlow nor Source Sans 3
     carries Devanagari, Tamil, Telugu, Gujarati, Bengali or Gurmukhi */
  font-family: var(--font-body), "Nirmala UI", sans-serif;
  color: var(--ojasys-text);

  /* the stage is 9:16; without a cap it would tower in a half-width column */
  max-width: 420px;
  margin-inline: auto;
}

.ojasys-reel-section,
.ojasys-reel-section *,
.ojasys-reel-section *::before,
.ojasys-reel-section *::after {
  box-sizing: border-box;
}

/* Language Selector OUTSIDE the video */
.ojasys-reel-section .ojasys-lang-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.45rem;
  margin-bottom: 0.85rem;
  padding: 0.55rem 0.7rem;
  background: var(--ojasys-bg);
  border-radius: 0.85rem;
  border: 1px solid var(--ojasys-border);
}

.ojasys-reel-section .ojasys-lang-label {
  font-size: 0.78rem;
  color: var(--ojasys-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ojasys-reel-section .ojasys-lang-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  width: 100%;
}

.ojasys-reel-section .ojasys-lang-btn {
  appearance: none;
  background: transparent;
  color: var(--ojasys-muted);
  border: 1px solid var(--ojasys-border);
  padding: 0.32rem 0.65rem;
  border-radius: 0.5rem;
  font-family: "Segoe UI", "Nirmala UI", sans-serif;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
}

.ojasys-reel-section .ojasys-lang-btn:hover {
  color: var(--ojasys-text);
  background: var(--ojasys-wash);
}

.ojasys-reel-section .ojasys-lang-btn[aria-pressed="true"] {
  /* the site's own primary-button treatment: .btn-ojasys-primary is
     background var(--accent) with #FFFFFF text */
  background: var(--ojasys-primary);
  color: #ffffff;
  border-color: var(--ojasys-primary);
}

.ojasys-reel-section .ojasys-lang-btn:focus-visible,
.ojasys-reel-section .ojasys-ctrl-btn:focus-visible,
.ojasys-reel-section .ojasys-big-play:focus-visible,
.ojasys-reel-section .ojasys-seek:focus-visible {
  outline: 3px solid var(--ojasys-focus);
  outline-offset: 2px;
}

/* 9:16 Viewport Container */
.ojasys-reel-section .ojasys-video-stage {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  background: #050d18;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--ojasys-border);
}

.ojasys-reel-section .ojasys-video-el {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

/* Custom Accessible Overlay Caption Bar (synced with WebVTT cues) */
.ojasys-reel-section .ojasys-caption-overlay {
  position: absolute;
  left: 6%;
  right: 6%;
  bottom: 11%;
  background: rgba(7, 16, 30, 0.88);
  border: 1px solid rgba(125, 211, 252, 0.45);
  color: #ffffff;
  padding: 0.55rem 0.8rem;
  border-radius: 0.75rem;
  text-align: center;
  font-family: "Segoe UI", "Nirmala UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.ojasys-reel-section .ojasys-caption-overlay[hidden] {
  display: none;
}

/* Center Big Play Button (never assumes audible autoplay) */
.ojasys-reel-section .ojasys-big-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(6, 15, 28, 0.42);
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  color: #ffffff;
  cursor: pointer;
  transition: background 0.2s ease, opacity 0.2s ease;
}

.ojasys-reel-section .ojasys-big-play:hover {
  background: rgba(6, 15, 28, 0.28);
}

.ojasys-reel-section .ojasys-big-play.is-hidden {
  opacity: 0;
  pointer-events: none;
}

.ojasys-reel-section .ojasys-big-play-circle {
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--ojasys-primary);
  border: 3px solid var(--ojasys-primary-hot);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  font-size: 1.75rem;
}

.ojasys-reel-section .ojasys-big-play-label {
  background: rgba(8, 21, 38, 0.88);
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Friendly Error / Fallback Banner */
.ojasys-reel-section .ojasys-alert-banner {
  margin-top: 0.65rem;
  padding: 0.55rem 0.75rem;
  border-radius: 0.6rem;
  background: var(--warn-wash, rgba(245, 158, 11, 0.18));
  border: 1px solid var(--warn, rgba(251, 191, 36, 0.5));
  color: var(--warn, #fde68a);
  font-size: 0.82rem;
}

/* Controls Bar below video */
.ojasys-reel-section .ojasys-controls-bar {
  margin-top: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.ojasys-reel-section .ojasys-seek-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.ojasys-reel-section .ojasys-seek {
  flex: 1;
  accent-color: var(--ojasys-primary);
  cursor: pointer;
}

.ojasys-reel-section .ojasys-time {
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  color: var(--ojasys-muted);
  min-width: 74px;
  text-align: right;
}

.ojasys-reel-section .ojasys-btn-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
}

.ojasys-reel-section .ojasys-ctrl-group {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.ojasys-reel-section .ojasys-ctrl-btn {
  background: transparent;
  color: var(--ojasys-text);
  border: 1px solid var(--ojasys-border);
  border-radius: 0.5rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
}

.ojasys-reel-section .ojasys-ctrl-btn:hover {
  background: var(--ojasys-wash);
}

.ojasys-reel-section .ojasys-ctrl-btn[aria-pressed="true"] {
  background: var(--ojasys-wash);
  border-color: var(--ojasys-primary);
}

.ojasys-reel-section .sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
