/* ============================================================
   SellTheNews — Color tokens
   ------------------------------------------------------------
   Two families, two ownership models:

   1. NEUTRALS (bg / surface / text / hairline / accent)
      Theme-owned. At runtime ThemeProvider maps Telegram
      `themeParams` onto these same variables, so the UI follows
      the user's Telegram Day/Night/custom theme. The values
      below are the *static fallback* (authentic Telegram desktop
      Classic light + dark) used outside Telegram and on RN.

   2. SENTIMENT + STATUS (bullish / bearish / neutral / warning /
      success / destructive)
      APP-OWNED CONSTANTS. The theme must never repaint these.
      One value per token, contrast-verified against BOTH the light
      (#ffffff) and dark (#17212b) backgrounds. Distinguished by
      lightness/value — never hue alone — and ALWAYS paired with a
      glyph (▲ ▼ –) + label in the UI. Legible in grayscale.
   ============================================================ */

:root {
  /* ---- Neutral scale — static fallback = Telegram light ---- */
  --bg:            #ffffff;   /* tg-theme-bg-color            */
  --secondary-bg:  #efeff3;   /* tg-theme-secondary-bg-color  */
  --section-bg:    #ffffff;   /* tg-theme-section-bg-color    */
  --surface:       #ffffff;   /* cards / sheets               */
  --hairline:      #e6e6ea;   /* section separators           */
  --text:          #0b0b0c;   /* tg-theme-text-color          */
  --text-secondary:#707579;   /* tg-theme-hint-color          */
  --text-hint:     #9a9ea3;   /* fainter hint / placeholder   */

  /* ---- Accent (links + CTA) — from button_/link_color ---- */
  --accent:           #2481cc;
  --accent-hover:     #1f73b8;
  --accent-foreground:#ffffff; /* tg-theme-button-text-color  */

  /* ---- Semantic sentiment — APP CONSTANTS (no themeParams) ---- */
  --sentiment-bullish: #168f5d;  /* ▲  calm green, not stoplight */
  --sentiment-bearish: #cf463c;  /* ▼  calm red,   not stoplight */
  --sentiment-neutral: #8a8f95;  /* –  grey                       */

  /* Soft tints for chips — transparent so they read on any theme bg */
  --sentiment-bullish-soft: color-mix(in srgb, var(--sentiment-bullish) 14%, transparent);
  --sentiment-bearish-soft: color-mix(in srgb, var(--sentiment-bearish) 14%, transparent);
  --sentiment-neutral-soft: color-mix(in srgb, var(--sentiment-neutral) 16%, transparent);

  /* ---- Status — APP CONSTANTS ---- */
  --warning:     #c8851a;
  --success:     #168f5d;
  --destructive: #cf463c;   /* tg-theme-destructive-text-color overrides at runtime */
  --warning-soft:     color-mix(in srgb, var(--warning) 16%, transparent);
  --success-soft:     color-mix(in srgb, var(--success) 14%, transparent);
  --destructive-soft: color-mix(in srgb, var(--destructive) 14%, transparent);

  /* ---- Focus ring ---- */
  --ring: color-mix(in srgb, var(--accent) 50%, transparent);
}

/* ---- Dark — static fallback = Telegram dark (Night) ----
   Applied via `.dark` on <html> (ThemeProvider toggles it from
   Telegram `colorScheme`). No in-app theme toggle exists. */
.dark {
  --bg:            #17212b;
  --secondary-bg:  #232e3c;
  --section-bg:    #17212b;
  --surface:       #232e3c;
  --hairline:      #2c3847;
  --text:          #ffffff;
  --text-secondary:#708499;
  --text-hint:     #5d6e80;

  --accent:           #6ab3f3;
  --accent-hover:     #84c1f5;
  --accent-foreground:#ffffff;

  /* Sentiment + status stay constant by design — NOT redeclared here. */
}
