/*
 * Cookiewise Aurora Theme
 * Warm indigo + amber, gradients, glassmorphism, dark-mode native
 */
[data-theme="aurora"] {
  --cw-primary: 99 102 241;
  --cw-primary-hover: 79 70 229;
  --cw-primary-light: 224 231 255;
  --cw-primary-dark: 67 56 202;
  --cw-secondary: 245 158 11;
  --cw-secondary-hover: 217 119 6;
  --cw-accent: 20 184 166;
  --cw-accent-hover: 13 148 136;
  --cw-bg: 250 250 249;
  --cw-bg-alt: 245 245 244;
  --cw-bg-elevated: 255 255 255;
  --cw-surface: 255 255 255;
  --cw-surface-hover: 250 250 249;
  --cw-dash-bg: 15 23 42;
  --cw-dash-sidebar: 15 23 42;
  --cw-dash-sidebar-text: 148 163 184;
  --cw-dash-sidebar-active-bg: 99 102 241;
  --cw-dash-sidebar-active-text: 255 255 255;
  --cw-dash-topbar: 30 41 59;
  --cw-dash-card: 30 41 59;
  --cw-text: 28 25 23;
  --cw-text-secondary: 120 113 108;
  --cw-text-muted: 168 162 158;
  --cw-text-inverse: 255 255 255;
  --cw-border: 231 229 228;
  --cw-border-hover: 214 211 209;
  --cw-shadow-sm: 0 1px 2px 0 rgba(99,102,241,0.05);
  --cw-shadow: 0 1px 3px 0 rgba(99,102,241,0.1), 0 1px 2px -1px rgba(99,102,241,0.06);
  --cw-shadow-lg: 0 10px 15px -3px rgba(99,102,241,0.1), 0 4px 6px -4px rgba(99,102,241,0.06);
  --cw-shadow-xl: 0 20px 25px -5px rgba(99,102,241,0.15), 0 8px 10px -6px rgba(99,102,241,0.08);
  --cw-radius-sm: 0.5rem;
  --cw-radius: 0.75rem;
  --cw-radius-lg: 1rem;
  --cw-radius-xl: 1.25rem;
  --cw-glass-bg: rgba(255, 255, 255, 0.7);
  --cw-glass-border: rgba(255, 255, 255, 0.3);
  --cw-gradient-hero: linear-gradient(135deg, #0F172A 0%, #1E1B4B 40%, #312E81 70%, #1E1B4B 100%);
  --cw-gradient-cta: linear-gradient(135deg, #6366F1 0%, #4F46E5 50%, #7C3AED 100%);
  --cw-gradient-text: linear-gradient(135deg, #818CF8, #F59E0B);
  --cw-success: 16 185 129;
  --cw-warning: 245 158 11;
  --cw-error: 239 68 68;
  --cw-info: 99 102 241;
  --cw-chart-1: #818CF8;
  --cw-chart-2: #F59E0B;
  --cw-chart-3: #14B8A6;
  --cw-chart-4: #F472B6;
  --cw-chart-5: #34D399;
  --cw-footer-bg: 15 23 42;
  --cw-footer-text: 148 163 184;
}

/* Force light text in hero (always has dark gradient bg) */
[data-theme="aurora"] .cw-hero {
  --cw-text: 248 250 252;
  --cw-text-secondary: 203 213 225;
  --cw-text-muted: 148 163 184;
}
[data-theme="aurora"] .cw-hero .cw-btn-secondary {
  color: rgba(255, 255, 255, 0.9);
  border-color: rgba(255, 255, 255, 0.25);
}
[data-theme="aurora"] .cw-hero .cw-btn-secondary:hover {
  background-color: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.45);
  color: #fff;
}

/* Aurora dark mode overrides for public pages */
[data-theme="aurora"].dark,
[data-theme="aurora"] .dark {
  --cw-bg: 15 23 42;
  --cw-bg-alt: 30 41 59;
  --cw-bg-elevated: 30 41 59;
  --cw-surface: 30 41 59;
  --cw-surface-hover: 51 65 85;
  --cw-text: 248 250 252;
  --cw-text-secondary: 203 213 225;
  --cw-text-muted: 148 163 184;
  --cw-border: 51 65 85;
  --cw-border-hover: 71 85 105;
  --cw-glass-bg: rgba(30, 41, 59, 0.7);
  --cw-glass-border: rgba(99, 102, 241, 0.15);
  --cw-shadow-sm: 0 1px 2px 0 rgba(0,0,0,0.3);
  --cw-shadow: 0 1px 3px 0 rgba(0,0,0,0.4), 0 1px 2px -1px rgba(0,0,0,0.3);
  --cw-shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.4), 0 4px 6px -4px rgba(0,0,0,0.3);
  --cw-shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.5), 0 8px 10px -6px rgba(0,0,0,0.4);
}

/* ===== Aurora-specific component styles ===== */

/* Animated gradient mesh background for hero */
[data-theme="aurora"] .cw-hero {
  background: var(--cw-gradient-hero);
  position: relative;
  overflow: hidden;
}
[data-theme="aurora"] .cw-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 600px 600px at 20% 50%, rgba(99,102,241,0.15), transparent),
    radial-gradient(ellipse 500px 500px at 80% 20%, rgba(245,158,11,0.1), transparent),
    radial-gradient(ellipse 400px 400px at 60% 80%, rgba(20,184,166,0.08), transparent);
  animation: cw-mesh-shift 12s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes cw-mesh-shift {
  0% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-20px, 10px) scale(1.05); }
  100% { transform: translate(10px, -15px) scale(1.02); }
}

/* Glassmorphism card */
[data-theme="aurora"] .cw-glass {
  background: var(--cw-glass-bg);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border: 1px solid var(--cw-glass-border);
}

/* Gradient text */
[data-theme="aurora"] .cw-gradient-text {
  background: var(--cw-gradient-text);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Shimmer button effect */
[data-theme="aurora"] .cw-btn-shimmer {
  position: relative;
  overflow: hidden;
}
[data-theme="aurora"] .cw-btn-shimmer::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255,255,255,0.15) 50%,
    transparent 100%
  );
  transform: rotate(30deg) translateX(-100%);
  transition: transform 0.6s ease;
}
[data-theme="aurora"] .cw-btn-shimmer:hover::after {
  transform: rotate(30deg) translateX(100%);
}

/* Glow ring for highlighted elements */
[data-theme="aurora"] .cw-glow {
  box-shadow:
    0 0 20px rgba(99,102,241,0.15),
    0 0 60px rgba(99,102,241,0.05);
}
[data-theme="aurora"] .cw-glow-amber {
  box-shadow:
    0 0 20px rgba(245,158,11,0.15),
    0 0 60px rgba(245,158,11,0.05);
}

/* Card hover lift */
[data-theme="aurora"] .cw-card-hover {
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.3s ease;
}
[data-theme="aurora"] .cw-card-hover:hover {
  transform: translateY(-4px) scale(1.01);
  box-shadow: var(--cw-shadow-xl);
}

/* Gradient border */
[data-theme="aurora"] .cw-gradient-border {
  position: relative;
  background: rgb(var(--cw-surface));
  border-radius: var(--cw-radius-lg);
}
[data-theme="aurora"] .cw-gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99,102,241,0.4), rgba(245,158,11,0.3), rgba(20,184,166,0.3));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

/* Sidebar active glow bar */
[data-theme="aurora"] .cw-nav-active {
  position: relative;
}
[data-theme="aurora"] .cw-nav-active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 4px;
  bottom: 4px;
  width: 3px;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(180deg, #818CF8, #6366F1);
  box-shadow: 0 0 8px rgba(99,102,241,0.5);
}

/* Stat card gradient accent border */
[data-theme="aurora"] .cw-stat-card {
  border-left: 3px solid transparent;
  transition: all 0.2s ease;
}
[data-theme="aurora"] .cw-stat-card:nth-child(1) { border-left-color: #818CF8; }
[data-theme="aurora"] .cw-stat-card:nth-child(2) { border-left-color: #F59E0B; }
[data-theme="aurora"] .cw-stat-card:nth-child(3) { border-left-color: #14B8A6; }
[data-theme="aurora"] .cw-stat-card:nth-child(4) { border-left-color: #F472B6; }

/* Skeleton shimmer animation */
@keyframes cw-shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}
[data-theme="aurora"] .cw-skeleton {
  background: linear-gradient(90deg,
    rgb(var(--cw-surface)) 25%,
    rgba(99,102,241,0.08) 50%,
    rgb(var(--cw-surface)) 75%
  );
  background-size: 200% 100%;
  animation: cw-shimmer 1.5s ease-in-out infinite;
  border-radius: var(--cw-radius);
}

/* Number counter animation */
@keyframes cw-count-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
[data-theme="aurora"] .cw-count-in {
  animation: cw-count-in 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* Scroll reveal */
@keyframes cw-reveal-up {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.cw-reveal {
  opacity: 0;
}
.cw-reveal.cw-visible {
  animation: cw-reveal-up 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.cw-reveal-delay-1 { animation-delay: 0.1s; }
.cw-reveal-delay-2 { animation-delay: 0.2s; }
.cw-reveal-delay-3 { animation-delay: 0.3s; }
.cw-reveal-delay-4 { animation-delay: 0.4s; }

/* Pulse animation for active badges */
@keyframes cw-pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
[data-theme="aurora"] .cw-pulse {
  animation: cw-pulse-dot 2s ease-in-out infinite;
}
