/**
 * CSS Reset & Browser Normalizations
 *
 * This file provides a modern CSS reset and browser normalizations.
 * Previously scattered across index.css and reset.css.
 *
 * Note: Opacity utilities have been moved to utilities.css
 */

/* ============================================================================
   MODERN CSS RESET
   ============================================================================ */

/* Universal box sizing and reset */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* HTML and Body setup */
html {
  width: 100%;
  height: 100%;
  overflow-x: hidden;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  width: 100%;
  min-height: 100%;
  overflow-x: hidden;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;

  /* Light mode: Subtle blue-tinted gradient background */
  background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 50%, #eef2ff 100%);
  background-attachment: fixed;
}

/* Dark mode: Deep blue-black gradient background */
.dark body {
  background: linear-gradient(135deg, #0f172a 0%, #020617 50%, #1e1b4b 100%);
  background-attachment: fixed;
}

/* Root container */
#root {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  position: relative;
}

/* Fix for images and media elements */
img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Form elements inherit font */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove default list styles */
ul,
ol {
  list-style: none;
}

/* Prevent text overflow */
p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
  -webkit-hyphens: auto;
          hyphens: auto;
}

/* Fix for absolute positioned elements */
main,
section,
article,
aside,
header,
footer,
nav {
  position: relative;
}

/* ============================================================================
   ACCESSIBILITY & PERFORMANCE
   ============================================================================ */

/* Ensure proper stacking context */
#root > * {
  position: relative;
  z-index: 1;
}

/* Fix for React Router warnings - add future flags support */
.router-transition * {
  transition: opacity 0.3s ease;
}

/* Layout Positioning Fix - Production CSS */

/* ==========================================================================
   LAYOUT STRUCTURE - Sidebar, TopNav, Main Content
   ========================================================================== */

.layout-wrapper {
  position: relative;
  min-height: 100vh;
  background-color: hsl(var(--background));
}

/* ==========================================================================
   SIDEBAR POSITIONING
   ========================================================================== */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 288px;
  height: 100vh;
  z-index: 40;
  background: hsl(var(--background-elevated));
  border-right: 1px solid hsl(var(--border));
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.2);
  overflow-y: auto;
  overflow-x: hidden;
  transition: transform 0.3s ease-in-out;
}

.sidebar::-webkit-scrollbar {
  width: 6px;
}

.sidebar::-webkit-scrollbar-track {
  background: hsl(var(--background));
}

.sidebar::-webkit-scrollbar-thumb {
  background: hsl(var(--border));
  border-radius: 3px;
}

@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
    width: 288px;
  }

  .sidebar.open {
    transform: translateX(0);
  }
}

@media (min-width: 769px) {
  .sidebar {
    transform: translateX(0);
  }
}

@media (min-width: 1440px) {
  .sidebar {
    width: 280px;
  }
}

/* ==========================================================================
   TOPNAV POSITIONING
   ========================================================================== */

.topnav {
  position: fixed;
  top: 0;
  left: 288px;
  right: 0;
  height: 64px;
  z-index: 50;
  background: hsl(var(--background-elevated));
  border-bottom: 1px solid hsl(var(--border));
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
  display: flex;
  align-items: center;
  padding: 0 1rem;
}

@media (max-width: 768px) {
  .topnav {
    left: 0;
    z-index: 50;
  }
}

@media (min-width: 1440px) {
  .topnav {
    left: 288px;
  }
}

/* ==========================================================================
   MAIN CONTENT AREA
   ========================================================================== */

.main-content {
  margin-left: 288px;
  margin-top: 64px;
  min-height: calc(100vh - 64px);
  background: hsl(var(--background));
  position: relative;
  z-index: 1;
  padding: 0;
}

@media (max-width: 768px) {
  .main-content {
    margin-left: 0;
    width: 100%;
  }
}

@media (min-width: 1440px) {
  .main-content {
    margin-left: 288px;
  }
}

/* ==========================================================================
   MOBILE OVERLAY
   ========================================================================== */

.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 30;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.3s ease-in-out,
    visibility 0.3s ease-in-out;
}

.sidebar-overlay.active {
  opacity: 1;
  visibility: visible;
}

@media (min-width: 769px) {
  .sidebar-overlay {
    display: none !important;
  }
}

/* ==========================================================================
   APP CONTAINER SYSTEM
   ========================================================================== */

.app-container {
  width: 100%;
  margin: 0 auto;
  padding-left: 1rem;
  padding-right: 1rem;
}

@media (min-width: 640px) {
  .app-container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

@media (min-width: 1024px) {
  .app-container {
    padding-left: 2rem;
    padding-right: 2rem;
  }
}

.app-container-sm {
  max-width: 768px;
}

.app-container-md {
  max-width: 1024px;
}

.app-container-lg {
  max-width: 1152px;
}

.app-container-xl {
  max-width: 1280px;
}

.app-container-2xl {
  max-width: 1536px;
}

/* ==========================================================================
   Z-INDEX MANAGEMENT
   ========================================================================== */

.z-sidebar {
  z-index: 40;
}

.z-topnav {
  z-index: 50;
}

.z-overlay {
  z-index: 30;
}

.z-dropdown {
  z-index: 60;
}

.z-modal {
  z-index: 70;
}

.z-tooltip {
  z-index: 80;
}

.z-toast {
  z-index: 90;
}

/* ==========================================================================
   LAYOUT ANIMATIONS
   ========================================================================== */

.layout-transition {
  transition:
    margin-left 0.3s ease-in-out,
    margin-top 0.3s ease-in-out,
    width 0.3s ease-in-out;
}

/* ==========================================================================
   ACCESSIBILITY & RESPONSIVE
   ========================================================================== */

/* Global Focus Indicators - WCAG 2.2 Compliant */
*:focus-visible {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Dark theme focus indicators */
.dark *:focus-visible,
[data-theme='dark'] *:focus-visible {
  outline-color: #60a5fa;
}

/* Brand theme focus indicators (blue) */
.brand-focus:focus-visible,
[data-user-type='brand'] button:focus-visible,
[data-user-type='brand'] a:focus-visible {
  outline-color: #1a8aff;
  box-shadow: 0 0 0 4px rgba(26, 138, 255, 0.2);
}

/* Affiliate theme focus indicators (emerald) */
.affiliate-focus:focus-visible,
[data-user-type='affiliate'] button:focus-visible,
[data-user-type='affiliate'] a:focus-visible {
  outline-color: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* High contrast focus for better visibility */
.focus-ring-visible:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
}

/* Remove default outline for mouse users, keep for keyboard */
button:focus:not(:focus-visible),
a:focus:not(:focus-visible),
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

@media (prefers-reduced-motion: reduce) {
  .sidebar,
  .sidebar-overlay,
  .layout-transition {
    transition: none !important;
  }
}

@media (prefers-contrast: high) {
  .sidebar {
    border-right: 2px solid #000000;
  }

  .topnav {
    border-bottom: 2px solid #000000;
  }
}

@media print {
  .sidebar,
  .topnav,
  .sidebar-overlay {
    display: none !important;
  }

  .main-content {
    margin-left: 0 !important;
    margin-top: 0 !important;
  }

  .app-container {
    max-width: none !important;
    padding: 0 !important;
  }
}

/**
 * Utilities - Utility Classes & Animations
 *
 * This file consolidates utility classes from:
 * - background.css (gradients, glass morphism, animations)
 * - reset.css (opacity utilities)
 * - unifiedDesignSystem.css (responsive utilities, grid layouts)
 * - navigation-fixes.css (notification pulse)
 *
 * Organization:
 * 1. Opacity Utilities
 * 2. Background & Gradient Utilities
 * 3. Glass Morphism Effects
 * 4. Grid Layout Utilities
 * 5. Responsive Utilities
 * 6. Animation Utilities
 * 7. Keyframe Animations
 */

/* ============================================================================
   OPACITY UTILITIES
   ============================================================================ */

:root {
  --opacity-0: 0;
  --opacity-10: 0.1;
  --opacity-20: 0.2;
  --opacity-30: 0.3;
  --opacity-40: 0.4;
  --opacity-50: 0.5;
  --opacity-60: 0.6;
  --opacity-70: 0.7;
  --opacity-80: 0.8;
  --opacity-90: 0.9;
  --opacity-100: 1;
}

.opacity-0 {
  opacity: 0 !important;
}
.opacity-10 {
  opacity: 0.1 !important;
}
.opacity-20 {
  opacity: 0.2 !important;
}
.opacity-30 {
  opacity: 0.3 !important;
}
.opacity-40 {
  opacity: 0.4 !important;
}
.opacity-50 {
  opacity: 0.5 !important;
}
.opacity-60 {
  opacity: 0.6 !important;
}
.opacity-70 {
  opacity: 0.7 !important;
}
.opacity-80 {
  opacity: 0.8 !important;
}
.opacity-90 {
  opacity: 0.9 !important;
}
.opacity-100 {
  opacity: 1 !important;
}

/* ============================================================================
   BACKGROUND & GRADIENT UTILITIES
   ============================================================================ */

/* Note: Tailwind @layer utilities moved to index.css for proper processing */

/* ============================================================================
   GLASS MORPHISM EFFECTS
   ============================================================================ */

/* Note: Glass morphism utilities moved to index.css for proper Tailwind processing */

/* ============================================================================
   GRID LAYOUT UTILITIES
   ============================================================================ */

.dashboard-grid {
  display: grid;
  gap: 1.5rem;
}

.dashboard-grid-cols-1 {
  grid-template-columns: repeat(1, minmax(0, 1fr));
}

@media (min-width: 768px) {
  .dashboard-grid-cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .dashboard-grid-cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid-cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1536px) {
  .dashboard-grid-cols-5 {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

/* ============================================================================
   RESPONSIVE UTILITIES
   ============================================================================ */

.hide-mobile {
  display: none;
}

@media (min-width: 768px) {
  .hide-mobile {
    display: block;
  }
}

.show-mobile {
  display: block;
}

@media (min-width: 768px) {
  .show-mobile {
    display: none;
  }
}

/* ============================================================================
   ANIMATION UTILITIES
   ============================================================================ */

.animate-float {
  animation: float 6s ease-in-out infinite;
}

.animate-gradient {
  animation: gradient-shift 8s ease-in-out infinite;
}

.animate-shimmer {
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.2) 50%,
    transparent 100%
  );
  background-size: 2000px 100%;
  animation: shimmer 2s linear infinite;
}

/* Notification Pulse */
.notification-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ============================================================================
   HOVER & INTERACTION UTILITIES
   Phase 5 - Micro-interactions & Polish
   ============================================================================ */

/**
 * Standardized hover interactions with consistent timing and effects
 *
 * Timing Standards:
 * - Fast: 150ms - Quick feedback (buttons, toggles)
 * - Standard: 200ms - Default interaction (most UI elements)
 * - Smooth: 250ms - Gentle transitions (cards, panels)
 *
 * Performance:
 * - Uses will-change for transform/opacity animations
 * - GPU-accelerated via transform: translateZ(0)
 */

/* Base Hover Transition Speeds */
.hover-transition-fast {
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-transition-standard {
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-transition-smooth {
  transition-duration: 250ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hover Lift Effects - Elevate element with shadow */
.hover-lift-sm,
.hover-lift-md,
.hover-lift-lg,
.hover-card {
  transition-property: transform, box-shadow;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

.hover-lift-sm:hover {
  transform: translateY(-2px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.08),
    0 2px 4px rgba(0, 0, 0, 0.06);
}

.hover-lift-md:hover,
.hover-card:hover {
  transform: translateY(-4px);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.1),
    0 3px 6px rgba(0, 0, 0, 0.08);
}

.hover-lift-lg:hover {
  transform: translateY(-6px);
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.12),
    0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Dark mode lift shadows */
.dark .hover-lift-sm:hover {
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.3),
    0 2px 4px rgba(0, 0, 0, 0.2);
}

.dark .hover-lift-md:hover,
.dark .hover-card:hover {
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.4),
    0 3px 6px rgba(0, 0, 0, 0.3);
}

.dark .hover-lift-lg:hover {
  box-shadow:
    0 12px 28px rgba(0, 0, 0, 0.5),
    0 4px 8px rgba(0, 0, 0, 0.4);
}

/* Hover Scale Effects - Subtle zoom */
.hover-scale-sm,
.hover-scale-md,
.hover-scale-lg {
  transition-property: transform;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.hover-scale-sm:hover {
  transform: scale(1.02);
}

.hover-scale-md:hover {
  transform: scale(1.05);
}

.hover-scale-lg:hover {
  transform: scale(1.08);
}

/* Hover Glow Effects - Shadow-based glow */
.hover-glow-primary,
.hover-glow-success,
.hover-glow-warning,
.hover-glow-destructive {
  transition-property: box-shadow;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  will-change: box-shadow;
}

.hover-glow-primary:hover {
  box-shadow:
    0 0 0 3px hsl(var(--primary) / 0.15),
    0 4px 12px hsl(var(--primary) / 0.2);
}

.hover-glow-success:hover {
  box-shadow:
    0 0 0 3px hsl(var(--success) / 0.15),
    0 4px 12px hsl(var(--success) / 0.2);
}

.hover-glow-warning:hover {
  box-shadow:
    0 0 0 3px hsl(var(--warning) / 0.15),
    0 4px 12px hsl(var(--warning) / 0.2);
}

.hover-glow-destructive:hover {
  box-shadow:
    0 0 0 3px hsl(var(--destructive) / 0.15),
    0 4px 12px hsl(var(--destructive) / 0.2);
}

/* Hover Brightness - Subtle color shifts */
.hover-brighten {
  transition-property: filter;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  will-change: filter;
}

.hover-brighten:hover {
  filter: brightness(1.05);
}

.hover-brighten-md:hover {
  filter: brightness(1.1);
}

/* Hover Opacity - Fade effects */
.hover-opacity-80 {
  transition-property: opacity;
  transition-duration: 150ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.hover-opacity-80:hover {
  opacity: 0.8;
}

.hover-opacity-60:hover {
  opacity: 0.6;
}

/* Combined Effects - Lift + Scale */
.hover-lift-scale-sm {
  transition-property: transform, box-shadow;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

.hover-lift-scale-sm:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow:
    0 6px 16px rgba(0, 0, 0, 0.1),
    0 2px 4px rgba(0, 0, 0, 0.06);
}

/* Combined Effects - Lift + Glow */
.hover-lift-glow-primary {
  transition-property: transform, box-shadow;
  transition-duration: 200ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform, box-shadow;
}

.hover-lift-glow-primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 0 0 3px hsl(var(--primary) / 0.15),
    0 8px 20px hsl(var(--primary) / 0.15);
}

/* Active States - Click feedback */
.active-scale-down {
  transition-property: transform;
  transition-duration: 100ms;
  transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.active-scale-down:active {
  transform: scale(0.95);
}

.active-scale-down-sm:active {
  transform: scale(0.98);
}

/* Focus States - Keyboard navigation */
.focus-ring-primary:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

.focus-ring-inset:focus-visible {
  outline: 2px solid hsl(var(--primary));
  outline-offset: -2px;
}

/* Accessibility - Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .hover-lift-sm,
  .hover-lift-md,
  .hover-lift-lg,
  .hover-card,
  .hover-scale-sm,
  .hover-scale-md,
  .hover-scale-lg,
  .hover-lift-scale-sm,
  .hover-lift-glow-primary,
  .hover-brighten,
  .active-scale-down,
  .active-scale-down-sm {
    transition-duration: 0ms;
    will-change: auto;
  }

  .hover-lift-sm:hover,
  .hover-lift-md:hover,
  .hover-lift-lg:hover,
  .hover-card:hover,
  .hover-scale-sm:hover,
  .hover-scale-md:hover,
  .hover-scale-lg:hover,
  .hover-lift-scale-sm:hover,
  .hover-lift-glow-primary:hover {
    transform: none;
  }
}

/* ============================================================================
   LOADING TRANSITIONS & ANIMATIONS
   Phase 5 - Task 5.2: Loading Transitions
   ============================================================================ */

/**
 * Loading animations for spinners, skeletons, and progress indicators
 *
 * Animations:
 * - Shimmer: Left-to-right shine effect for skeletons
 * - Progress Indeterminate: Sliding animation for progress bars
 * - Fade In/Out: Smooth content transitions
 * - Skeleton Pulse: Breathing animation for loading placeholders
 *
 * Performance:
 * - GPU-accelerated transforms
 * - Reduced motion support
 */

/* Shimmer Animation - Skeleton loading effect */
@keyframes shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.animate-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

/* Dark mode shimmer */
.dark .animate-shimmer {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.1) 50%,
    rgba(255, 255, 255, 0) 100%
  );
}

/* Indeterminate Progress Animation */
@keyframes progress-indeterminate {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(400%);
  }
}

.animate-progress-indeterminate {
  animation: progress-indeterminate 1.5s ease-in-out infinite;
}

/* Striped Progress Bar Pattern */
@keyframes progress-stripe {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 40px 0;
  }
}

.bg-stripe {
  background-image: repeating-linear-gradient(
    45deg,
    transparent,
    transparent 10px,
    rgba(255, 255, 255, 0.1) 10px,
    rgba(255, 255, 255, 0.1) 20px
  );
  background-size: 40px 40px;
  animation: progress-stripe 1s linear infinite;
}

/* Fade Transitions */
.fade-in {
  animation: fade-in 300ms ease-in;
}

.fade-out {
  animation: fade-out 300ms ease-out;
}

.fade-in-fast {
  animation: fade-in 150ms ease-in;
}

.fade-out-fast {
  animation: fade-out 150ms ease-out;
}

.fade-in-slow {
  animation: fade-in 500ms ease-in;
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fade-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

/* Slide Fade Transitions - Combined fade + slide */
.slide-fade-in-up {
  animation: slide-fade-in-up 400ms ease-out;
}

.slide-fade-in-down {
  animation: slide-fade-in-down 400ms ease-out;
}

.slide-fade-out-up {
  animation: slide-fade-out-up 300ms ease-in;
}

.slide-fade-out-down {
  animation: slide-fade-out-down 300ms ease-in;
}

@keyframes slide-fade-in-up {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-fade-in-down {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slide-fade-out-up {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-20px);
  }
}

@keyframes slide-fade-out-down {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(20px);
  }
}

/* Scale Fade Transitions */
.scale-fade-in {
  animation: scale-fade-in 300ms ease-out;
}

.scale-fade-out {
  animation: scale-fade-out 200ms ease-in;
}

@keyframes scale-fade-in {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes scale-fade-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.95);
  }
}

/* Skeleton Loading States */
.skeleton {
  background: linear-gradient(
    90deg,
    rgba(229, 231, 235, 1) 0%,
    rgba(243, 244, 246, 1) 50%,
    rgba(229, 231, 235, 1) 100%
  );
  background-size: 200% 100%;
  animation: skeleton-pulse 2s ease-in-out infinite;
}

.dark .skeleton {
  background: linear-gradient(
    90deg,
    rgba(55, 65, 81, 1) 0%,
    rgba(75, 85, 99, 1) 50%,
    rgba(55, 65, 81, 1) 100%
  );
}

@keyframes skeleton-pulse {
  0%,
  100% {
    background-position: 0% 0%;
  }
  50% {
    background-position: 100% 0%;
  }
}

/* Loading Overlay Transitions */
.loading-overlay-enter {
  animation: fade-in 200ms ease-in;
}

.loading-overlay-exit {
  animation: fade-out 200ms ease-out;
}

/* Spinner Rotation (smooth) */
@keyframes spinner-rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.animate-spinner {
  animation: spinner-rotate 1s linear infinite;
}

/* Content Transition - Skeleton to Content */
.content-transition-enter {
  animation: content-fade-in 400ms ease-out;
}

@keyframes content-fade-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Reduced Motion - Loading Animations */
@media (prefers-reduced-motion: reduce) {
  .animate-shimmer,
  .animate-progress-indeterminate,
  .bg-stripe,
  .fade-in,
  .fade-out,
  .fade-in-fast,
  .fade-out-fast,
  .fade-in-slow,
  .slide-fade-in-up,
  .slide-fade-in-down,
  .slide-fade-out-up,
  .slide-fade-out-down,
  .scale-fade-in,
  .scale-fade-out,
  .skeleton,
  .loading-overlay-enter,
  .loading-overlay-exit,
  .animate-spinner,
  .content-transition-enter {
    animation: none !important;
    transition: opacity 0ms !important;
  }

  /* For reduced motion, show instant opacity changes only */
  .fade-in,
  .fade-in-fast,
  .fade-in-slow,
  .slide-fade-in-up,
  .slide-fade-in-down,
  .scale-fade-in,
  .loading-overlay-enter,
  .content-transition-enter {
    opacity: 1;
    transform: none;
  }

  .fade-out,
  .fade-out-fast,
  .slide-fade-out-up,
  .slide-fade-out-down,
  .scale-fade-out,
  .loading-overlay-exit {
    opacity: 0;
    transform: none;
  }
}

/* ============================================================================
   KEYFRAME ANIMATIONS
   ============================================================================ */

/* Float Animation */
@keyframes float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-10px);
  }
}

/* Gradient Shift Animation */
@keyframes gradient-shift {
  0%,
  100% {
    transform: translate(0, 0);
    opacity: 0.5;
  }
  50% {
    transform: translate(-10px, -10px);
    opacity: 0.8;
  }
}

/* Shimmer Animation */
@keyframes shimmer {
  0% {
    background-position: -1000px 0;
  }
  100% {
    background-position: 1000px 0;
  }
}

/* Pulse Animation */
@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

/* Toast Animations */
@keyframes toast-slide-in-right {
  from {
    transform: translateX(calc(100% + 1rem));
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes toast-slide-out-right {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(calc(100% + 1rem));
    opacity: 0;
  }
}

@keyframes toast-slide-in-bottom {
  from {
    transform: translateY(calc(100% + 1rem));
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes toast-swipe-out {
  from {
    transform: translateX(var(--radix-toast-swipe-end-x));
  }
  to {
    transform: translateX(calc(100% + 1rem));
  }
}

.animate-toast-slide-in {
  animation: toast-slide-in-right 150ms cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-toast-slide-out {
  animation: toast-slide-out-right 100ms ease-in;
}

.animate-toast-swipe {
  animation: toast-swipe-out 100ms ease-out;
}

/* Success Checkmark Animation */
@keyframes success-checkmark {
  0% {
    stroke-dashoffset: 100;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

@keyframes success-circle {
  0% {
    stroke-dashoffset: 166;
  }
  100% {
    stroke-dashoffset: 0;
  }
}

.animate-success-checkmark {
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: success-checkmark 0.3s ease-in-out 0.1s forwards;
}

.animate-success-circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: success-circle 0.6s cubic-bezier(0.65, 0, 0.45, 1) forwards;
}

/* Confetti Animation */
@keyframes confetti-fall {
  0% {
    transform: translateY(0) rotate(0deg);
    opacity: 1;
  }
  100% {
    transform: translateY(100vh) rotate(720deg);
    opacity: 0;
  }
}

.animate-confetti {
  animation: confetti-fall 3s ease-in forwards;
}

/* Celebration Animation */
@keyframes celebrate-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  25% {
    transform: translateY(-20px);
  }
  50% {
    transform: translateY(-10px);
  }
  75% {
    transform: translateY(-5px);
  }
}

.animate-celebrate {
  animation: celebrate-bounce 0.6s ease-out;
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
  .animate-float,
  .animate-gradient,
  .animate-shimmer,
  .notification-pulse,
  .animate-toast-slide-in,
  .animate-toast-slide-out,
  .animate-toast-swipe,
  .animate-success-checkmark,
  .animate-success-circle,
  .animate-confetti,
  .animate-celebrate {
    animation: none;
  }
}

