/* ============================================================
   تم‌های رنگی آلاشت — انتخاب از داشبورد ← برندینگ
   تم کلاسیک هیچ توکنی تعریف نمی‌کند و رنگ‌های اصلی (fallback) در
   style.css و alasht-ui.css نمایش داده می‌شوند.
   ============================================================ */

/* ---------- شب سرمه‌ای: تیره با متن سفید ---------- */
html[data-theme="midnight"] {
  color-scheme: dark;
  --t-ink: #E8EDF5;
  --t-ink-rgb: 232, 237, 245;
  --t-muted: #A7B3C7;
  --t-heading: #FFFFFF;
  --t-heading-rgb: 255, 255, 255;
  --t-gold-text: #E3C766;
  --t-surface: #12284A;
  --t-surface-rgb: 18, 40, 74;
  --t-paper: #0A1A30;
  --t-paper-rgb: 10, 26, 48;
  --t-sand: #183258;
  --t-tint: #183258;
  --t-navy: #071428;
  --t-navy-2: #1F4C8A;
  --t-line-rgb: 255, 255, 255;
  --t-line-solid: rgba(255, 255, 255, 0.14);
  --t-shadow-rgb: 0, 0, 0;
  --t-overlay-rgb: 5, 15, 32;

  --ah-ink: #E8EDF5;
  --ah-muted: #A7B3C7;
  --ah-line: rgba(255, 255, 255, 0.12);
  --ah-paper: #0A1A30;
  --ah-sand: #183258;
  --ah-white: #12284A;
  --ah-gold: #D4B04A;
  --ah-gold-text: #E3C766;
  --ah-gold-soft: rgba(212, 176, 74, 0.18);
  --ah-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --brand-black: #E8EDF5;
  --brand-gray: #A7B3C7;
  --brand-charcoal: #0A1A30;
  --brand-cream: #0E2140;
  --brand-gold: #D4B04A;
  --brand-gold-text: #E3C766;
  --bg: #0A1A30;
  --surface: #12284A;
  --text: #E8EDF5;
  --line: rgba(255, 255, 255, 0.12);

  --ux-brand: #D4B04A;
  --ux-brand-ink: #0A1A30;
  --ux-brand-text: #E3C766;
  --ux-brand-soft: rgba(212, 176, 74, 0.1);
  --ux-brand-glow: rgba(212, 176, 74, 0.45);
  --ux-accent: #D4B04A;
  --ux-accent-ink: #0A1A30;
  --ux-accent-text: #E3C766;
  --ux-accent-soft: rgba(212, 176, 74, 0.14);
  --ux-accent-soft-2: rgba(212, 176, 74, 0.26);
  --ux-info: #8FB8F0;
  --ux-info-soft: rgba(143, 184, 240, 0.14);
  --ux-teal: #6ED8B6;
  --ux-teal-soft: rgba(110, 216, 182, 0.12);
  --ux-surface: #12284A;
  --ux-surface-2: rgba(255, 255, 255, 0.05);
  --ux-line: rgba(255, 255, 255, 0.1);
  --ux-line-strong: rgba(255, 255, 255, 0.16);
  --ux-text: #E8EDF5;
  --ux-heading: #FFFFFF;
  --ux-muted: #A7B3C7;
  --ux-shadow: 0 18px 50px rgba(0, 0, 0, 0.35);
  --ux-media-bg: #050F20;
}

/* ---------- مشکی و طلایی: تیره و لوکس ---------- */
html[data-theme="noir"] {
  color-scheme: dark;
  --t-ink: #E9E5DC;
  --t-ink-rgb: 233, 229, 220;
  --t-muted: #A39E94;
  --t-heading: #F7F3EA;
  --t-heading-rgb: 247, 243, 234;
  --t-gold-text: #E3C766;
  --t-surface: #18181B;
  --t-surface-rgb: 24, 24, 27;
  --t-paper: #0D0D0F;
  --t-paper-rgb: 13, 13, 15;
  --t-sand: #222226;
  --t-tint: #222226;
  --t-navy: #050506;
  --t-navy-2: #2A2A30;
  --t-line-rgb: 255, 255, 255;
  --t-line-solid: rgba(255, 255, 255, 0.12);
  --t-shadow-rgb: 0, 0, 0;
  --t-overlay-rgb: 0, 0, 0;

  --ah-navy: #1C1C20;
  --ah-navy-2: #2A2A30;
  --ah-ink: #E9E5DC;
  --ah-muted: #A39E94;
  --ah-line: rgba(255, 255, 255, 0.1);
  --ah-paper: #0D0D0F;
  --ah-sand: #222226;
  --ah-white: #18181B;
  --ah-gold: #D4B04A;
  --ah-gold-text: #E3C766;
  --ah-gold-soft: rgba(212, 176, 74, 0.16);
  --ah-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --brand-navy: #1C1C20;
  --brand-black: #E9E5DC;
  --brand-gray: #A39E94;
  --brand-charcoal: #0D0D0F;
  --brand-cream: #131316;
  --brand-gold: #D4B04A;
  --brand-gold-text: #E3C766;
  --bg: #0D0D0F;
  --surface: #18181B;
  --text: #E9E5DC;
  --line: rgba(255, 255, 255, 0.1);

  --ux-brand: #D4B04A;
  --ux-brand-ink: #0D0D0F;
  --ux-brand-text: #E3C766;
  --ux-brand-soft: rgba(212, 176, 74, 0.1);
  --ux-brand-glow: rgba(212, 176, 74, 0.45);
  --ux-accent: #D4B04A;
  --ux-accent-ink: #0D0D0F;
  --ux-accent-text: #E3C766;
  --ux-accent-soft: rgba(212, 176, 74, 0.14);
  --ux-accent-soft-2: rgba(212, 176, 74, 0.26);
  --ux-info: #C8B88A;
  --ux-info-soft: rgba(200, 184, 138, 0.12);
  --ux-teal: #8FD5B8;
  --ux-teal-soft: rgba(143, 213, 184, 0.1);
  --ux-surface: #18181B;
  --ux-surface-2: rgba(255, 255, 255, 0.045);
  --ux-line: rgba(255, 255, 255, 0.09);
  --ux-line-strong: rgba(255, 255, 255, 0.15);
  --ux-text: #E9E5DC;
  --ux-heading: #F7F3EA;
  --ux-muted: #A39E94;
  --ux-shadow: 0 18px 50px rgba(0, 0, 0, 0.5);
  --ux-media-bg: #000000;
}

/* ---------- زمردی: روشن با سبز تیره و طلایی ---------- */
html[data-theme="emerald"] {
  --t-ink: #25302C;
  --t-ink-rgb: 37, 48, 44;
  --t-muted: #56635E;
  --t-heading: #0F3D33;
  --t-heading-rgb: 15, 61, 51;
  --t-paper: #F1F4EF;
  --t-paper-rgb: 241, 244, 239;
  --t-sand: #E3EAE1;
  --t-tint: #E6ECE3;
  --t-navy: #0F3D33;
  --t-navy-2: #16574A;
  --t-line-rgb: 15, 61, 51;
  --t-shadow-rgb: 15, 61, 51;
  --t-overlay-rgb: 9, 38, 32;

  --ah-navy: #0F3D33;
  --ah-navy-2: #16574A;
  --ah-ink: #25302C;
  --ah-muted: #56635E;
  --ah-line: rgba(15, 61, 51, 0.12);
  --ah-paper: #F1F4EF;
  --ah-sand: #E3EAE1;
  --ah-shadow: 0 18px 50px rgba(15, 61, 51, 0.08);
  --brand-navy: #0F3D33;
  --brand-black: #25302C;
  --brand-gray: #56635E;
  --brand-charcoal: #F1F4EF;
  --brand-cream: #F1F4EF;
  --surface: #F1F4EF;
  --text: #25302C;
  --line: rgba(15, 61, 51, 0.12);

  --ux-brand-soft: rgba(15, 61, 51, 0.07);
  --ux-brand-glow: rgba(15, 61, 51, 0.35);
  --ux-info: #1F6B8A;
  --ux-info-soft: rgba(31, 107, 138, 0.1);
  --ux-line-strong: rgba(15, 61, 51, 0.18);
  --ux-media-bg: #0B2E26;
}

/* ---------- اصلاحات مشترک تم‌های تیره ---------- */
html[data-theme="midnight"] body,
html[data-theme="noir"] body {
  background: var(--bg);
  color: var(--text);
}

html[data-theme="midnight"] img,
html[data-theme="noir"] img {
  color-scheme: normal;
}

html[data-theme="midnight"] .mf-input,
html[data-theme="noir"] .mf-input,
html[data-theme="midnight"] .form-control,
html[data-theme="noir"] .form-control,
html[data-theme="midnight"] .form-select,
html[data-theme="noir"] .form-select {
  background-color: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: var(--t-ink);
}

html[data-theme="midnight"] .mf-input::placeholder,
html[data-theme="noir"] .mf-input::placeholder {
  color: rgba(var(--t-ink-rgb), 0.45);
}

html[data-theme="midnight"] select.mf-input option,
html[data-theme="noir"] select.mf-input option {
  background: var(--t-surface);
  color: var(--t-ink);
}

html[data-theme="midnight"] .ah-burger span,
html[data-theme="noir"] .ah-burger span {
  background: var(--t-ink);
}

html[data-theme="midnight"] .ah2-search__tab.is-active,
html[data-theme="noir"] .ah2-search__tab.is-active {
  background: var(--ah-gold);
  color: var(--t-paper);
}
