/* ==========================================================================
   Assessment Core Styles - Peak Learning AQ Profile®
   ========================================================================== */

/* Enhanced Questions Container */
.questions-container {
  padding: 0 50px 0px;
  /* Layout stability */
  contain: layout style;
  transform: translateZ(0);
}

.question-block {
  margin-bottom: 35px;
  padding: 50px 25px;
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.5), rgba(22, 33, 62, 0.6));
  border-radius: 20px;
  backdrop-filter: blur(20px);
  border: 1px solid rgba(30, 144, 255, 0.2);
  box-shadow:
    0 20px 40px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  /* Layout stability improvements */
  contain: layout style paint;
  transform: translateZ(0); /* Hardware acceleration */
  will-change: transform, box-shadow;
  /* Reserve space for hover effect to prevent layout shift */
  margin-top: 8px;
}

.question-block::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, #1e90ff, #4169e1, #6495ed);
  border-radius: 20px 20px 0 0;
}

.question-block:hover {
  transform: translateY(-8px) translateZ(0);
  box-shadow:
    0 30px 60px rgba(0, 0, 0, 0.3),
    0 0 40px rgba(30, 144, 255, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  border-color: rgba(30, 144, 255, 0.4);
}

.question-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 25px;
  gap: 20px;
}

.question-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.6;
}

/* Enhanced Custom Slider - Beautiful blue gradient up to thumb */
.slider {
  --thumb-size: 24px;
  width: 100%;
  height: 10px;
  border-radius: 6px;
  outline: none;
  -webkit-appearance: none;
  appearance: none;
  position: relative;
  cursor: pointer;
  border: 1px solid rgba(30, 144, 255, 0.3);
  box-shadow:
    inset 0 2px 6px rgba(0, 0, 0, 0.2),
    0 2px 8px rgba(30, 144, 255, 0.2);
  overflow: visible;
  padding: 0 calc(var(--thumb-size) / 2);
  background-origin: content-box;
  background-clip: content-box;
  background:
    linear-gradient(90deg, #1e3a8a 0%, #1e40af 25%, #1d4ed8 50%, #2563eb 75%, #3b82f6 100%) no-repeat,
    rgba(58, 61, 74, 0.4);
  background-size: var(--progress-px, 0px) 100%, 100% 100%;
  background-position: 0 0, 0 0;
  /* Layout stability */
  contain: layout style paint;
  transform: translateZ(0);
  will-change: background-size;
}

/* Slider thumb styles */
.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: var(--thumb-size);
  height: var(--thumb-size);
  background: linear-gradient(135deg, #1e90ff, #4169e1);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  z-index: 10;
  box-shadow:
    0 4px 12px rgba(30, 144, 255, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider::-moz-range-thumb {
  width: var(--thumb-size);
  height: var(--thumb-size);
  background: linear-gradient(135deg, #1e90ff, #4169e1);
  border: 3px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  cursor: pointer;
  position: relative;
  z-index: 10;
  box-shadow:
    0 4px 12px rgba(30, 144, 255, 0.4),
    0 2px 6px rgba(0, 0, 0, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.slider::-webkit-slider-thumb:hover,
.slider::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow:
    0 6px 20px rgba(30, 144, 255, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
  border-color: #ffffff;
}

.slider::-webkit-slider-thumb:active,
.slider::-moz-range-thumb:active {
  transform: scale(1.05);
  box-shadow:
    0 8px 25px rgba(30, 144, 255, 0.7),
    0 4px 15px rgba(0, 0, 0, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

/* Assessment animations */
.question-block {
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px);
  pointer-events: none;
  transition: opacity 0.5s ease, transform 0.5s ease, visibility 0s linear 0.5s;
  /* Reserve space for animation to prevent layout shift */
  margin-bottom: 35px;
  contain: layout style paint;
}

.question-block.animate-in {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  pointer-events: auto;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Enhanced Progress indicators */
.progress-container {
  contain: layout style paint;
  height: 80px; /* Increased height for better visual hierarchy */
  transform: translateZ(0);
  background: linear-gradient(135deg, rgba(26, 26, 46, 0.6), rgba(22, 33, 62, 0.7));
  border-radius: 16px;
  padding: 20px;
  margin: 20px 0;
  border: 1px solid rgba(30, 144, 255, 0.2);
  backdrop-filter: blur(20px);
}

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

.progress-title {
  font-size: 16px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.5px;
}

.progress-percentage {
  font-size: 18px;
  font-weight: 700;
  color: #1e90ff;
  background: rgba(30, 144, 255, 0.1);
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid rgba(30, 144, 255, 0.3);
}

.progress-text {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 8px;
  text-align: center;
}

.assessment-progress {
  background: rgba(58, 61, 74, 0.4);
  border-radius: 12px;
  height: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.3);
}

.assessment-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #1e90ff, #4169e1, #6495ed);
  border-radius: 12px;
  transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow:
    0 0 20px rgba(30, 144, 255, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  position: relative;
  overflow: hidden;
}

.assessment-progress-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  animation: progressShimmer 2s infinite;
}

@keyframes progressShimmer {
  0% {
    left: -100%;
  }
  100% {
    left: 100%;
  }
}

/* Step indicators for visual hierarchy */
.step-indicators {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.step-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(58, 61, 74, 0.6);
  border: 2px solid rgba(30, 144, 255, 0.2);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}

.step-dot.completed {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.3);
}

.step-dot.current {
  background: linear-gradient(135deg, #1e90ff, #4169e1);
  border-color: rgba(30, 144, 255, 0.5);
  box-shadow: 0 0 16px rgba(30, 144, 255, 0.4);
  transform: scale(1.2);
}

.step-dot:hover {
  transform: scale(1.1);
  border-color: rgba(30, 144, 255, 0.4);
}

/* Enhanced question title hierarchy */
.question-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  letter-spacing: 0.5px;
  text-align: center;
  line-height: 1.6;
  position: relative;
  padding-bottom: 16px;
}

.question-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60px;
  height: 3px;
  background: linear-gradient(90deg, #1e90ff, #4169e1);
  border-radius: 2px;
}

/* Question number indicator */
.question-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: linear-gradient(135deg, #1e90ff, #4169e1);
  color: white;
  font-weight: 700;
  border-radius: 50%;
  margin-right: 12px;
  font-size: 14px;
  box-shadow: 0 4px 12px rgba(30, 144, 255, 0.3);
}

/* Enhanced slider labels */
.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
  padding: 0 8px;
}

.slider-label {
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.7);
  text-align: center;
  transition: color 0.3s ease;
}

.slider-label.active {
  color: #1e90ff;
  font-weight: 600;
  text-shadow: 0 0 8px rgba(30, 144, 255, 0.5);
}

/* Assessment completion animation */
.assessment-complete {
  animation: completionPulse 2s ease-in-out infinite;
}

@keyframes completionPulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: 0 0 20px rgba(34, 197, 94, 0.3);
  }
  50% {
    transform: scale(1.02);
    box-shadow: 0 0 30px rgba(34, 197, 94, 0.5);
  }
}

/* Responsive progress indicators */
@media (max-width: 768px) {
  .progress-container {
    height: 70px;
    padding: 16px;
  }

  .progress-title {
    font-size: 14px;
  }

  .progress-percentage {
    font-size: 16px;
    padding: 3px 10px;
  }

  .step-indicators {
    gap: 6px;
  }

  .step-dot {
    width: 10px;
    height: 10px;
  }

  .question-number {
    width: 28px;
    height: 28px;
    font-size: 12px;
  }
}