/* ==========================================================
   Design Tokens + Telegram CSS Variables
   ========================================================== */

:root {
  /* --- Spacing --- */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 12px;
  --space-lg: 16px;
  --space-xl: 24px;
  --space-2xl: 32px;

  /* --- Font Sizes (px only — rem has issues on some Telegram devices) --- */
  --font-xs: 11px;
  --font-sm: 13px;
  --font-md: 15px;
  --font-lg: 17px;
  --font-xl: 20px;
  --font-2xl: 28px;

  /* --- Font Weights --- */
  --weight-normal: 400;
  --weight-medium: 500;
  --weight-semibold: 600;
  --weight-bold: 700;

  /* --- Border Radius --- */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-full: 9999px;

  /* --- Shadows --- */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.08);

  /* --- Transitions --- */
  --transition-fast: 150ms ease;
  --transition-normal: 250ms ease;

  /* --- Layout --- */
  --nav-height: 56px;
  --safe-area-bottom: env(safe-area-inset-bottom, 0px);

  /* =========================================================
     Telegram CSS Variables — Fallback Values
     These are injected by Telegram WebApp SDK at runtime.
     Fallbacks ensure the app works when opened outside Telegram
     (development / testing).
     ========================================================= */

  /* Background */
  --tg-theme-bg-color: #ffffff;
  --tg-theme-secondary-bg-color: #f0f0f0;
  --tg-theme-section-bg-color: #ffffff;
  --tg-theme-header-bg-color: #ffffff;

  /* Text */
  --tg-theme-text-color: #000000;
  --tg-theme-hint-color: #999999;
  --tg-theme-subtitle-text-color: #999999;
  --tg-theme-section-header-text-color: #6d6d72;
  --tg-theme-accent-text-color: #007aff;
  --tg-theme-link-color: #007aff;
  --tg-theme-destructive-text-color: #ff3b30;

  /* Button */
  --tg-theme-button-color: #007aff;
  --tg-theme-button-text-color: #ffffff;

  /* Separator */
  --tg-theme-section-separator-color: #c8c7cc;
}
