/* Bloom Academy — Theme variables */

:root,
html[data-theme="blossom"] {
  --color-primary: #EFD6D2;
  --color-accent: #D8A7A0;
  --color-accent-hover: #C99891;
  --color-secondary: #AFC2B0;
  --color-depth: #7E927F;
  --color-background: #FAF7F5;
  --color-surface: #FFFFFF;
  --color-surface-2: #FBF7F4;
  --color-surface-3: #F4EFEB;
  --color-text-primary: #2F2F2F;
  --color-text-secondary: #8B817C;
  --color-text-muted: #B5ACA6;
  --color-border: #EDE8E4;
  --color-border-strong: #DCD5CF;
  --color-success: #AFC2B0;
  --color-warning: #F3D8B5;
  --color-danger: #D8A7A0;
  --color-info: #C9DDF2;

  --color-subject-1: #F6D1C1;  /* peach    — Language Arts */
  --color-subject-2: #F3D8B5;  /* apricot  — Math */
  --color-subject-3: #F1E4B3;  /* butter   — Science */
  --color-subject-4: #CFE3D6;  /* sage     — History */
  --color-subject-5: #C9DDF2;  /* sky      — Art */
  --color-subject-6: #D8D4F2;  /* lavender — Music */
  --color-subject-7: #E6CFE0;  /* mauve    — PE/Health */
  --color-subject-8: #D9CFC0;  /* taupe    — Other */

  --confetti-1: #EFD6D2;
  --confetti-2: #D8A7A0;
  --confetti-3: #AFC2B0;
  --confetti-4: #F3D8B5;
  --confetti-5: #C9DDF2;
  --confetti-6: #D8D4F2;
  --confetti-7: #E6CFE0;
  --confetti-8: #F1E4B3;

  --shadow-sm: 0 1px 2px rgba(60,40,30,0.04), 0 1px 1px rgba(60,40,30,0.03);
  --shadow-md: 0 2px 6px rgba(60,40,30,0.05), 0 6px 14px rgba(60,40,30,0.06);
  --shadow-lg: 0 8px 24px rgba(60,40,30,0.08), 0 18px 36px rgba(60,40,30,0.05);

  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;
}

/* ---------- NEUTRAL — cohesive slate / sage / sand ---------- */
html[data-theme="neutral"] {
  /* Light slate-blue used as highlight background (keeps text readable) */
  --color-primary: #DDE6EE;
  --color-accent: #5B7E9D;
  --color-accent-hover: #4A6F8E;
  --color-secondary: #7D9482;
  --color-depth: #3F5B78;
  --color-background: #F6F5F3;
  --color-surface: #FFFFFF;
  --color-surface-2: #F0EFEC;
  --color-surface-3: #E8E7E2;
  --color-text-primary: #2E3135;
  --color-text-secondary: #5B626B;
  --color-text-muted: #8C939B;
  --color-border: #E0E3E6;
  --color-border-strong: #C5CAD0;
  --color-success: #7D9482;
  --color-warning: #B89F73;
  --color-danger: #A66E6B;
  --color-info: #5B7E9D;

  /* Cohesive cool-warm neutral subject palette — no pinks */
  --color-subject-1: #C8D6E2;  /* soft slate blue */
  --color-subject-2: #D8CFB8;  /* warm sand */
  --color-subject-3: #CFDAC8;  /* sage mist */
  --color-subject-4: #D6CBC9;  /* dusty mauve */
  --color-subject-5: #C5D0D6;  /* pale stone-blue */
  --color-subject-6: #E0D8C2;  /* cream */
  --color-subject-7: #C6D5CE;  /* mint */
  --color-subject-8: #D2CDC4;  /* taupe */

  --confetti-1: #5B7E9D;
  --confetti-2: #7D9482;
  --confetti-3: #B89F73;
  --confetti-4: #C8D6E2;
  --confetti-5: #D8CFB8;
  --confetti-6: #CFDAC8;
  --confetti-7: #D6CBC9;
  --confetti-8: #E0D8C2;
}

/* Neutral — variant overrides for high contrast */
html[data-theme="neutral"] .btn--primary,
html[data-theme="neutral"] .btn--primary:hover,
html[data-theme="neutral"] .fab,
html[data-theme="neutral"] .cal-day.today .cal-day__num,
html[data-theme="neutral"] #update-banner,
html[data-theme="neutral"] .skip-link {
  color: #FFFFFF;
}
html[data-theme="neutral"] .badge--success { background: rgba(125,148,130,0.20); color: #4F6253; }
html[data-theme="neutral"] .badge--warning { background: rgba(184,159,115,0.25); color: #6B5A2E; }
html[data-theme="neutral"] .badge--danger  { background: rgba(166,110,107,0.20); color: #7A4441; }
html[data-theme="neutral"] .badge--info    { background: rgba(91,126,157,0.18); color: #2F506D; }
html[data-theme="neutral"] .toast--success { border-left-color: #7D9482; }
html[data-theme="neutral"] .toast--celebrate { border-left-color: var(--color-accent); }

/* ---------- MIDNIGHT — dark mode, brighter text ---------- */
html[data-theme="midnight"] {
  --color-primary: #3A3733;
  --color-accent: #E0B5AE;
  --color-accent-hover: #EBC4BD;
  --color-secondary: #9DBA9F;
  --color-depth: #BFD2BF;
  --color-background: #1A1917;
  --color-surface: #252320;
  --color-surface-2: #2E2C29;
  --color-surface-3: #383532;
  --color-text-primary: #FBF7F2;
  --color-text-secondary: #E2DAD2;
  --color-text-muted: #BDB4AC;
  --color-border: #3F3B36;
  --color-border-strong: #524D47;
  --color-success: #9DBA9F;
  --color-warning: #E0BE87;
  --color-danger: #E0A39C;
  --color-info: #A8C6E0;

  --color-subject-1: #D8A091;
  --color-subject-2: #D8B188;
  --color-subject-3: #D6C386;
  --color-subject-4: #9DBA9F;
  --color-subject-5: #97B6D8;
  --color-subject-6: #ADA5DC;
  --color-subject-7: #CFA3C1;
  --color-subject-8: #B2A89B;

  --confetti-1: #E0B5AE;
  --confetti-2: #9DBA9F;
  --confetti-3: #E0BE87;
  --confetti-4: #A8C6E0;
  --confetti-5: #ADA5DC;
  --confetti-6: #CFA3C1;
  --confetti-7: #D8A091;
  --confetti-8: #D6C386;

  --shadow-sm: 0 1px 2px rgba(0,0,0,0.4);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.45);
  --shadow-lg: 0 12px 28px rgba(0,0,0,0.55);
}

/* Midnight — badge variant overrides for legibility on dark surfaces */
html[data-theme="midnight"] .badge--success { background: rgba(157,186,159,0.22); color: #BEDABE; }
html[data-theme="midnight"] .badge--warning { background: rgba(224,190,135,0.22); color: #ECC78D; }
html[data-theme="midnight"] .badge--danger  { background: rgba(224,163,156,0.22); color: #EAB6AF; }
html[data-theme="midnight"] .badge--info    { background: rgba(168,198,224,0.20); color: #BCD3E8; }
html[data-theme="midnight"] .btn--primary { color: #1A1917; }
html[data-theme="midnight"] .btn--primary:hover { color: #1A1917; }
html[data-theme="midnight"] .fab { color: #1A1917; }
html[data-theme="midnight"] .cal-day.today .cal-day__num { color: #1A1917; }
html[data-theme="midnight"] #update-banner { color: #1A1917; }
html[data-theme="midnight"] #update-banner button { color: #1A1917; border-color: rgba(26,25,23,0.5); }
html[data-theme="midnight"] #update-banner button:hover { background: rgba(26,25,23,0.15); }
html[data-theme="midnight"] .skip-link { color: #1A1917; }
html[data-theme="midnight"] .modal-backdrop { background: rgba(0,0,0,0.55); }
html[data-theme="midnight"] .check.is-checked::after { border-color: #1A1917; }

/* Font scale (accessibility) */
html[data-font-scale="default"] { font-size: 16px; }
html[data-font-scale="larger"]  { font-size: 17.5px; }
html[data-font-scale="largest"] { font-size: 19px; }

/* Animations off (Settings → Appearance toggle) */
html[data-animations="off"] *,
html[data-animations="off"] *::before,
html[data-animations="off"] *::after {
  animation-duration: 0.001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.001ms !important;
}
html[data-animations="off"] .card--interactive:hover { transform: none; }
html[data-animations="off"] .confetti { display: none !important; }
