/*
 * Design system do tema youplay: tokens.
 *
 * Única fonte de cores, tipografia, espaçamento, raios, sombras e camadas.
 * Nenhum outro arquivo deve usar cor literal; use as variáveis abaixo.
 *
 * Modo escuro: classe "dark" no <html> (aplicada pelo servidor e pelo toggle
 * em container.html). A cor da marca fica em --brand; --primary é neutro
 * (preto no claro, branco no escuro), no estilo shadcn/ui. Para botões
 * primários azuis, troque --primary por var(--brand) e --primary-foreground
 * por #fff.
 */

:root {
  color-scheme: light;

  /* Marca */
  --brand: #04abf2;
  --brand-foreground: #ffffff;
  --brand-text: #0284c7;          /* azul legível sobre fundo claro (links, ativo) */
  --brand-subtle: color-mix(in oklch, var(--brand) 12%, transparent);

  /* Superfícies (zinc) */
  --background: #ffffff;
  --surface: #ffffff;              /* fundo da página */
  --foreground: #09090b;
  --card: #ffffff;
  --card-foreground: #09090b;
  --popover: #ffffff;
  --popover-foreground: #09090b;
  --primary: #18181b;
  --primary-foreground: #fafafa;
  --secondary: #f4f4f5;
  --secondary-foreground: #18181b;
  --muted: #f4f4f5;
  --muted-foreground: #71717a;
  --accent: #f4f4f5;
  --accent-foreground: #18181b;
  --border: #e4e4e7;
  --input: #e4e4e7;
  --ring: var(--brand);
  --header: rgb(255 255 255 / 85%);
  --overlay: rgb(0 0 0 / 50%);
  --media-overlay: rgb(0 0 0 / 78%);  /* badges sobre thumbnails */

  /* Estados */
  --destructive: #dc2626;
  --destructive-foreground: #ffffff;
  --success: #16a34a;
  --success-foreground: #ffffff;
  --warning: #d97706;
  --warning-foreground: #ffffff;
  --info: var(--brand-text);
  --live: #e11d48;

  /* Tipografia */
  --font-sans: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --text-2xs: 11px;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-base: 14px;
  --text-md: 15px;
  --text-lg: 16px;
  --text-xl: 18px;
  --text-2xl: 20px;
  --text-3xl: 24px;
  --text-4xl: 30px;
  --leading-tight: 1.3;
  --leading-normal: 1.5;
  --leading-relaxed: 1.65;
  --tracking-tight: -0.015em;

  /* Espaçamento (grade de 4px) */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;

  /* Raios */
  --radius: 10px; /* px de propósito: o Bootstrap 3 fixa html{font-size:10px}, então rem sai menor que o esperado */
  --radius-sm: calc(var(--radius) - 4px);
  --radius-md: calc(var(--radius) - 2px);
  --radius-lg: var(--radius);
  --radius-xl: calc(var(--radius) + 4px);
  --radius-full: 9999px;

  /* Sombras */
  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.08), 0 1px 2px -1px rgb(0 0 0 / 0.08);
  --shadow-md: 0 4px 12px -2px rgb(0 0 0 / 0.08), 0 2px 4px -2px rgb(0 0 0 / 0.06);
  --shadow-lg: 0 12px 32px -8px rgb(0 0 0 / 0.16), 0 4px 8px -4px rgb(0 0 0 / 0.08);
  --focus-ring: 0 0 0 2px var(--background), 0 0 0 4px color-mix(in oklch, var(--ring) 70%, transparent);

  /* Movimento */
  --ease: cubic-bezier(.2, 0, 0, 1);
  --duration: .15s;

  /* Camadas */
  --z-base: 1;
  --z-raised: 10;
  --z-sticky: 100;
  --z-dropdown: 1000;
  --z-header: 1030;
  --z-drawer: 1040;
  --z-modal: 1050;
  --z-toast: 1100;

  /* Layout */
  --header-h: 56px;
  --bottom-nav-h: 60px;
  --content-max: 1680px;
  --card-min: 260px;  /* largura mínima de um card na grade de vídeos */

  /* Breakpoints (referência; media queries não aceitam var):
     sm 480 · md 768 · lg 1024 · xl 1280 · 2xl 1536 */
}

html.dark {
  color-scheme: dark;

  --brand-text: #38bdf8;
  --background: #09090b;
  --surface: #09090b;
  --foreground: #fafafa;
  --card: #131316;
  --card-foreground: #fafafa;
  --popover: #18181b;
  --popover-foreground: #fafafa;
  --primary: #fafafa;
  --primary-foreground: #18181b;
  --secondary: #27272a;
  --secondary-foreground: #fafafa;
  --muted: #1c1c1f;
  --muted-foreground: #a1a1aa;
  --accent: #27272a;
  --accent-foreground: #fafafa;
  --border: rgb(255 255 255 / 9%);
  --input: rgb(255 255 255 / 14%);
  --header: rgb(9 9 11 / 82%);
  --overlay: rgb(0 0 0 / 70%);

  --destructive: #f87171;
  --destructive-foreground: #18181b;
  --success: #4ade80;
  --success-foreground: #052e16;
  --warning: #fbbf24;
  --warning-foreground: #1c1917;

  --shadow-xs: 0 1px 2px 0 rgb(0 0 0 / 0.4);
  --shadow-sm: 0 1px 3px 0 rgb(0 0 0 / 0.5);
  --shadow-md: 0 8px 24px -6px rgb(0 0 0 / 0.6);
  --shadow-lg: 0 16px 40px -8px rgb(0 0 0 / 0.7);
}

@media (prefers-reduced-motion: reduce) {
  :root { --duration: 0s; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
