/*
 * Tennis Agent - Design Tokens
 * ============================
 * Single source of truth for color, typography, spacing, radius, shadow and
 * motion values. Based on Material Design 3 (m3.material.io) color/type
 * scales and Apple HIG (developer.apple.com/design) spacing/touch-target
 * conventions.
 *
 * Rule: nothing outside this file should contain a literal hex color, px
 * font-size, or px spacing value. Components and layouts consume these
 * custom properties only. See ../DESIGN-SYSTEM.md.
 */

:root {
  /* ------------------------------------------------------------------ */
  /* Color - Primary (M3 "primary" role)                                 */
  /* ------------------------------------------------------------------ */
  --color-primary-dark: #0F3D26;
  --color-primary: #1B5E3B;
  --color-primary-light: #3D7A5C;
  --color-on-primary: #FFFFFF;
  --color-primary-container: #E3F1E8;
  --color-on-primary-container: #0A2E1C;

  /* Accent (tennis court green, used sparingly for highlights/accents) */
  --color-accent: #4CAF50;
  --color-on-accent: #FFFFFF;

  /* ------------------------------------------------------------------ */
  /* Color - Surface (M3 "surface" role)                                 */
  /* ------------------------------------------------------------------ */
  --color-surface: #F8F9FA;
  --color-surface-bright: #FFFFFF;
  --color-surface-variant: #F1F3F4;
  --color-surface-container: #FFFFFF;

  /* On-surface text (M3 emphasis levels: high / medium / low) */
  --color-on-surface: #1C1B1F;
  --color-on-surface-variant: #49454F;
  --color-on-surface-low: #79747E;

  /* Outlines / dividers */
  --color-outline: #79747E;
  --color-outline-variant: #C4C7C5;

  /* ------------------------------------------------------------------ */
  /* Color - Status                                                      */
  /* ------------------------------------------------------------------ */
  --color-success: #2E7D32;
  --color-success-container: #E2F0E3;
  --color-on-success-container: #1B4D1E;

  --color-warning: #F57F17;
  --color-warning-container: #FFF6D5;
  --color-on-warning-container: #8A6D00;

  --color-error: #C62828;
  --color-error-container: #FBE4E4;
  --color-on-error-container: #7A1414;

  --color-info: #1565C0;
  --color-info-container: #E3EDFB;
  --color-on-info-container: #0D3C73;

  /* ------------------------------------------------------------------ */
  /* Color - Purple (tournaments accent, dashboard "flag" cards)         */
  /* ------------------------------------------------------------------ */
  --color-purple: #6A4CAF;
  --color-purple-container: #ECE6FA;
  --color-on-purple-container: #35226E;

  /* ------------------------------------------------------------------ */
  /* Soft themed surfaces - dashboard stat / "flag" cards.               */
  /* Each theme = soft background + accent bar/border + accessible text. */
  /* Amber/green reuse the status-container pairs (already WCAG-checked). */
  /* ------------------------------------------------------------------ */
  --bg-amber-soft: var(--color-warning-container);
  --border-amber: var(--color-warning);
  --text-amber: var(--color-on-warning-container);

  --bg-green-soft: var(--color-success-container);
  --border-green: var(--color-success);
  --text-green: var(--color-on-success-container);

  --bg-purple-soft: var(--color-purple-container);
  --border-purple: var(--color-purple);
  --text-purple: var(--color-on-purple-container);

  /* Translucent white overlay on primary-colored surfaces (hero icon)   */
  --surface-on-primary-soft: rgba(255, 255, 255, 0.15);

  /* Scrim - dimmed backdrop behind modal dialogs (feedback, dialogs)     */
  --color-scrim: rgba(0, 0, 0, 0.45);

  /* ------------------------------------------------------------------ */
  /* Typography                                                          */
  /* ------------------------------------------------------------------ */
  --font-family-base: -apple-system, BlinkMacSystemFont, 'Inter', 'Segoe UI', Roboto, sans-serif;
  /* Techninėms reikšmėms, kurias vartotojas nusirašo ar kopijuoja (pvz. ntfy tema) */
  --font-family-mono: ui-monospace, SFMono-Regular, 'SF Mono', Menlo, Consolas, 'Liberation Mono', monospace;

  /* size / line-height / weight, M3 type scale */
  --font-display-size: 45px;
  --font-display-line-height: 52px;
  --font-display-weight: 400;

  --font-headline-large-size: 32px;
  --font-headline-large-line-height: 40px;
  --font-headline-large-weight: 400;

  --font-headline-medium-size: 28px;
  --font-headline-medium-line-height: 36px;
  --font-headline-medium-weight: 400;

  --font-title-large-size: 22px;
  --font-title-large-line-height: 28px;
  --font-title-large-weight: 500;

  --font-title-medium-size: 16px;
  --font-title-medium-line-height: 24px;
  --font-title-medium-weight: 500;

  --font-body-large-size: 16px;
  --font-body-large-line-height: 24px;
  --font-body-large-weight: 400;

  --font-body-medium-size: 14px;
  --font-body-medium-line-height: 20px;
  --font-body-medium-weight: 400;

  --font-label-large-size: 14px;
  --font-label-large-line-height: 20px;
  --font-label-large-weight: 500;

  /* Antraeiliams signalams, mažesniems už bet kurį kitą tekstą sąsajoje
     (pvz. įrašo tipo žyma įvykių srauto kortelėje, KAN-234 2/3) - M3
     label-small dydis. */
  --font-label-small-size: 11px;
  --font-label-small-line-height: 16px;
  --font-label-small-weight: 500;

  /* ------------------------------------------------------------------ */
  /* Spacing - 8px grid                                                  */
  /* ------------------------------------------------------------------ */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-xxl: 48px;
  --space-xxxl: 64px;

  /* ------------------------------------------------------------------ */
  /* Border radius                                                      */
  /* ------------------------------------------------------------------ */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  --radius-xxl: 20px;      /* framed dashboard composition */
  --radius-flag: 14px;     /* rounded (outer) side of "flag" cards */
  --radius-full: 9999px;

  /* ------------------------------------------------------------------ */
  /* Shadows - subtle, layered per M3 elevation                         */
  /* ------------------------------------------------------------------ */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 4px 16px rgba(0, 0, 0, 0.12);

  /* ------------------------------------------------------------------ */
  /* Motion                                                              */
  /* ------------------------------------------------------------------ */
  --transition-fast: 150ms ease;
  --transition-medium: 250ms ease;
  --transition-slow: 350ms ease;

  /* ------------------------------------------------------------------ */
  /* Touch targets (Apple HIG minimum 44x44pt)                           */
  /* ------------------------------------------------------------------ */
  --touch-target-min: 44px;

  /* ------------------------------------------------------------------ */
  /* Fiksuoti sluoksniai (lipni antraštė, plaukiojantis mygtukas)        */
  /* ------------------------------------------------------------------ */
  /* Lipnios viršutinės juostos aukštis. Naudojamas slinkimo atitraukimui
     (`scroll-padding-top`), kad į antraštę nuslinkus ji nesustotų PO juosta. */
  --nav-top-height: 60px;
  /* Lipnios šoninės panelės atstumas nuo viršaus (juosta + tarpas). */
  --sticky-aside-top: 88px;

  /* Plaukiojantis mygtukas (FAB). Geometrija aprašoma tokenais, nes turinys
     apačioje privalo rezervuoti bent tokį tarpą - antraip mygtukas uždengtų
     paskutinę eilutę (žr. `--fab-clearance` naudojimą `.page`).
     `--bottom-bar-height` didinama puslapiuose su apatine įvesties juosta
     (`.has-bottom-bar`), o kartu su ja perskaičiuojamas ir rezervas. */
  --fab-size: var(--space-xxl);
  --fab-offset: var(--space-lg);
  --bottom-bar-height: var(--space-lg);
  --fab-clearance: calc(
    var(--bottom-bar-height) + var(--fab-offset) + var(--fab-size) + var(--space-md)
  );

  /* ------------------------------------------------------------------ */
  /* Focus ring (WCAG 2.1 AA - visible, >=3:1 against adjacent colors)   */
  /* ------------------------------------------------------------------ */
  --focus-ring-color: var(--color-primary-light);
  --focus-ring-width: 2px;
  --focus-ring-offset: 2px;

  /* ------------------------------------------------------------------ */
  /* Šaltinio spalvos (KAN-218, šeimos - KAN-220) - kortelių kairiojo krašto */
  /* juostelė pagal duomenų šaltinį (platforma / arena / savarankiškos      */
  /* varžybos). Token pavadinimai atitinka config/rules/saltiniu_spalvos.yaml*/
  /* `palete` sąrašą - ten priskiriama, kuris šaltinis gauna kurį token'ą,  */
  /* vartotojas jos nekeičia. Dešimt spalvų dviejose šeimose (šilti -       */
  /* portalams, šalti - arenoms) + viena nepriklausoma (violetinė -         */
  /* savarankiškoms varžyboms), kiekviena >=3:1 kontrastu baltame kortelės  */
  /* fone, gretimos tos pačios šeimos spalvos aiškiai skiriasi atspalviu ir */
  /* šviesumu (žr. DESIGN-SYSTEM.md).                                       */
  /* ------------------------------------------------------------------ */
  /* Šilti (tik platformoms/portalams) */
  --source-color-raudona: #AD1F1F;
  --source-color-oranzine: #C95B0D;
  --source-color-gelsva: #A58009;
  --source-color-rausva: #9C1C69;
  /* Šalti (tik arenoms) */
  --source-color-melyna: #1F58AD;
  --source-color-indigo: #3B1FAD;
  --source-color-turkio: #178282;
  --source-color-zalia: #2C8217;
  --source-color-smaragdine: #178242;
  /* Nepriklauso šeimai (tik savarankiškoms varžyboms) */
  --source-color-violetine: #911FAD;
}
