/**
 * Modern Progress Modal - 2024/2025 Design Trends
 * Featuring: Glassmorphism, Micro-interactions, Progressive Blur
 */

/* ========== BACKDROP ========== */
.progress-modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 9998;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* ========== GLASS MODAL ========== */
.progress-modal-glass {
  position: relative;
  max-width: 560px;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(40px);
  -webkit-backdrop-filter: blur(40px);
  border-radius: 24px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  box-shadow:
    0 24px 48px rgba(0, 0, 0, 0.12),
    0 12px 24px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
  padding: 40px;
  animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ========== HEADER ========== */
.progress-modal-header {
  text-align: center;
  margin-bottom: 32px;
}

.progress-icon-container {
  display: inline-flex;
  margin-bottom: 16px;
  animation: float 3s ease-in-out infinite;
}

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

.progress-main-icon {
  filter: drop-shadow(0 8px 16px rgba(59, 130, 246, 0.3));
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.progress-modal-title {
  font-size: 28px;
  font-weight: 700;
  background: linear-gradient(135deg, #1e40af 0%, #7c3aed 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.progress-modal-subtitle {
  font-size: 15px;
  color: #64748b;
  font-weight: 500;
}

/* ========== TIMELINE ========== */
.progress-timeline {
  position: relative;
  margin-bottom: 32px;
}

.timeline-step {
  position: relative;
  display: flex;
  gap: 16px;
  padding: 16px 0;
  opacity: 0.4;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-step.active {
  opacity: 1;
  transform: translateX(4px);
}

.timeline-step.completed {
  opacity: 0.7;
}

.timeline-connector {
  position: absolute;
  left: 19px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, #e2e8f0 0%, transparent 100%);
}

.timeline-step:last-child .timeline-connector {
  display: none;
}

.timeline-marker {
  position: relative;
  flex-shrink: 0;
  z-index: 1;
}

.marker-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.timeline-step.active .marker-ring {
  opacity: 1;
  animation: pulse 2s ease-out infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.3);
    opacity: 0.3;
  }
}

.marker-dot {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 3px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.timeline-step.active .marker-dot {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  border-color: #3b82f6;
  box-shadow: 0 8px 16px rgba(59, 130, 246, 0.4);
  transform: scale(1.1);
}

.timeline-step.completed .marker-dot {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border-color: #10b981;
}

.marker-number {
  font-size: 16px;
  font-weight: 700;
  color: #64748b;
  transition: all 0.3s ease;
}

.timeline-step.active .marker-number,
.timeline-step.completed .marker-number {
  display: none;
}

.marker-check {
  display: none;
}

.timeline-step.completed .marker-check {
  display: block;
  animation: checkmark 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes checkmark {
  0% {
    transform: scale(0) rotate(-45deg);
    opacity: 0;
  }
  50% {
    transform: scale(1.2) rotate(0deg);
  }
  100% {
    transform: scale(1) rotate(0deg);
    opacity: 1;
  }
}

.marker-spinner {
  display: none;
  width: 20px;
  height: 20px;
  border: 3px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.timeline-step.active .marker-spinner {
  display: block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.timeline-content {
  flex: 1;
  padding-top: 4px;
}

.timeline-title {
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 4px;
  transition: color 0.3s ease;
}

.timeline-step.active .timeline-title {
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.timeline-description {
  font-size: 14px;
  color: #64748b;
  line-height: 1.5;
}

/* ========== MODERN PROGRESS BAR ========== */
.progress-bar-modern {
  margin-bottom: 24px;
}

.progress-bar-track {
  position: relative;
  height: 8px;
  background: #f1f5f9;
  border-radius: 999px;
  overflow: hidden;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.progress-bar-fill {
  position: relative;
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 100%);
  border-radius: 999px;
  transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}

.progress-bar-fill::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 100%
  );
  animation: shimmer 2s infinite;
}

@keyframes shimmer {
  0% {
    transform: translateX(-100%);
  }
  100% {
    transform: translateX(100%);
  }
}

.progress-bar-glow {
  position: absolute;
  top: -2px;
  right: -4px;
  width: 12px;
  height: 12px;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.8) 0%, transparent 70%);
  border-radius: 50%;
  filter: blur(4px);
  animation: glow 1.5s ease-in-out infinite;
}

@keyframes glow {
  0%, 100% {
    opacity: 0.6;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.3);
  }
}

.progress-stats {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 12px;
}

.progress-percentage {
  font-size: 32px;
  font-weight: 700;
  background: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -1px;
}

.progress-status {
  font-size: 14px;
  font-weight: 600;
  color: #64748b;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* ========== ESTIMATED TIME ========== */
.progress-eta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  background: rgba(59, 130, 246, 0.08);
  border-radius: 12px;
  color: #3b82f6;
  font-size: 14px;
  font-weight: 600;
}

.progress-eta svg {
  color: #3b82f6;
  animation: tick 1s linear infinite;
}

@keyframes tick {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

/* ========== RESPONSIVE ========== */
@media (max-width: 640px) {
  .progress-modal-glass {
    padding: 28px 24px;
    border-radius: 20px;
  }

  .progress-modal-title {
    font-size: 24px;
  }

  .progress-modal-subtitle {
    font-size: 14px;
  }

  .timeline-step {
    gap: 12px;
  }

  .marker-dot {
    width: 36px;
    height: 36px;
  }

  .timeline-title {
    font-size: 15px;
  }

  .timeline-description {
    font-size: 13px;
  }

  .progress-percentage {
    font-size: 28px;
  }
}

