/* Hush color system.
   Base palette = literal values from hush_mobile/lib/app/theme/app_colors.dart +
   theme_extensions.dart, plus the Figma "Redesigns" screen values.
   Semantic aliases are theme-scoped: :root = light, [data-theme="dark"] = dark. */
:root{
  /* ---- Brand ---- */
  --hush-indigo:#5261EC;            /* primary, light mode */
  --hush-indigo-bright:#6A72FF;     /* higher-contrast blue for dark surfaces */
  --hush-indigo-figma:#4E62F6;      /* active nav label in Figma redesign */
  --hush-indigo-deep:#3A47C9;       /* reply label */
  --hush-violet:#582FFF;            /* nav active underline (Figma) */
  --hush-lime:#B7F04D;              /* primary, dark mode */
  --hush-lime-figma:#CDFF62;        /* lime CTA / outgoing bubble in Figma redesign */
  --hush-lime-ink:#526E16;          /* label on lime */
  --hush-lime-ink-deep:#395106;
  --hush-on-lime:#1A1A2E;

  /* ---- Neutrals (WhatsApp-familiar greys, from the Flutter theme) ---- */
  --grey-ink:#111B21;
  --grey-600:#667781;
  --grey-500:#8696A0;
  --grey-780:#484C52;               /* inactive nav label (Figma) */
  --grey-2f:#2F2F2F;                /* row title (Figma) */
  --grey-78:#787878;                /* row preview text (Figma) */
  --grey-a6:#A6A6A6;                /* placeholder text (Figma) */
  --grey-46:#464646;                /* wordmark ink (Figma) */

  /* ---- Semantics ---- */
  --success:#10B981;
  --online:#30D472;
  --warning:#FFB020;
  --danger:#F93827;                 /* call-decline red */

  /* ---- Light theme surfaces ---- */
  --surface:#F4F5FA;
  --surface-figma:#F8F9FC;          /* screen bg in the Figma redesign */
  --surface-lowest:#FCFDFF;
  --surface-low:#F8F9FD;
  --surface-container:#F3F5FC;
  --surface-high:#EDF0FA;
  --surface-highest:#E5E9F6;
  --on-surface:#1D2333;
  --on-surface-variant:#6E728C;
  --outline:#DFE3F9;
  --outline-variant:#E8EAFF;
  --outline-figma:#ECF0F9;          /* hairline / card inset stroke in Figma */
  --primary-container:#E0E1F9;
  --on-primary-container:#191A2C;
  --secondary-container:#E7F8D8;
  --on-secondary-container:#1F3516;
  --error:#B3261E;
  --on-error:#FFFFFF;
  --error-container:#F9DEDC;
  --on-error-container:#410E0B;

  /* ---- Light theme semantic aliases ---- */
  --primary:var(--hush-indigo);
  --on-primary:#FFFFFF;
  --accent:var(--hush-lime);
  --on-accent:var(--hush-lime-ink);
  --text-heading:var(--on-surface);
  --text-body:var(--grey-ink);
  --text-secondary:var(--grey-600);
  --text-muted:var(--grey-a6);
  --icon-active:var(--hush-indigo);
  --icon-inactive:var(--grey-600);
  --surface-card:rgba(255,255,255,0.9);
  --surface-card-solid:#FFFFFF;
  --surface-sheet:#F8F9FC;
  --surface-nav:#FFFFFF;
  --divider:var(--outline-variant);

  /* ---- Conversation (light) ---- */
  --chat-bg:#F4F5FA;
  --bubble-in:#FFFFFF;
  --bubble-in-border:#DEE1F8;
  --bubble-in-text:#111B21;
  --bubble-out:#DCE0FF;
  --bubble-out-figma:#CDFF62;       /* Figma redesign uses lime for outgoing */
  --bubble-out-text:#111B21;
  --reply-accent:var(--hush-indigo);
  --reply-in-bg:#F0F4FF;
  --reply-out-bg:#E0E4FF;
  --reply-label:#3A47C9;
  --timestamp:#667781;
  --composer-bg:#FFFFFF;
  --send-bg:var(--hush-indigo);
  --send-fg:#FFFFFF;

  /* ---- Identity states (product invariant) ---- */
  --identity-hush:var(--hush-lime-figma);   /* anonymous: lime, pseudonym only */
  --identity-hush-ink:var(--hush-lime-ink);
  --identity-normal:var(--hush-indigo);     /* revealed / normal: indigo + real name */
  --identity-normal-ink:#FFFFFF;

  /* ---- Shimmer ---- */
  --shimmer-base:#E0E0E0;
  --shimmer-highlight:#F5F5F5;
}

[data-theme="dark"]{
  --surface:#1C1D2A;
  --surface-figma:#1C1D2A;
  --surface-lowest:#13141E;
  --surface-low:#191A26;
  --surface-container:#21223A;
  --surface-high:#282B3F;
  --surface-highest:#32364E;
  --on-surface:#E3E6F0;
  --on-surface-variant:#9AA0C0;
  --outline:#4A4D5E;
  --outline-variant:#363947;
  --outline-figma:#2E2F48;
  --primary-container:#2F4D20;
  --on-primary-container:#DFF8C7;
  --secondary-container:#44465A;
  --on-secondary-container:#E0E1F9;
  --error:#F2B8B5;
  --on-error:#601410;
  --error-container:#8C1D18;
  --on-error-container:#F9DEDC;

  --primary:var(--hush-lime);
  --on-primary:var(--hush-on-lime);
  --accent:var(--hush-indigo-bright);
  --on-accent:#2D2E42;
  --text-heading:var(--on-surface);
  --text-body:#E9EDEF;
  --text-secondary:var(--grey-500);
  --text-muted:#8696A0;
  --icon-active:var(--hush-lime);
  --icon-inactive:var(--grey-500);
  --surface-card:#252638;
  --surface-card-solid:#252638;
  --surface-sheet:#1C1D2A;
  --surface-nav:#13141E;
  --divider:var(--outline-variant);

  --chat-bg:#1C1D2A;
  --bubble-in:#252638;
  --bubble-in-border:#2E2F48;
  --bubble-in-text:#E9EDEF;
  --bubble-out:#2C2F5F;
  --bubble-out-text:#E9EDEF;
  --reply-accent:var(--hush-lime);
  --reply-in-bg:#1E1F33;
  --reply-out-bg:#23265A;
  --reply-label:var(--hush-lime);
  --timestamp:#8696A0;
  --composer-bg:#282B3F;
  --send-bg:var(--hush-lime);
  --send-fg:var(--hush-on-lime);

  --identity-normal:var(--hush-indigo-bright);

  --shimmer-base:#2A2A2A;
  --shimmer-highlight:#3D3D3D;
}
