
/* ==========================================
   AON ID — THEME SYSTEM
   Dark default and complete light theme
========================================== */

/* ==========================================
   DARK THEME — DEFAULT
========================================== */

body[data-theme="dark"],
body:not([data-theme]) {
  --theme-background: var(--aon-bg-dark);
  --theme-surface: var(--aon-surface-dark);
  --theme-raised: var(--aon-surface-raised);
  --theme-border: var(--aon-border-dark);
  --theme-text: var(--aon-text-primary);
  --theme-muted: var(--aon-text-secondary);
  --theme-input: #131F30;

  background: var(--theme-background);
  color: var(--theme-text);
}

/* ==========================================
   LIGHT THEME
========================================== */

body[data-theme="light"] {
  --theme-background: var(--aon-bg-light);
  --theme-surface: var(--aon-surface-light);
  --theme-raised: #EDF2F8;
  --theme-border: var(--aon-border-light);
  --theme-text: var(--aon-text-dark);
  --theme-muted: var(--aon-text-muted);
  --theme-input: #FFFFFF;

  background: var(--theme-background);
  color: var(--theme-text);
}

/* ==========================================
   GLOBAL THEME SURFACES
========================================== */

body,
#app,
#app-content {
  background-color: var(--theme-background, var(--aon-bg-dark));
  color: var(--theme-text, var(--aon-text-primary));
  transition:
    background-color var(--aon-transition),
    color var(--aon-transition);
}

/* ==========================================
   THEME-AWARE TEXT
========================================== */

.theme-text {
  color: var(--theme-text);
}

.theme-muted {
  color: var(--theme-muted);
}

/* ==========================================
   THEME-AWARE SURFACES
========================================== */

.theme-surface {
  background: var(--theme-surface);
  border: 1px solid var(--theme-border);
  border-radius: var(--aon-radius-lg);
}

.theme-raised {
  background: var(--theme-raised);
  border: 1px solid var(--theme-border);
  border-radius: var(--aon-radius-md);
}

/* ==========================================
   THEME-AWARE FORM ELEMENTS
========================================== */

body[data-theme="light"] input,
body[data-theme="light"] textarea,
body[data-theme="light"] select {
  color-scheme: light;
}

body[data-theme="dark"] input,
body[data-theme="dark"] textarea,
body[data-theme="dark"] select {
  color-scheme: dark;
}

/* ==========================================
   SYSTEM ACCESSIBILITY
========================================== */

@media (prefers-reduced-motion: reduce) {
  body,
  #app,
  #app-content {
    transition: none;
  }
}
