/* Unified Loading System for Trade Tracker */
/* Single, consistent loading pattern with glassmorphic overlay */

/* ===== UNIFIED GLASSMORPHIC OVERLAY ===== */
/* Content-area overlay with pink theme tint, positioned below header */
/* Note: z-index set to 9998 to allow welcome modal (9999+) to appear above */
.unified-loader-overlay {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(30, 30, 30, 0.85) 0%,
    rgba(255, 182, 193, 0.1) 50%,
    rgba(30, 30, 30, 0.85) 100%
  );
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9998;
  opacity: 0;
  animation: fade-in 0.3s ease forwards;
}

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

/* Container for progress pills and text */
.unified-loader-content {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 2px solid rgba(255, 182, 193, 0.3);
  border-radius: 24px;
  padding: 3rem 4rem;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.2),
    0 0 80px rgba(255, 182, 193, 0.3) inset;
  text-align: center;
  min-width: 400px;
}

/* ===== ENHANCED PROGRESS PILLS ===== */
/* Large, prominent progress indicators */
.progress-pills {
  display: flex;
  gap: 16px;
  justify-content: center;
  margin: 1.5rem 0;
}

.progress-pill {
  width: 80px;
  height: 12px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
  transition: all 0.5s ease;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.progress-pill.active {
  background: linear-gradient(
    90deg,
    var(--primary-color, #FFB6C1),
    rgba(255, 182, 193, 0.7)
  );
  animation: pill-pulse 1.2s ease-in-out infinite;
  box-shadow: 
    0 0 20px rgba(255, 182, 193, 0.5),
    inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

.progress-pill.completed {
  background: linear-gradient(
    90deg,
    var(--success-green, #4CAF50),
    rgba(76, 175, 80, 0.7)
  );
  box-shadow: 
    0 0 15px rgba(76, 175, 80, 0.3),
    inset 0 1px 3px rgba(255, 255, 255, 0.3);
}

@keyframes pill-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.9;
  }
  50% {
    transform: scale(1.05);
    opacity: 1;
  }
}

/* Large, clear progress text */
.progress-text {
  text-align: center;
  color: var(--text-primary, #333);
  font-size: 1.4rem;
  font-weight: 500;
  margin-top: 1.2rem;
  letter-spacing: 0.5px;
}

/* ===== SIMPLIFIED BUTTON STATES ===== */
/* Minimal button loading without complex animations */

.btn-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.7;
}

.btn-loading::after {
  content: 'Loading...';
  color: var(--primary-color, #FFB6C1);
  font-weight: 500;
}

/* ===== FADE TRANSITIONS ===== */
/* Smooth transitions for showing/hiding content */
.fade-out {
  animation: fade-out 0.3s ease forwards;
}

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

.fade-in {
  animation: fade-in 0.3s ease forwards;
}

/* ===== FALLBACK LOADING MESSAGE ===== */
/* Simple loading message for non-overlay contexts */
.loading-message {
  color: var(--primary-color, #FFB6C1);
  font-size: 1.2rem;
  font-weight: 500;
  text-align: center;
  padding: 2rem;
}

/* Dark theme adjustments */
@media (prefers-color-scheme: dark) {
  .unified-loader-overlay {
    background: linear-gradient(
      135deg,
      rgba(0, 0, 0, 0.9) 0%,
      rgba(255, 182, 193, 0.15) 50%,
      rgba(0, 0, 0, 0.9) 100%
    );
  }
  
  .unified-loader-content {
    background: rgba(30, 30, 30, 0.95);
    border: 2px solid rgba(255, 182, 193, 0.4);
    box-shadow: 
      0 8px 32px rgba(0, 0, 0, 0.5),
      0 0 80px rgba(255, 182, 193, 0.2) inset;
  }
  
  .progress-text {
    color: var(--text-primary-dark, #e0e0e0);
  }
  
  .progress-pill {
    background: rgba(255, 255, 255, 0.08);
  }
}