/* ── Login overlay ──────────────────────────────────────────── */
.login-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 28, 43, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: cw-fade-in 0.2s ease-out;
}
.login-overlay--fading { opacity: 0; transition: opacity 0.22s ease-out; }
@keyframes cw-fade-in { from { opacity: 0; } to { opacity: 1; } }

.login-overlay__close {
  position: absolute;
  top: 18px; right: 18px;
  width: 40px; height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s;
}
.login-overlay__close:hover { background: rgba(255, 255, 255, 0.18); }

.login-card {
  width: min(460px, 100%);
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 30px 30px 26px;
  animation: cw-card-in 0.26s var(--ease-out);
}
@keyframes cw-card-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: none; }
}
.login-card__brand { display: flex; flex-direction: column; align-items: center; margin-bottom: 20px; text-align: center; }
.login-card__logo { height: 30px; width: auto; margin-bottom: 12px; }
.login-card__title {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 700;
  color: var(--navy);
}
.login-card__sub { margin: 3px 0 0; font-size: 13.5px; color: var(--muted); }

.login-forgot { margin-top: 6px; text-align: right; }
.login-forgot a,
.login-link {
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-decoration: none;
}
.login-forgot a:hover,
.login-link:hover { text-decoration: underline; }
/* "Forgot password?" is a button (opens the on-site reset view) styled as a link. */
.login-link {
  background: none;
  border: none;
  padding: 0;
  font-family: var(--font-body);
  cursor: pointer;
}
.login-forgot-intro {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}
.login-terms {
  margin: 14px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
.login-terms a { color: var(--blue); font-weight: 600; text-decoration: none; }
.login-terms a:hover { text-decoration: underline; }
.login-signup {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
  text-align: center;
}
.login-signup a { color: var(--blue); font-weight: 600; text-decoration: none; }
.login-signup a:hover { text-decoration: underline; }

.login-error {
  margin-top: 14px;
  padding: 10px 12px;
  background: var(--err-soft);
  border: 1px solid rgba(192, 57, 43, 0.3);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--err);
  text-align: center;
}
/* Success/confirmation variant — used by the on-site password-reset flow. */
.login-error--ok {
  background: var(--ok-soft);
  border-color: rgba(30, 123, 52, 0.3);
  color: var(--ok);
}
.login-alt { margin-top: 18px; text-align: center; }
.login-alt__toggle {
  background: none;
  border: none;
  padding: 2px 4px;
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  cursor: pointer;
}
.login-alt__toggle:hover { color: var(--blue-dark); }
/* API-key + forgot views replace the credentials form (mutually exclusive), so no
   dashed separator is needed — it would otherwise show as a stray line at the top. */
.login-apikey { margin-top: 16px; }

/* ── Caption player drawer ──────────────────────────────────── */
.e2e-player-drawer { position: fixed; inset: 0; z-index: var(--z-drawer); pointer-events: none; }
.e2e-player-drawer__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2, 28, 43, 0.55);
  opacity: 0;
  transition: opacity 0.24s ease-out;
}
.e2e-player-drawer__panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(960px, calc(100% - 48px));
  background: var(--bg);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  transform: translateX(102%);
  transition: transform 0.28s var(--ease-out);
  border-radius: var(--radius-lg) 0 0 var(--radius-lg);
  overflow: hidden;
}
.e2e-player-drawer.is-open { pointer-events: auto; }
.e2e-player-drawer.is-open .e2e-player-drawer__backdrop { opacity: 1; }
.e2e-player-drawer.is-open .e2e-player-drawer__panel { transform: none; }
.e2e-player-drawer[aria-hidden="true"] { visibility: hidden; transition: visibility 0s 0.3s; }
.e2e-player-drawer.is-open[aria-hidden="false"] { visibility: visible; }

.e2e-player-drawer__head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--navy);
  flex-shrink: 0;
  min-width: 0;
}
.e2e-player-drawer__title-row { display: flex; align-items: center; gap: 9px; flex-shrink: 0; }
.e2e-player-drawer__title-icon { color: var(--orange); display: inline-flex; }
.e2e-player-drawer__title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}
.e2e-player-drawer__newtab,
.e2e-player-drawer__close {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: var(--radius-sm);
  color: #fff;
  padding: 7px;
  cursor: pointer;
  display: inline-flex;
  flex-shrink: 0;
  transition: background 0.15s;
}
.e2e-player-drawer__newtab:hover,
.e2e-player-drawer__close:hover { background: rgba(255, 255, 255, 0.18); }

.e2e-player-drawer__body-stack {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 16px 18px 18px;
}
.e2e-player-drawer__body-live { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* Language tabs in the drawer head */
.caption-tab-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: thin;
  min-width: 0;
}
.caption-tab {
  flex-shrink: 0;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.85);
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  padding: 6px 13px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s, color 0.15s;
}
.caption-tab:hover { background: rgba(255, 255, 255, 0.16); }
.caption-tab.active { background: var(--orange); border-color: var(--orange); color: #fff; }
.caption-tab-reload {
  flex-shrink: 0;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.6);
  font-size: 15px;
  padding: 4px 7px;
  cursor: pointer;
  border-radius: var(--radius-sm);
}
.caption-tab-reload:hover { color: #fff; background: rgba(255, 255, 255, 0.12); }

/* The video area itself stays dark — it is a stage */
.cw-player-stage {
  flex: 1;
  min-height: 0;
  background: #06141d;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}
.cw-player-stage iframe { width: 100%; height: 100%; border: 0; display: block; }
.cw-player-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: rgba(255, 255, 255, 0.75);
  padding: 24px;
}
.cw-player-empty__inner { max-width: 380px; }
.cw-player-empty__icon { opacity: 0.45; margin-bottom: 10px; }
.cw-player-empty__title { font-size: 14.5px; font-weight: 600; color: #fff; margin: 0 0 4px; }
.cw-player-empty__text { font-size: 13px; color: rgba(255, 255, 255, 0.65); margin: 0; }
.cw-player-empty__state { font-size: 11px; color: rgba(255, 255, 255, 0.4); margin-top: 10px; font-family: var(--font-mono); }

/* ── Stream choice modal (components.js markup) ─────────────── */
.stream-choice-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2, 28, 43, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: var(--z-modal);
  padding: 20px;
  animation: cw-fade-in 0.2s ease-out;
}
.stream-choice-modal__panel {
  width: min(540px, 100%);
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  animation: cw-card-in 0.26s var(--ease-out);
}
.stream-choice-modal__header { padding: 20px 22px 0; }
.stream-choice-modal__header-inner { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.stream-choice-modal__header-title-row { display: flex; gap: 12px; align-items: flex-start; }
.stream-choice-modal__icon-wrap {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: rgba(244, 130, 32, 0.12);
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stream-choice-modal__icon { width: 20px; height: 20px; }
.stream-choice-modal__title { font-size: 18px; }
.stream-choice-modal__subtitle { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.stream-choice-modal__close {
  background: none;
  border: none;
  color: var(--faint);
  padding: 4px;
  cursor: pointer;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
}
.stream-choice-modal__close:hover { color: var(--ink); background: var(--bg-soft); }
.stream-choice-modal__close svg { width: 22px; height: 22px; display: block; }
.stream-choice-modal__body { padding: 16px 22px 22px; display: flex; flex-direction: column; gap: 12px; }

.stream-choice-card {
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.stream-choice-card:hover { border-color: var(--blue); box-shadow: var(--shadow-sm); }
.stream-choice-card__layout { display: flex; gap: 14px; align-items: flex-start; justify-content: space-between; }
.stream-choice-card__content { min-width: 0; flex: 1; }
.stream-choice-card__title-row { display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }
.stream-choice-card__glyph { width: 17px; height: 17px; flex-shrink: 0; }
.stream-choice-card__glyph--reopen { color: var(--blue); }
.stream-choice-card__glyph--create { color: var(--orange); }
.stream-choice-card__glyph--manual { color: var(--muted); }
.stream-choice-card__title { font-size: 15px; color: var(--ink); }
.stream-choice-card__desc { margin: 0 0 8px; font-size: 13.5px; color: var(--muted); }
.stream-choice-card__meta { margin: 0; display: grid; gap: 3px; }
.stream-choice-card__meta-row { display: flex; gap: 8px; align-items: baseline; font-size: 12.5px; }
.stream-choice-card__meta-row dt { color: var(--muted); min-width: 86px; }
.stream-choice-card__meta-row dd { margin: 0; min-width: 0; }
.stream-choice-card__pill {
  font-family: var(--font-mono);
  font-size: 11.5px;
  background: var(--bg-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 7px;
  color: var(--navy);
}
.stream-choice-card__muted { color: var(--muted); font-size: 12.5px; }
.stream-choice-card__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.stream-choice-card__tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ok);
  background: var(--ok-soft);
  border: 1px solid rgba(30, 123, 52, 0.25);
  border-radius: 999px;
  padding: 2px 9px;
}
.stream-choice-card__tag--off { opacity: 0.45; text-decoration: line-through; }

.stream-choice-modal__btn {
  flex-shrink: 0;
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius);
  border: 1px solid transparent;
  padding: 8px 16px;
  cursor: pointer;
  color: #fff;
  transition: filter 0.15s;
}
.stream-choice-modal__btn:hover { filter: brightness(0.94); }
.stream-choice-modal__btn--reopen { background: var(--blue); }
.stream-choice-modal__btn--create { background: var(--orange); }
.stream-choice-modal__btn--manual { background: none; color: var(--blue); border-color: var(--blue); }
.stream-choice-modal__btn--manual:hover { background: var(--blue); color: #fff; filter: none; }

/* Generic light modal (VOD-unavailable) */
.cw-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 28, 43, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  animation: cw-fade-in 0.2s ease-out;
}
.cw-modal {
  width: min(440px, 100%);
  background: var(--bg);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  animation: cw-card-in 0.26s var(--ease-out);
}
.cw-modal__title-row { display: flex; gap: 12px; align-items: flex-start; margin-bottom: 10px; }
.cw-modal__icon {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--warn-soft);
  color: var(--warn);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.cw-modal__icon svg { width: 19px; height: 19px; }
.cw-modal__title { font-size: 17px; }
.cw-modal__sub { margin: 2px 0 0; font-size: 13.5px; color: var(--muted); }
.cw-modal__body { font-size: 14px; color: var(--ink); }
.cw-modal__body p { margin: 0 0 8px; }
.cw-modal__note {
  margin-top: 10px;
  padding: 10px 12px;
  background: rgba(15, 141, 200, 0.08);
  border: 1px solid rgba(15, 141, 200, 0.25);
  border-radius: var(--radius);
  font-size: 13px;
  color: var(--blue-dark);
}
.cw-modal__actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }
.cw-modal__actions .cw-btn { flex: 1; min-width: 150px; }

/* ── Toasts ─────────────────────────────────────────────────── */
.app-notify-stack {
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: var(--z-toast);
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(360px, calc(100vw - 32px));
  pointer-events: none;
}
.app-toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 11px 12px 11px 16px;
  position: relative;
  overflow: hidden;
}
.app-toast::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--blue);
}
.app-toast--success::before { background: var(--ok); }
.app-toast--error::before { background: var(--err); }
.app-toast--warning::before { background: var(--warn); }
.app-toast__text { flex: 1; min-width: 0; }
.app-toast__title { font-size: 13.5px; font-weight: 700; color: var(--ink); }
.app-toast__body { font-size: 13px; color: var(--muted); margin-top: 1px; overflow-wrap: break-word; }
.app-toast__dismiss {
  background: none;
  border: none;
  padding: 3px;
  margin: 0;
  color: var(--faint);
  cursor: pointer;
  border-radius: 4px;
  flex-shrink: 0;
}
.app-toast__dismiss:hover { color: var(--ink); background: var(--bg-soft); }
.app-toast__dismiss-icon { width: 13px; height: 13px; }
.notification-enter { animation: cw-toast-in 0.24s var(--ease-out); }
.notification-exit { opacity: 0; transform: translateX(12px); transition: opacity 0.2s, transform 0.2s; }
@keyframes cw-toast-in {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: none; }
}

/* ── Footer (orange, brand standard) ────────────────────────── */
.app-footer {
  background: var(--orange);
  padding: 16px 24px;
  margin-top: 40px;
}
.app-footer-inner {
  max-width: var(--journey-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 13px;
  color: #fff;
}
.app-footer-inner a { color: #fff; text-decoration: none; font-weight: 600; }
.app-footer-inner a:hover { text-decoration: underline; }
.page-version {
  display: flex;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  letter-spacing: 0.02em;
}

