/* Brand Color Palette Implementation - AptitudeFlow
 * Primary: #2563eb (blue) - buttons, links, highlights
 * Green: #22c55e - important accents, call-to-action complements
 * Gold/Orange: #f59e42 - secondary buttons, notifications, visual emphasis
 * Background: #f3f4f6 (soft gray) - general background
 * White: #ffffff - cards and containers
 * Text: #1e293b (deep navy) - main text, headers, critical information
 */

/* CSS Custom Properties for Brand Colors */
:root {
  --brand-primary: #2563eb;
  --brand-primary-hover: #1d4ed8;
  --brand-primary-light: rgba(37, 99, 235, 0.1);
  
  --brand-accent: #22c55e;
  --brand-accent-hover: #16a34a;
  --brand-accent-light: rgba(34, 197, 94, 0.1);
  
  --brand-secondary: #f59e42;
  --brand-secondary-hover: #f97316;
  --brand-secondary-light: rgba(245, 158, 66, 0.1);
  
  --brand-background: #f3f4f6;
  --brand-surface: #ffffff;
  --brand-text: #1e293b;
  --brand-text-light: #64748b;
  
  --brand-border: #e5e7eb;
  --brand-border-hover: #d1d5db;
}

/* Enhanced Form Field Styling */
input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="tel"]:focus,
input[type="date"]:focus,
textarea:focus,
select:focus {
  border-color: var(--brand-primary) !important;
  box-shadow: 0 0 0 3px var(--brand-primary-light) !important;
  outline: none !important;
}

/* Enhanced Link Styling */
a:not(.mbtns):not(.cartBtn):not(button) {
  color: var(--brand-primary);
  transition: color 0.3s ease;
}

a:not(.mbtns):not(.cartBtn):not(button):hover {
  color: var(--brand-primary-hover);
}

/* Secondary Button Variations */
.btn-secondary,
.mbtns-secondary {
  background-color: var(--brand-secondary) !important;
  color: #ffffff !important;
}

.btn-secondary:hover,
.mbtns-secondary:hover {
  background-color: var(--brand-secondary-hover) !important;
  color: #ffffff !important;
}

/* Notification and Alert Styling */
.alert-success,
.status-success {
  background-color: var(--brand-accent-light) !important;
  border-color: var(--brand-accent) !important;
  color: #166534 !important;
}

.alert-warning,
.status-warning {
  background-color: var(--brand-secondary-light) !important;
  border-color: var(--brand-secondary) !important;
  color: #92400e !important;
}

.alert-info,
.status-info {
  background-color: var(--brand-primary-light) !important;
  border-color: var(--brand-primary) !important;
  color: #1e3a8a !important;
}

/* Icon and Symbol Color Coordination */
.icon-primary,
svg.primary {
  color: var(--brand-primary);
  fill: var(--brand-primary);
}

.icon-accent,
svg.accent {
  color: var(--brand-accent);
  fill: var(--brand-accent);
}

.icon-secondary,
svg.secondary {
  color: var(--brand-secondary);
  fill: var(--brand-secondary);
}

/* Enhanced Hover States for Interactive Elements */
.interactive-element:hover,
.clickable:hover {
  background-color: var(--brand-primary-light);
  border-color: var(--brand-primary);
  cursor: pointer;
}

/* Table and Data Display Enhancements */
table th {
  background-color: var(--brand-primary) !important;
  color: #ffffff !important;
}

table tr:hover {
  background-color: var(--brand-primary-light);
}

/* Progress and Status Indicators */
.progress-primary .progress-bar {
  background-color: var(--brand-primary);
}

.progress-accent .progress-bar {
  background-color: var(--brand-accent);
}

.progress-secondary .progress-bar {
  background-color: var(--brand-secondary);
}

/* Accessibility Improvements */
/* Ensure sufficient color contrast ratios */
.high-contrast {
  color: var(--brand-text);
  background-color: var(--brand-surface);
}

.high-contrast-reverse {
  color: var(--brand-surface);
  background-color: var(--brand-text);
}

/* Focus indicators for keyboard navigation */
*:focus {
  outline: 2px solid var(--brand-primary);
  outline-offset: 2px;
}

/* Skip to main content for accessibility */
.skip-link {
  position: absolute;
  top: -40px;
  left: 6px;
  background: var(--brand-primary);
  color: var(--brand-surface);
  padding: 8px;
  text-decoration: none;
  transition: top 0.3s;
}

.skip-link:focus {
  top: 6px;
}

/* Error states */
.error,
.field-error {
  border-color: #dc2626 !important;
  background-color: rgba(220, 38, 38, 0.05) !important;
}

.error-text {
  color: #dc2626 !important;
}

/* Success states */
.success,
.field-success {
  border-color: var(--brand-accent) !important;
  background-color: var(--brand-accent-light) !important;
}

/* Responsive Design Enhancements */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode support (if needed in the future) */
@media (prefers-color-scheme: dark) {
  :root {
    --brand-background: #0f172a;
    --brand-surface: #1e293b;
    --brand-text: #f1f5f9;
    --brand-text-light: #94a3b8;
    --brand-border: #334155;
    --brand-border-hover: #475569;
  }
}