/* ===================================================================
   LexiSync Multi-Profile Design Tokens & Themes v7.0
   Strict, unified, professional design languages for each neuro-type.
   =================================================================== */

:root {
  /* -------------------------------------------------------------
     BASE / DEFAULT THEME: Modern Apple & Duolingo Humanist
     ------------------------------------------------------------- */
  --bg-app: #F8F9FC;
  --bg-surface: #FFFFFF;
  --bg-surface-soft: #F1F4F9;
  --bg-card: #FFFFFF;
  --border-card: #E2E8F0;
  --border-width: 1.5px;
  --border-radius-sm: 12px;
  --border-radius-md: 18px;
  --border-radius-lg: 24px;
  --border-radius-full: 9999px;

  --shadow-card: none !important;
  --shadow-tactile: none !important;
  --shadow-soft: none !important;

  --text-main: #0F172A;
  --text-sub: #475569;
  --text-muted: #94A3B8;

  --accent-primary: #0284C7;
  --accent-primary-gradient: #0284C7;
  --accent-primary-soft: #F0F9FF;
  --accent-mint: #059669;
  --accent-mint-soft: #ECFDF5;
  --accent-amber: #D97706;
  --accent-amber-soft: #FFFBEB;
  --accent-rose: #E11D48;
  --accent-rose-soft: #FFF1F2;

  --font-family: 'Lexend', 'Inter', -apple-system, sans-serif;
  --font-scale: 1;
  --letter-spacing: 0.01em;
  --line-height: 1.55;

  --btn-height-default: 48px;
  --btn-height-mega: 56px;
  --touch-gap: 8px;
}

/* ===================================================================
   PROFILE 1: ДИСЛЕКСИЯ (Warm Orthographic Paper & Bionic Anchor)
   =================================================================== */
body[data-preset="dyslexia"] {
  --bg-app: #FAF4E5;
  --bg-surface: #FFFDF8;
  --bg-surface-soft: #F2E8D2;
  --bg-card: #FFFDF8;
  --border-card: #DFD0AC;
  --border-width: 1.5px;
  --border-radius-sm: 12px;
  --border-radius-md: 16px;
  --border-radius-lg: 20px;

  --shadow-card: none !important;
  --shadow-tactile: none !important;

  --text-main: #1C1917;
  --text-sub: #44403C;
  --text-muted: #78716C;

  --accent-primary: #1E40AF;
  --accent-primary-gradient: #1E40AF;
  --accent-primary-soft: #EFF6FF;

  --letter-spacing: 0.08em;
  --line-height: 1.95;
}

body[data-preset="dyslexia"] .phone-screen {
  background: #FAF4E5 !important;
  color: #1C1917 !important;
  font-family: 'Lexend', sans-serif !important;
  letter-spacing: 0.08em !important;
  line-height: 1.95 !important;
}

body[data-preset="dyslexia"] .bionic-bold {
  font-weight: 900 !important;
  color: #172554 !important;
  background: rgba(254, 240, 138, 0.5) !important;
  border-radius: 4px;
  padding: 0 2px;
}

.dyslexia-only-suite, .dyslexia-only-flex,
.adhd-only-suite, .adhd-only-flex,
.low-vision-only-suite, .low-vision-only-flex,
.aac-only-suite, .aac-only-flex {
  display: none !important;
}

body[data-preset="dyslexia"] .dyslexia-only-suite { display: block !important; }
body[data-preset="dyslexia"] .dyslexia-only-flex { display: flex !important; }

body[data-preset="adhd"] .adhd-only-suite { display: block !important; }
body[data-preset="adhd"] .adhd-only-flex { display: flex !important; }

body[data-preset="low_vision"] .low-vision-only-suite { display: block !important; }
body[data-preset="low_vision"] .low-vision-only-flex { display: flex !important; }

body[data-preset="aac"] .aac-only-suite { display: block !important; }
body[data-preset="aac"] .aac-only-flex { display: flex !important; }

/* ===================================================================
   PROFILE 2: СДВГ И РАС (Eucalyptus Zen & Minimalist Focus Tunnel)
   =================================================================== */
body[data-preset="adhd"] {
  --bg-app: #E7EFE9;
  --bg-surface: #F3F8F4;
  --bg-surface-soft: #D7E5DA;
  --bg-card: #FFFFFF;
  --border-card: #B7D1BE;
  --border-width: 1.5px;
  --border-radius-sm: 14px;
  --border-radius-md: 20px;
  --border-radius-lg: 26px;

  --shadow-card: none !important;
  --shadow-tactile: none !important;

  --text-main: #13271A;
  --text-sub: #2D4C37;
  --text-muted: #597B65;

  --accent-primary: #15803D;
  --accent-primary-gradient: #15803D;
  --accent-primary-soft: #F0FDF4;

  --letter-spacing: 0.02em;
  --line-height: 1.65;
}

body[data-preset="adhd"] .phone-screen {
  background: #E7EFE9 !important;
  color: #13271A !important;
}

body[data-preset="adhd"] .adhd-spotlight-active {
  box-shadow: none !important;
  transform: translateY(-2px) !important;
  position: relative;
  z-index: 10;
}

body[data-preset="adhd"] .adhd-dimmable-element {
  opacity: 0.3 !important;
  filter: blur(0.6px) !important;
  transition: opacity 0.3s ease, filter 0.3s ease !important;
}

body[data-preset="adhd"] .adhd-dimmable-element:hover {
  opacity: 0.9 !important;
  filter: none !important;
}

body[data-preset="adhd"] .adhd-only-suite {
  display: flex !important;
}

body[data-preset="adhd"] .adhd-fidget-fab {
  display: flex !important;
}

/* ===================================================================
   PROFILE 3: СЛАБОВИДЯЩИЕ (Obsidian & Safety Yellow - WCAG AAA 18:1)
   =================================================================== */
body[data-preset="low_vision"] {
  --bg-app: #000000;
  --bg-surface: #0A0A0A;
  --bg-surface-soft: #141414;
  --bg-card: #050505;
  --border-card: #FFE600;
  --border-width: 3.5px;
  --border-radius-sm: 12px;
  --border-radius-md: 16px;
  --border-radius-lg: 20px;

  --shadow-card: none !important;
  --shadow-tactile: none !important;

  --text-main: #FFFFFF;
  --text-sub: #FFE600;
  --text-muted: #E2E8F0;

  --accent-primary: #FFE600;
  --accent-primary-gradient: #FFE600;
  --accent-primary-soft: #201D00;

  --font-scale: 1.25;
  --line-height: 1.6;
}

body[data-preset="low_vision"] .phone-screen {
  background: #000000 !important;
  color: #FFFFFF !important;
}

body[data-preset="low_vision"] .ds-card,
body[data-preset="low_vision"] .ds-card-hero,
body[data-preset="low_vision"] .ds-card-flat,
body[data-preset="low_vision"] .dash-ai-banner,
body[data-preset="low_vision"] .dash-calm-banner,
body[data-preset="low_vision"] .neuro-hub-tile,
body[data-preset="low_vision"] .topic-tile-card,
body[data-preset="low_vision"] .tactile-card,
body[data-preset="low_vision"] .phone-bottom-nav,
body[data-preset="low_vision"] .schedule-step-chip {
  border: 3.5px solid #FFE600 !important;
  background: #0A0A0A !important;
  color: #FFFFFF !important;
  box-shadow: none !important;
}

body[data-preset="low_vision"] .hero-word-title {
  font-size: 44px !important;
  color: #FFE600 !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

body[data-preset="low_vision"] .hero-word-trans {
  font-size: 26px !important;
  color: #FFFFFF !important;
  font-weight: 900 !important;
}

body[data-preset="low_vision"] .ds-title-lg,
body[data-preset="low_vision"] .ds-title-md,
body[data-preset="low_vision"] .ds-title-sm,
body[data-preset="low_vision"] .ds-body,
body[data-preset="low_vision"] .ds-body-bold,
body[data-preset="low_vision"] .ds-caption {
  color: #FFFFFF !important;
  font-weight: 800 !important;
}

body[data-preset="low_vision"] .ds-btn-primary {
  background: #FFE600 !important;
  color: #000000 !important;
  font-weight: 900 !important;
  font-size: 18px !important;
  border: 3px solid #FFFFFF !important;
  box-shadow: none !important;
}

body[data-preset="low_vision"] .ds-btn-secondary,
body[data-preset="low_vision"] .ds-btn-icon,
body[data-preset="low_vision"] .tool-icon-btn {
  background: #141414 !important;
  color: #FFE600 !important;
  border: 2.5px solid #FFE600 !important;
  font-weight: 800 !important;
}

body[data-preset="low_vision"] .ds-badge {
  background: #201D00 !important;
  color: #FFE600 !important;
  border: 2px solid #FFE600 !important;
}

body[data-preset="low_vision"] .low-vision-only-suite {
  display: flex !important;
}

/* ===================================================================
   PROFILE 4: МОТОРИКА И ААС (Mega Touch & PECS System)
   =================================================================== */
body[data-preset="aac"] {
  --border-radius-sm: 16px;
  --border-radius-md: 22px;
  --border-radius-lg: 28px;
  --border-width: 2.5px;
  --border-card: #94A3B8;

  --btn-height-default: 72px;
  --btn-height-mega: 84px;
  --touch-gap: 16px;

  --shadow-tactile: none !important;
  --accent-primary: #0284C7;
  --accent-primary-gradient: #0284C7;
}

body[data-preset="aac"] .ds-btn-primary,
body[data-preset="aac"] .ds-btn-secondary,
body[data-preset="aac"] .tactile-btn-primary,
body[data-preset="aac"] .sensory-tab-btn {
  min-height: 60px !important;
  padding: 12px 14px !important;
  font-size: 15px !important;
  border-width: 2.5px !important;
}

body[data-preset="aac"] .nav-tab-item,
body[data-preset="low_vision"] .nav-tab-item {
  min-height: unset !important;
  padding: 4px 2px !important;
  font-size: 9px !important;
  flex: 1 1 0 !important;
  min-width: 0 !important;
}

body[data-preset="aac"] .aac-only-suite {
  display: block !important;
}

/* ===================================================================
   PROFILE FEATURE SUITES SWITCHER LOGIC
   =================================================================== */
.profile-feature-suite {
  display: none !important;
}

body[data-preset="default"] #suite-default {
  display: block !important;
}

body[data-preset="dyslexia"] #suite-dyslexia {
  display: block !important;
}

body[data-preset="adhd"] #suite-adhd {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

body[data-preset="low_vision"] #suite-low_vision {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

body[data-preset="aac"] #suite-aac {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}

/* Suite Interactive Component Styles */
.suite-header-badge {
  font-family: inherit;
  letter-spacing: 0.02em;
  box-shadow: none !important;
}

.aac-token-pill {
  background: #FFFFFF;
  border: 1.5px solid #0284C7;
  border-radius: 12px;
  padding: 6px 10px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 13px;
  color: #0369A1;
  box-shadow: none !important;
  animation: aacPopIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes aacPopIn {
  0% { transform: scale(0.8); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.adhd-choice-btn {
  background: #F0FDF4;
  border: 1.5px solid #86EFAC;
  border-radius: 12px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 800;
  color: #166534;
  cursor: pointer;
  box-shadow: none !important;
  transition: all 0.15s;
}

.adhd-choice-btn:hover {
  background: #DCFCE7;
  transform: translateY(-1px);
}

.adhd-choice-btn:active {
  transform: translateY(2px);
  box-shadow: none !important;
}

.adhd-choice-btn.correct {
  background: #22C55E !important;
  color: #FFFFFF !important;
  border-color: #16A34A !important;
  box-shadow: none !important;
}

.adhd-choice-btn.wrong {
  background: #FEE2E2 !important;
  color: #991B1B !important;
  border-color: #F87171 !important;
  box-shadow: none !important;
}

/* ===================================================================
   DASHBOARD PROFILE VIEWS SWITCHER (RADICAL COMPOSITION SHIFT)
   =================================================================== */
.dash-profile-view {
  display: none !important;
}

body[data-preset="default"] #dash-view-default {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

body[data-preset="dyslexia"] #dash-view-dyslexia {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

body[data-preset="adhd"] #dash-view-adhd {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

body[data-preset="low_vision"] #dash-view-low_vision {
  display: flex !important;
  flex-direction: column !important;
  gap: 14px !important;
}

body[data-preset="aac"] #dash-view-aac {
  display: flex !important;
  flex-direction: column !important;
  gap: 12px !important;
}

/* Hide schedule strip for ADHD, Low Vision, and AAC to eliminate clutter */
body[data-preset="adhd"] .visual-schedule-strip,
body[data-preset="low_vision"] .visual-schedule-strip,
body[data-preset="aac"] .visual-schedule-strip {
  display: none !important;
}

/* --- CROSS-PROFILE ASSISTIVE COMPONENT STYLES --- */

/* Grammar Category Color Anchors (Fitzgerald / Montessori) */
.gram-subject { background: #FEF08A !important; color: #854D0E !important; border: 1.5px solid #FACC15 !important; font-weight: 800 !important; }
.gram-verb { background: #BBF7D0 !important; color: #166534 !important; border: 1.5px solid #4ADE80 !important; font-weight: 800 !important; }
.gram-adj { background: #BAE6FD !important; color: #075985 !important; border: 1.5px solid #38BDF8 !important; font-weight: 800 !important; }
.gram-object { background: #FED7AA !important; color: #9A3412 !important; border: 1.5px solid #FB923C !important; font-weight: 800 !important; }

/* AAC Quick Needs Grid */
.aac-quick-needs-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin: 10px 0;
  width: 100%;
  box-sizing: border-box;
}

.aac-quick-btn {
  background: #F0F9FF;
  border: 2px solid #7DD3FC;
  border-radius: 14px;
  padding: 12px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  font-family: inherit;
  font-weight: 800;
  font-size: 12px;
  color: #0369A1;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: none !important;
  box-sizing: border-box;
}

.aac-quick-btn:hover {
  background: #E0F2FE;
  transform: translateY(-1px);
}

.aac-quick-btn:active {
  transform: translateY(2px);
  box-shadow: none !important;
}

/* Phoneme Pair Audio Gym */
.phoneme-pair-btn {
  background: #FFFBEB;
  border: 1.5px solid #FDE68A;
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 700;
  color: #92400E;
  transition: all 0.2s;
  box-sizing: border-box;
  margin-bottom: 8px;
}

.phoneme-pair-btn:hover {
  background: #FEF3C7;
  transform: translateY(-1px);
}

.phoneme-pair-btn:active {
  transform: translateY(1px);
}

/* Low Vision Audio Prompter */
.low-vision-voice-box {
  background: #000000;
  border: 3.5px solid #FFE600;
  border-radius: 16px;
  padding: 12px 14px;
  color: #FFFFFF;
  margin-bottom: 12px;
  box-sizing: border-box;
}




/* ==============================================================
   THEME ADAPTATIONS: MODERN SWITCHES & FLUID SLIDERS
   ============================================================== */

/* Low Vision (High Contrast AAA) */
body.theme-low_vision .modern-switch .switch-track {
  background: #000000 !important;
  border: 2px solid #FFFFFF !important;
  box-shadow: none !important;
}

body.theme-low_vision .modern-switch input[type="checkbox"]:checked + .switch-track {
  background: #FFE600 !important;
  border-color: #FFE600 !important;
}

body.theme-low_vision .modern-switch .switch-thumb {
  background: #FFFFFF !important;
  border: 2px solid #000000 !important;
}

body.theme-low_vision .modern-switch input[type="checkbox"]:checked + .switch-track .switch-thumb {
  background: #000000 !important;
  border: 2px solid #FFE600 !important;
}

body.theme-low_vision .modern-switch input[type="checkbox"]:checked + .switch-track .switch-thumb::after {
  background: #FFE600 !important;
}

body.theme-low_vision .fluid-slider {
  background: #000000 !important;
  border: 2px solid #FFE600 !important;
  height: 16px !important;
}

body.theme-low_vision .fluid-slider::-webkit-slider-thumb {
  background: #FFE600 !important;
  border: 3px solid #000000 !important;
  width: 26px !important;
  height: 26px !important;
}

body.theme-low_vision .fluid-slider-badge {
  background: #FFE600 !important;
  color: #000000 !important;
  border: 2px solid #000000 !important;
  font-weight: 900 !important;
}

/* ADHD Theme (Sensory Calm) */
body.theme-adhd .modern-switch input[type="checkbox"]:checked + .switch-track {
  background: #10B981 !important;
  box-shadow: none !important;
}

body.theme-adhd .fluid-slider {
  --slider-color: #10B981 !important;
}

/* Dyslexia Theme */
body.theme-dyslexia .modern-switch input[type="checkbox"]:checked + .switch-track {
  background: #D97706 !important;
  box-shadow: none !important;
}

body.theme-dyslexia .fluid-slider {
  --slider-color: #D97706 !important;
}
