/* Light Theme Styles */

/* Global fallback variables (always available) */
:root {
  /* Background Colors */
  --bg-primary: #fbfaf8;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #fbfaf8;
  --bg-hover: #f1f5f9;
  --bg-muted: #757575;

  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;

  /* Disabled State Colors */
  --button-disabled-bg: #e5e7eb; /* Muted light gray background */
  --button-disabled-text: #b0b6c1; /* Muted gray text */

  /* Border Colors */
  --border-primary: #0000001f;
  --border-secondary: #cbd5e1;
  --border-focus: #3b82f6;

  /* Brand Colors */
  --color-primary: #0c1a2f;
  --color-primary-hover: #0a1627;
  --color-primary-dark: #091223;
  --color-secondary: #c2185b;
  --color-accent: #2e7d32;
  --color-warning: #bf360c;
  --color-error: #c62828;
  --color-error-hover: #b71c1c;
  --color-info: #1565c0;
  --color-success: #2e7d32;

  /* Admin Template Expected Variables */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-variant: #f1f5f9;
  --color-text: #0f172a;
  --color-text-secondary: #334155;
  --color-border: #e2e8f0;

  /* On-color variables */
  --color-on-primary: #ffffff;
  --color-on-secondary: #ffffff;
  --color-on-success: #ffffff;
  --color-on-warning: #ffffff;
  --color-on-error: #ffffff;
  --color-on-surface: #0f172a;

  /* Shadow */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Alpha Colors */
  --color-primary-alpha-10: rgba(21, 101, 192, 0.1);
  --color-primary-alpha-15: rgba(12, 26, 47, 0.15);
  --color-primary-alpha-25: rgba(21, 101, 192, 0.25);
  --color-success-alpha-10: rgba(46, 125, 50, 0.1);
  --color-success-alpha-25: rgba(46, 125, 50, 0.25);
  --color-warning-alpha-10: rgba(191, 54, 12, 0.1);
  --color-error-alpha-10: rgba(198, 40, 40, 0.1);
  --color-error-alpha-25: rgba(198, 40, 40, 0.25);
  --color-error-alpha-30: rgba(198, 40, 40, 0.3);
  --bg-primary-alpha-10: rgba(255, 255, 255, 0.1);

  --sidebar-width: 56px; /* default sidebar width */
}
@media (min-width: 1920px) {
  :root {
    --sidebar-width: 88px; /* desktop-xl sidebar width */
  }
}

/* Light theme specific overrides (when data-theme="light" is set) */
:root[data-theme="light"] {
  /* Background Colors */
  --bg-primary: #fbfaf8;
  --bg-secondary: #f8fafc;
  --bg-tertiary: #f1f5f9;
  --bg-card: #fbfaf8;
  --bg-hover: #f1f5f9;
  --bg-muted: #757575;
  --bg-white: #fffffe;
  --bg-transparent-grey: #0000000f;
  --bg-card-hover: #f9ecd2;

  /* Text Colors */
  --text-primary: #0f172a;
  --text-secondary: #475569;
  --text-tertiary: #64748b;
  --text-muted: #94a3b8;

  /* Disabled State Colors */
  --button-disabled-bg: #e5e7eb; /* Muted light gray background */
  --button-disabled-text: #b0b6c1; /* Muted gray text */

  /* Border Colors */
  --border-primary: #e2e8f0;
  --border-secondary: #cbd5e1;
  --border-focus: #3b82f6;

  /* Brand Colors - Optimized for Light Theme Accessibility */
  --color-primary: #0c1a2f; /* Darker blue for better contrast */
  --color-primary-hover: #0a1627;
  --color-primary-dark: #091223;
  --color-secondary: #c2185b; /* Darker pink for better contrast */
  --color-accent: #2e7d32; /* Darker green for better contrast */
  --color-warning: #bf360c; /* Dark orange-red for WCAG AA compliance */
  --color-error: #c62828; /* Darker red for better contrast */
  --color-info: #1565c0; /* Darker blue for better contrast */
  --color-success: #2e7d32; /* Darker green for better contrast */

  /* Admin Template Expected Variables - Light Theme */
  --color-bg: #ffffff;
  --color-surface: #ffffff;
  --color-surface-variant: #f1f5f9; /* Slightly darker for better text contrast */
  --color-text: #0f172a;
  --color-text-secondary: #334155; /* Darker for better contrast */
  --color-border: #e2e8f0;

  /* On-color variables for text on colored backgrounds */
  --color-on-primary: #ffffff;
  --color-on-secondary: #ffffff;
  --color-on-success: #ffffff;
  --color-on-warning: #ffffff;
  --color-on-error: #ffffff;
  --color-on-surface: #0f172a;

  /* Shadow */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1),
    0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Alpha Colors for backgrounds and overlays */
  --color-primary-alpha-10: rgba(21, 101, 192, 0.1);
  --color-primary-alpha-15: rgba(12, 26, 47, 0.15);
  --color-primary-alpha-25: rgba(21, 101, 192, 0.25);
  --color-primary-alpha-30: rgba(12, 26, 47, 0.3);
  --color-success-alpha-10: rgba(46, 125, 50, 0.1);
  --color-success-alpha-25: rgba(46, 125, 50, 0.25);
  --color-warning-alpha-10: rgba(191, 54, 12, 0.1);
  --color-error-alpha-10: rgba(198, 40, 40, 0.1);
  --color-error-alpha-25: rgba(198, 40, 40, 0.25);
  --color-error-alpha-30: rgba(198, 40, 40, 0.3);
  --bg-primary-alpha-10: rgba(255, 255, 255, 0.1);
}

/* Light theme specific component styles */
:root[data-theme="light"] .theme-card {
  background-color: var(--bg-card);
  border: 1px solid var(--border-primary);
  box-shadow: var(--shadow-md);
}

:root[data-theme="light"] .theme-text {
  color: var(--text-primary);
}

:root[data-theme="light"] .theme-text-secondary {
  color: var(--text-secondary);
}

:root[data-theme="light"] .theme-bg {
  background-color: var(--bg-primary);
}

:root[data-theme="light"] .theme-bg-secondary {
  background-color: var(--bg-secondary);
}

:root[data-theme="light"] .theme-border {
  border-color: var(--border-primary);
}

:root[data-theme="light"] .theme-button-primary {
  background-color: var(--color-primary);
  color: var(--bg-primary);
}

:root[data-theme="light"] .theme-button-primary:hover {
  background-color: var(--color-primary-hover);
}
