/**
 * CSS Variables - Design System
 * All colors, spacing, typography defined here for consistency
 */

:root {
  /* Color Palette */
  --color-primary: #FF0D40;
  --color-primary-hover: #E60B39;
  --color-primary-light: #FFE5EA;
  --color-primary-dark: #CC0A33;

  --color-secondary: #64748b;
  --color-secondary-hover: #475569;
  --color-secondary-light: #f1f5f9;

  --color-success: #10b981;
  --color-success-light: #d1fae5;
  --color-warning: #f59e0b;
  --color-warning-light: #fef3c7;
  --color-danger: #ef4444;
  --color-danger-light: #fee2e2;
  --color-info: #3b82f6;
  --color-info-light: #dbeafe;

  /* Neutral Colors */
  --color-white: #ffffff;
  --color-gray-50: #f8fafc;
  --color-gray-100: #f1f5f9;
  --color-gray-200: #e2e8f0;
  --color-gray-300: #cbd5e1;
  --color-gray-400: #94a3b8;
  --color-gray-500: #64748b;
  --color-gray-600: #475569;
  --color-gray-700: #334155;
  --color-gray-800: #1e293b;
  --color-gray-900: #0f172a;
  --color-black: #000000;

  /* Sidebar */
  --sidebar-width: 72px;
  --sidebar-expanded-width: 240px;
  --sidebar-bg: var(--color-gray-900);
  --sidebar-item-hover: rgba(255, 255, 255, 0.1);
  --sidebar-item-active: var(--color-primary);
  --sidebar-text: var(--color-gray-400);
  --sidebar-text-active: var(--color-white);

  /* Typography */
  --font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen,
    Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  --font-family-mono: 'SF Mono', 'Monaco', 'Menlo', 'Consolas', monospace;

  --font-size-xs: 0.75rem;
  --font-size-sm: 0.875rem;
  --font-size-base: 1rem;
  --font-size-lg: 1.125rem;
  --font-size-xl: 1.25rem;
  --font-size-2xl: 1.5rem;
  --font-size-3xl: 1.875rem;

  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.25;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.75;

  /* Spacing */
  --spacing-0: 0;
  --spacing-1: 0.25rem;
  --spacing-2: 0.5rem;
  --spacing-3: 0.75rem;
  --spacing-4: 1rem;
  --spacing-5: 1.25rem;
  --spacing-6: 1.5rem;
  --spacing-8: 2rem;
  --spacing-10: 2.5rem;
  --spacing-12: 3rem;
  --spacing-16: 4rem;

  /* Border Radius */
  --radius-sm: 0.25rem;
  --radius-md: 0.375rem;
  --radius-lg: 0.5rem;
  --radius-xl: 0.75rem;
  --radius-2xl: 1rem;
  --radius-full: 9999px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

  /* Transitions */
  --transition-fast: 150ms ease;
  --transition-normal: 200ms ease;
  --transition-slow: 300ms ease;

  /* Z-Index */
  --z-dropdown: 1000;
  --z-sticky: 1020;
  --z-modal-backdrop: 1040;
  --z-modal: 1050;
  --z-popover: 1060;
  --z-tooltip: 1070;

  /* Page Layout */
  --page-max-width: 1400px;
  --page-padding: var(--spacing-6);
  --header-height: 60px;

  /* macOS titlebar area */
  --titlebar-height: 38px;

  /* Bootstrap Primary Color Overrides */
  --bs-primary: #FF0D40;
  --bs-primary-rgb: 255, 13, 64;
  --bs-link-color: #FF0D40;
  --bs-link-color-rgb: 255, 13, 64;
  --bs-link-hover-color: #CC0A33;
  --bs-link-hover-color-rgb: 204, 10, 51;
}

/* Bootstrap Button Overrides */
.btn-primary {
  --bs-btn-bg: #FF0D40;
  --bs-btn-border-color: #FF0D40;
  --bs-btn-hover-bg: #E60B39;
  --bs-btn-hover-border-color: #E60B39;
  --bs-btn-active-bg: #CC0A33;
  --bs-btn-active-border-color: #CC0A33;
  --bs-btn-disabled-bg: #FF0D40;
  --bs-btn-disabled-border-color: #FF0D40;
}

.btn-outline-primary {
  --bs-btn-color: #FF0D40;
  --bs-btn-border-color: #FF0D40;
  --bs-btn-hover-bg: #FF0D40;
  --bs-btn-hover-border-color: #FF0D40;
  --bs-btn-active-bg: #E60B39;
  --bs-btn-active-border-color: #E60B39;
}

/* Bootstrap Focus Ring */
.btn:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(255, 13, 64, 0.25);
}

/* Bootstrap Spinner */
.spinner-border.text-primary {
  color: #FF0D40 !important;
}

/* Bootstrap Form Controls Focus */
.form-control:focus,
.form-select:focus {
  border-color: #FF0D40;
  box-shadow: 0 0 0 0.25rem rgba(255, 13, 64, 0.25);
}

/* Bootstrap Checkbox/Radio */
.form-check-input:checked {
  background-color: #FF0D40;
  border-color: #FF0D40;
}

.form-check-input:focus {
  border-color: #FF0D40;
  box-shadow: 0 0 0 0.25rem rgba(255, 13, 64, 0.25);
}

/* Dark mode overrides */
[data-theme="dark"] {
  --color-white: #0f172a;
  --color-gray-50: #1e293b;
  --color-gray-100: #334155;
  --color-gray-200: #475569;
  --color-gray-300: #64748b;
  --color-gray-400: #94a3b8;
  --color-gray-500: #cbd5e1;
  --color-gray-600: #e2e8f0;
  --color-gray-700: #f1f5f9;
  --color-gray-800: #f8fafc;
  --color-gray-900: #ffffff;
}
