/*
 * Meetem in daylight — the light variant of the M2 tokens (meetem-tokens.css).
 *
 * Opt-in only: it applies under <html data-mt-theme="light">, which the pre-paint script of
 * Meetem.Web's public layout and of the pre-join, waiting and room-unavailable pages sets. The call
 * screen (Join) never sets it: a live call is always on the dark stage. A first visit is light; a
 * visitor who chooses dark gets the original M2 look, unchanged.
 *
 * Only the SEMANTIC layer moves (surfaces, text, accent, states, lines, glass). Primitives stay as
 * they are, so a page or picture that names a primitive on purpose (the navy stage behind a video
 * tile, the art) is not repainted. Paper is a cool near-white; the accent becomes the deep teal of
 * the logo (teal-700), which carries white text and reads as text on paper.
 *
 * CONTRAST (WCAG 2.1 AA; checked by tests/js/theme-contrast.test.cjs):
 *   text   #0B1322 on page #F4F7FB ...... 17.3 : 1
 *   muted  #33455E on raised #EDF2F7 ....  8.7 : 1
 *   subtle #4A5B72 on raised ............  6.2 : 1
 *   accent / link #0A6971 on page .......  6.0 : 1   (white on it: 6.4 : 1)
 *   danger-text #B91C1C on raised .......  5.7 : 1
 * Field borders: border-strong #6B7D95 on page, 3.9 : 1.
 */
:root[data-mt-theme="light"] {
  color-scheme: light;

  --mt-page: #F4F7FB;
  --mt-surface: #FFFFFF;
  --mt-surface-raised: #EDF2F7;
  --mt-surface-hover: #E3EAF2;
  --mt-scrim: rgba(11, 19, 34, 0.45);
  --mt-border: #CBD5E1;
  --mt-border-strong: #6B7D95;
  --mt-text: #0B1322;
  --mt-text-muted: #33455E;
  --mt-text-subtle: #4A5B72;
  --mt-accent: #0A6971;
  --mt-accent-hover: #08575E;
  --mt-accent-soft: rgba(10, 105, 113, 0.10);
  --mt-on-accent: #FFFFFF;
  --mt-link: #0A6971;
  --mt-danger: #C81E1E;
  --mt-danger-hover: #A11818;
  --mt-on-danger: #FFFFFF;
  --mt-danger-text: #B91C1C;
  --mt-danger-soft: rgba(200, 30, 30, 0.08);
  --mt-warning-text: #92400E;
  --mt-warning-soft: rgba(146, 64, 14, 0.08);
  --mt-warning-solid: #92400E;
  --mt-success-text: #116329;
  --mt-success-soft: rgba(17, 99, 41, 0.08);
  --mt-success-solid: #15803D;
  --mt-focus: #1D2E4D;

  --mt-accent-strong: #075158;
  --mt-accent-text: #0A6971;
  --mt-hairline: rgba(11, 19, 34, 0.09);
  --mt-hairline-strong: rgba(11, 19, 34, 0.16);
  --mt-btn-hover: #D5DFEA;
  --mt-field-hover: #4A5B72;
  --mt-meter-bg: #DCE3EC;
  --mt-skeleton-a: #EDF2F7;
  --mt-skeleton-b: #DCE3EC;
  --mt-grip: #B8C4D4;
  --mt-glass: rgba(255, 255, 255, 0.74);
  --mt-glass-line: rgba(11, 19, 34, 0.08);
  --mt-glow: rgba(10, 105, 113, 0.10);
  --mt-glow-edge: rgba(10, 105, 113, 0.35);
  --mt-aurora-1: rgba(44, 191, 201, 0.20);
  --mt-aurora-2: rgba(61, 85, 126, 0.12);
  --mt-aurora-3: rgba(155, 229, 234, 0.30);
  --mt-dust: rgba(10, 105, 113, 0.42);
  --mt-dust-line: rgba(10, 105, 113, 0.10);

  /* Pre-join and the lobby: controls on paper. The video tile itself keeps its dark stage. */
  --mt-control-bg: #E3EAF2;
  --mt-control-hover: #D5DFEA;
  --mt-control-on: #0A6971;
  --mt-control-off: #C81E1E;
  --mt-bar-bg: rgba(255, 255, 255, 0.94);

  --mt-shadow-1: 0 1px 2px rgba(11, 19, 34, 0.08);
  --mt-shadow-2: 0 8px 24px rgba(11, 19, 34, 0.10);
  --mt-shadow-3: 0 20px 48px rgba(11, 19, 34, 0.14);
}

/* A part of a light page that stays on the night stage — a picture drawn on navy, the closing band,
   and the camera preview with its buttons (video is legible on the dark stage, by day too): the
   dark semantic layer again, inside it only. */
:root[data-mt-theme="light"] .mt-preview,
:root[data-mt-theme="light"] .mt-stay-dark {
  color-scheme: dark;
  --mt-page: var(--mt-navy-950);
  --mt-surface: var(--mt-navy-900);
  --mt-surface-raised: var(--mt-navy-800);
  --mt-surface-hover: var(--mt-navy-700);
  --mt-border: var(--mt-navy-600);
  --mt-border-strong: var(--mt-slate-500);
  --mt-text: var(--mt-slate-100);
  --mt-text-muted: var(--mt-slate-300);
  --mt-text-subtle: var(--mt-slate-400);
  --mt-accent: var(--mt-teal-400);
  --mt-accent-hover: var(--mt-teal-300);
  --mt-on-accent: var(--mt-navy-950);
  --mt-link: var(--mt-teal-300);
  --mt-focus: var(--mt-teal-200);
  --mt-accent-strong: var(--mt-teal-200);
  --mt-accent-text: var(--mt-teal-300);
  --mt-hairline: rgba(255, 255, 255, 0.08);
  --mt-hairline-strong: rgba(255, 255, 255, 0.16);
  --mt-control-bg: var(--mt-navy-700);
  --mt-control-hover: var(--mt-navy-600);
  --mt-control-on: var(--mt-teal-400);
  --mt-control-off: var(--mt-red-600);
  --mt-btn-hover: var(--mt-navy-600);
}
