/* Semantic tokens mapped to existing Medix variables */
:root,
[data-theme="light"] {
  color-scheme: light;
  --surface-page: #fbfdfe;
  --surface-card: var(--white);
  --surface-elevated: var(--white);
  --text-primary: var(--dark);
  --text-secondary: var(--gray-600);
  --border-subtle: var(--gray-200);
}

[data-theme="dark"] {
  color-scheme: dark;
  --surface-page: #0b1220;
  --surface-card: #1e293b;
  --surface-elevated: #243044;
  --white: #1e293b;
  --gray-100: #1a2332;
  --gray-200: #334155;
  --gray-400: #94a3b8;
  --gray-600: #cbd5e1;
  --gray-800: #e2e8f0;
  --dark: #f1f5f9;
  --primary-light: rgba(17, 109, 192, 0.22);
  --shadow-card: 0 10px 30px -5px rgba(0, 0, 0, 0.35);
  --text-primary: #f1f5f9;
  --text-secondary: #cbd5e1;
  --border-subtle: #334155;
}

body {
  background-color: var(--surface-page);
  color: var(--text-primary);
}

.header {
  background: color-mix(in srgb, var(--surface-elevated) 95%, transparent);
  border-bottom-color: var(--border-subtle);
}

.footer {
  background: #0b1220;
}

[data-theme="dark"] .page-hero {
  background: linear-gradient(180deg, #0f2744 0%, var(--surface-page) 100%);
}

[data-theme="dark"] .privacy-content,
[data-theme="dark"] .term-section,
[data-theme="dark"] .privacy-sidebar,
[data-theme="dark"] .doctor-card,
[data-theme="dark"] .profile-card,
[data-theme="dark"] .feature-box,
[data-theme="dark"] .faq-item,
[data-theme="dark"] .filter-panel {
  background: var(--surface-card);
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}

[data-theme="dark"] .mobile-drawer {
  background: var(--surface-elevated);
}

[data-theme="dark"] .header .nav-item > .dropdown-menu {
  background: var(--surface-elevated);
  border-color: var(--border-subtle);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: var(--surface-card);
  color: var(--text-primary);
  border-color: var(--border-subtle);
}

/* Preferences UI */
.pref-switcher {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pref-theme-btn {
  width: 38px;
  height: 38px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--gray-100);
  color: var(--text-secondary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.pref-theme-btn:hover {
  color: var(--primary);
  border-color: var(--primary);
}

.drawer-preferences {
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.drawer-preferences .pref-switcher {
  justify-content: center;
}

[data-theme="dark"] .page-hero {
  background: linear-gradient(180deg, #0f2744 0%, var(--surface-page) 100%);
  border-bottom-color: var(--border-subtle);
}
