/* ====================================
   QNR Evaluation - Loading Animation Styles
   ==================================== */

/* Loading Container */
.qnr-report__loading {
  padding: 4rem;
  text-align: center;
}

.qnr-report__loading h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #1d1d1f;
  margin-bottom: 2rem;
}

/* Loading Person Image */
.qnr-report__loading .loading-person-image {
  width: 120px;
  height: 120px;
  margin: 0 auto 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: none;
  box-shadow: none;
}

.qnr-report__loading .loading-person-image img {
  width: 100% !important;
  height: 100% !important;
  object-fit: contain !important;
  border: none !important;
  box-shadow: none !important;
  background: transparent !important;
  border-radius: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  display: block !important;
  max-width: none !important;
  max-height: none !important;
}

/* Loading Steps */
.qnr-report__loading .loading-steps {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
  position: relative;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qnr-report__loading .loading-steps li {
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #f8f9fa;
  color: #6c757d;
  font-size: 0.875rem;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
  border-left: 3px solid transparent;
  position: absolute;
  width: 100%;
  text-align: center;
  display: none;
}

.qnr-report__loading .loading-steps li.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  background: linear-gradient(135deg, #e3f2fd 0%, #f3e5f5 100%);
  color: #1976d2;
  border-left-color: #1976d2;
  /* box-shadow: 0 2px 8px rgba(25, 118, 210, 0.15); */
  display: block;
}

.qnr-report__loading .loading-steps li.active::before {
  content: "✓";
  display: inline-block;
  width: 20px;
  height: 20px;
  background: #1976d2;
  color: white;
  border-radius: 50%;
  text-align: center;
  line-height: 20px;
  font-size: 12px;
  font-weight: bold;
  margin-right: 10px;
  animation: checkmarkPulse 0.6s ease-out;
}

@keyframes checkmarkPulse {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.2);
    opacity: 1;
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Legacy support for old loading steps - removed empty ruleset */

.qnr-report__loading .qnr-report__steps li {
  /* Same styles as .loading-steps li */
  padding: 0.75rem 1rem;
  border-radius: 8px;
  background: #f8f9fa;
  color: #6c757d;
}

/* ====================================
   Report Generation Animation Styles
   ==================================== */

.qnr-report-generation {
  position: relative;
  width: 100%;
  min-height: 80vh; /* Adequate height without being fullscreen */
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Inter', sans-serif;
  overflow: hidden;
  margin: 0 auto;
  padding: 2rem 0;
}

.qnr-report-generation__content {
  text-align: center;
  color: #333;
  max-width: 600px;
  padding: 2rem;
  position: relative;
  z-index: 2;
}

.qnr-report-generation h2 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 3rem;
  color: #333;
  opacity: 0.7;
}

.qnr-report-generation__loading {
  background: transparent;
  border-radius: 25px;
  padding: 3rem 2rem;
  position: relative;
  overflow: hidden;
}

.qnr-report-generation__steps {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
  position: relative;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 15px;
}

.qnr-report-generation__steps li {
  font-size: 14px;
  font-weight: 500;
  padding: 10px 50px;
  border-radius: 15px !important;
  transition: all 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
  opacity: 0;
  position: absolute;
  top: 50%;
  left: 50%;
  background: linear-gradient(135deg, #ff0000 0%, #ce1111 100%);
  white-space: nowrap;
  color: white;
  display: none;
  overflow: hidden;
  z-index: 2;
}

.qnr-report-generation__steps li::before {
  content: '';
  position: absolute;
  top: 0 !important;
  left: -100% !important;
  width: 200%;
  height: 100%;
  background: linear-gradient(90deg, 
    transparent 0%, 
    rgba(255,255,255,0.2) 25%, 
    rgba(255,255,255,0.4) 50%, 
    rgba(255,255,255,0.2) 75%, 
    transparent 100%);
  animation: movingGradient 3s linear infinite;
  border-radius: 15px !important;
  z-index: 1;
}

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

.qnr-report-generation__steps li.active {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
  display: block;
  animation: stepAppear 0.8s cubic-bezier(0.4, 0.0, 0.2, 1);
}

@keyframes stepAppear {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
  }
  100% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.qnr-report-generation__steps li:not(.active) {
  display: none;
}

/* Progress indicator */
.qnr-report-generation__progress {
  position: absolute;
  bottom: -20px;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 3px;
  background: rgba(0,0,0,0.1);
  border-radius: 2px;
  overflow: hidden;
}

.qnr-report-generation__progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #d68b8b, #ce1111);
  border-radius: 2px;
  transition: width 0.3s ease;
}

/* Force image display - override any global styles */
.qnr-report__loading .loading-person-image {
  position: relative;
  overflow: hidden;
}

.qnr-report__loading .loading-person-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  margin: 0;
  padding: 0;
  display: block;
  max-width: none;
  max-height: none;
  opacity: 1;
  visibility: visible;
}

.qnr-report-generation__person-image {
  position: relative;
  overflow: hidden;
}

.qnr-report-generation__person-image img {
  height: 350px !important;
  width: auto !important;
  object-fit: contain;
  border: none;
  box-shadow: none;
  background: transparent;
  margin: auto !important;
}

/* Scanning bar animation for report generation */
.qnr-report-generation__person-image::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, 
    transparent 0%, 
    #ce1111 20%, 
    #ff4e4e 50%, 
    #ce1111 80%, 
    transparent 100%);
  animation: scanImageReport 5s ease-in-out infinite;
  z-index: 10;
  border-radius: 2px;
}

@keyframes scanImageReport {
  0% {
    transform: translateY(0);
    opacity: 0.7;
  }
  10% {
    transform: translateY(100px);
    opacity: 1;
  }
  20% {
    transform: translateY(170px);
    opacity: 1;
  }
  35% {
    transform: translateY(200px);
    opacity: 1;
  }
  45% {
    transform: translateY(350px);
    opacity: 1;
  }
  60% {
    transform: translateY(200px);
    opacity: 1;
  }
  70% {
    transform: translateY(170px);
    opacity: 1;
  }
  85% {
    transform: translateY(100px);
    opacity: 1;
  }
  100% {
    transform: translateY(0px);
    opacity: 0.7;
  }
}

/* Responsive design */
@media (max-width: 768px) {
  .qnr-report-generation {
    min-height: 70vh; /* Smaller height on mobile */
    padding: 1rem 0;
  }
  
  .qnr-report-generation h2 {
    font-size: 18px; /* Same size on mobile */
  }
  
  .qnr-report-generation__content {
    padding: 1rem;
  }
  
  .qnr-report-generation__loading {
    padding: 2rem 1.5rem;
  }
  
  .qnr-report-generation__progress {
    width: 150px;
  }
}
