/* ═══════════════════════════════════════════════════════════════
   theme.css  —  Shared design tokens for arXiv Tool + Paperly
   Include this ONCE, before styles.css and settings.css
   ═══════════════════════════════════════════════════════════════ */

/* ── Base (dark) theme ── */
:root {
  /* ── Core palette ─────────────────────────────────────────── */
  --primary-color:      #5c6bc0;
  --primary-rgb:        92, 107, 192;
  --primary-hi:         #7986cb;
  --secondary-color:    #26c6da;
  --secondary-rgb:      38, 198, 218;

  /* ── Surfaces ──────────────────────────────────────────────── */
  --background-color:   #0f1117;
  --background-hover:   rgba(92, 107, 192, .08);
  --background-light:   #22263a;
  --background-secondary: #1a1d27;

  --card-bg-color:      #1a1d27;
  --header-bg:          #161928;
  --input-bg-color:     #0f1117;

  /* ── Text ──────────────────────────────────────────────────── */
  --text-color:         #e8eaf6;
  --text-primary:       #e8eaf6;
  --text-secondary:     #7986a8;
  --text-tertiary:      #454c6b;

  /* ── Borders ───────────────────────────────────────────────── */
  --border-color:       #2e3347;
  --border-accent:      rgba(92, 107, 192, .4);

  /* ── Status colours ────────────────────────────────────────── */
  --green-color:        #4caf7d;
  --amber-color:        #f0a500;
  --red-color:          #ef5350;
  --gold-color:         #f0a500;
  --gold-dark:          #c88000;

  /* ── Gradients ─────────────────────────────────────────────── */
  --gradient-primary:        linear-gradient(135deg, var(--primary-color), var(--secondary-color));
  --gradient-primary-hover:  linear-gradient(135deg, var(--primary-hi), var(--secondary-color));
  --gradient-light:          linear-gradient(135deg, rgba(92,107,192,.12), rgba(38,198,218,.08));
  --gold-gradient:           linear-gradient(135deg, var(--gold-color), var(--gold-dark));

  /* ── Accent shorthands (used in chip / highlight logic) ─────── */
  --accent-color:       var(--primary-color);
  --accent-dim:         rgba(92, 107, 192, .15);
  --tag-bg:             rgba(92, 107, 192, .12);
  --tag-hover-bg:       rgba(92, 107, 192, .22);
  --match-highlight:    rgba(240, 165, 0, .25);

  /* ── Radii ─────────────────────────────────────────────────── */
  --radius-sm:  6px;
  --radius-md:  10px;
  --radius-lg:  16px;

  /* ── Shadows ───────────────────────────────────────────────── */
  --shadow-sm:  0 1px 3px rgba(0,0,0,.4), 0 1px 2px rgba(0,0,0,.3);
  --shadow-md:  0 4px 12px rgba(0,0,0,.45);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.55);

  /* ── Misc ──────────────────────────────────────────────────── */
  --transition:   all .18s ease;
  --mono:         'JetBrains Mono', 'Fira Mono', monospace;

  /* ── Theme-swatch fallbacks ────────────────────────────────── */
  --swatch-a: var(--primary-color);
  --swatch-b: var(--secondary-color);
}

/* ── Light theme override ── */
:root[data-theme="light"], [data-theme="light"] {
  --background-color:     #f4f5fb;
  --background-hover:     rgba(92, 107, 192, .07);
  --background-light:     #e8eaf6;
  --background-secondary: #ffffff;

  --card-bg-color:        #ffffff;
  --header-bg:            #ffffff;
  --input-bg-color:       #ffffff;

  --text-color:           #1a1d2e;
  --text-primary:         #1a1d2e;
  --text-secondary:       #5a6080;
  --text-tertiary:        #9ea6c0;

  --border-color:         #d8dbe8;
  --border-accent:        rgba(92, 107, 192, .35);

  --shadow-sm:  0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
  --shadow-md:  0 4px 12px rgba(0,0,0,.1);
  --shadow-lg:  0 8px 24px rgba(0,0,0,.12);

  --accent-dim:   rgba(92, 107, 192, .1);
  --tag-bg:       rgba(92, 107, 192, .08);
  --tag-hover-bg: rgba(92, 107, 192, .15);
  --match-highlight: rgba(240, 165, 0, .18);
}
