/* ==========================================================================
   COE FRAMEWORK — DOCUMENTATION PORTAL DESIGN TOKENS
   Unificado com coe_ui (FiveM Enhanced), @matz/ui e web/website.
   Suporte aos 5 temas oficiais: moss (padrão), ocean, amber, rose, violet.
   ========================================================================== */

:root,
:root[data-coe-theme="moss"] {
  /* Tipografia Oficial COE */
  --coe-font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --coe-font-heading: "Chakra Petch", "Plus Jakarta Sans", "Inter", sans-serif;
  --coe-font-mono: "JetBrains Mono", "Consolas", "Courier New", monospace;

  /* Paleta Base: Moss (Padrão) */
  --coe-page: #07090E;
  --coe-sidebar: #0B0E16;
  --coe-panel: #0F131C;
  --coe-panel-raised: #151B26;
  --coe-surface: rgba(15, 19, 28, 0.82);
  --coe-chrome: rgba(11, 14, 22, 0.92);
  --coe-text: #e7eee9;
  --coe-muted: #8d9b92;
  --coe-subtle: #637168;
  --coe-accent: #c4df9b;
  --coe-accent-rgb: 196, 223, 155;
  --coe-page-rgb: 7, 9, 14;
  --coe-panel-rgb: 15, 19, 28;
  --coe-ink-rgb: 219, 232, 223;

  --coe-danger: #e39b8b;
  --coe-danger-rgb: 227, 155, 139;
  --coe-success: #a9d3ae;
  --coe-success-rgb: 169, 211, 174;
  --coe-warning: #e6b65c;
  --coe-warning-rgb: 230, 182, 92;
  --coe-info: #79c0ff;
  --coe-info-rgb: 121, 192, 255;

  --coe-line: rgba(var(--coe-ink-rgb), 0.09);
  --coe-line-strong: rgba(var(--coe-ink-rgb), 0.18);
  --coe-accent-soft: rgba(var(--coe-accent-rgb), 0.12);
  --coe-accent-glow: rgba(var(--coe-accent-rgb), 0.28);
  --coe-danger-soft: rgba(var(--coe-danger-rgb), 0.12);
  --coe-overlay: rgba(7, 9, 14, 0.82);
  --coe-on-accent: #07090E;

  /* Swatches fixos do seletor de temas */
  --coe-swatch-moss: #c4df9b;
  --coe-swatch-ocean: #8db6d8;
  --coe-swatch-amber: #e6b65c;
  --coe-swatch-rose: #d98aa5;
  --coe-swatch-violet: #b6a3f0;

  /* Mapeamento Semântico do Portal de Documentação */
  --bg-primary: var(--coe-page);
  --bg-secondary: var(--coe-sidebar);
  --bg-tertiary: var(--coe-panel);
  --bg-elevated: var(--coe-panel-raised);
  --bg-hover: rgba(var(--coe-ink-rgb), 0.05);
  --bg-active: var(--coe-accent-soft);

  --text-primary: var(--coe-text);
  --text-secondary: var(--coe-muted);
  --text-muted: var(--coe-subtle);
  --text-link: var(--coe-accent);

  --border-color: var(--coe-line);
  --border-strong: var(--coe-line-strong);
  --border-subtle: rgba(var(--coe-ink-rgb), 0.05);

  --brand-primary: var(--coe-accent);
  --brand-secondary: var(--coe-success);
  --brand-light: var(--coe-accent-soft);

  --accent-green: var(--coe-success);
  --accent-blue: #8db6d8;
  --accent-yellow: var(--coe-warning);
  --accent-red: var(--coe-danger);
  --accent-purple: #b6a3f0;

  /* Dimensões e Geometria */
  --header-height: 64px;
  --sidebar-left-width: 296px;
  --sidebar-right-width: 248px;
  --max-content-width: 960px;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --coe-chamfer: 10px;

  --shadow-sm: 0 2px 6px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.48);
  --shadow-lg: 0 18px 44px rgba(0, 0, 0, 0.65);

  --font-sans: var(--coe-font-sans);
  --font-heading: var(--coe-font-heading);
  --font-mono: var(--coe-font-mono);
}

/* Tema: Ocean */
:root[data-coe-theme="ocean"] {
  --coe-page: #080d14;
  --coe-sidebar: #0c131d;
  --coe-panel: #111a27;
  --coe-panel-raised: #172334;
  --coe-text: #e6edf5;
  --coe-muted: #8b9bb0;
  --coe-subtle: #5f7088;
  --coe-accent: #8db6d8;
  --coe-accent-rgb: 141, 182, 216;
  --coe-panel-rgb: 17, 26, 39;
  --coe-ink-rgb: 219, 230, 240;
  --coe-overlay: rgba(5, 8, 12, 0.84);
  --coe-accent-soft: rgba(141, 182, 216, 0.14);
  --coe-accent-glow: rgba(141, 182, 216, 0.3);
}

/* Tema: Amber */
:root[data-coe-theme="amber"] {
  --coe-page: #0f0d09;
  --coe-sidebar: #15120c;
  --coe-panel: #1c1710;
  --coe-panel-raised: #241e15;
  --coe-text: #f0ebe1;
  --coe-muted: #a09784;
  --coe-subtle: #756b55;
  --coe-accent: #e6b65c;
  --coe-accent-rgb: 230, 182, 92;
  --coe-panel-rgb: 28, 23, 16;
  --coe-ink-rgb: 240, 230, 210;
  --coe-overlay: rgba(10, 8, 4, 0.84);
  --coe-accent-soft: rgba(230, 182, 92, 0.14);
  --coe-accent-glow: rgba(230, 182, 92, 0.3);
}

/* Tema: Rose */
:root[data-coe-theme="rose"] {
  --coe-page: #110a0d;
  --coe-sidebar: #170e12;
  --coe-panel: #1e1318;
  --coe-panel-raised: #271920;
  --coe-text: #f0e7ea;
  --coe-muted: #a08c93;
  --coe-subtle: #75646a;
  --coe-accent: #d98aa5;
  --coe-accent-rgb: 217, 138, 165;
  --coe-panel-rgb: 30, 19, 24;
  --coe-ink-rgb: 240, 220, 226;
  --coe-overlay: rgba(10, 5, 7, 0.84);
  --coe-accent-soft: rgba(217, 138, 165, 0.14);
  --coe-accent-glow: rgba(217, 138, 165, 0.3);
}

/* Tema: Violet */
:root[data-coe-theme="violet"] {
  --coe-page: #0b0911;
  --coe-sidebar: #110e19;
  --coe-panel: #171322;
  --coe-panel-raised: #1f1a2d;
  --coe-text: #ece8f4;
  --coe-muted: #9a92ab;
  --coe-subtle: #6f6882;
  --coe-accent: #b6a3f0;
  --coe-accent-rgb: 182, 163, 240;
  --coe-panel-rgb: 23, 19, 34;
  --coe-ink-rgb: 226, 220, 240;
  --coe-overlay: rgba(7, 5, 11, 0.84);
  --coe-accent-soft: rgba(182, 163, 240, 0.14);
  --coe-accent-glow: rgba(182, 163, 240, 0.3);
}
