/* assessment.css – Assessment page-specific styles
   Global variables & components inherited from base.css and components.css */

.form-section {
  width: 100%;
  padding-bottom: 24px;
  box-sizing: border-box;
  min-width: 0;
}

/* Card styles adapt for small screens */
.card {
  max-width: 600px;
  border-radius: 4px;
  box-shadow: 0 1px 5px 0 rgba(0, 0, 0, 0.12), 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.2);
  height: fit-content;
  position: sticky;
  top: 20px;
}

.card-image {
  width: 100%;
  height: auto;
  overflow: hidden;
  background-color: #e0e0e0;
  object-fit: cover;
}

.card-image img {
  width: 100%;
  max-height: 240px;
  object-fit: cover;
  object-position: center;
  display: block;
}

.card-text-content {
  padding: 14px;
  color: var(--text-color);
}

.card-text-content ul {
  list-style-type: none;
  padding: 0;
}

.card-text-header {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 12px;
}

.card-text {
  margin-bottom: 20px;
}

.card-text-content p:not(.card-text) {
  margin-bottom: 0;
}

.card-text-item {
  font-weight: bold;
}

.card-text-item img {
  width: 18px;
  height: 18px;
  margin-right: 8px;
}

/* Step details styling */
.step-form-content {
  margin-top: 40px;
}

/* Button Styling - Match static reference exactly with maximum specificity */
.buttons-wrapper {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px; /* Reduced from 12px to 8px */
  margin-top: 32px;
}

.buttons-wrapper .button-primary {
  padding: 12px 32px;
  border-radius: 200px;
  font-size: 16px;
  font-weight: 500;
  background-color: var(--primary);
  color: var(--text-color-secondary);
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  width: auto;
  max-width: none;
  text-align: center;
  box-sizing: border-box;
}

.buttons-wrapper .button-primary:hover{
  background-color: var(--primary-hover);
  transform: none;
}
.buttons-wrapper .button-primary.disabled {
  background-color: #ccc;
  color: #666;
  opacity: 0.6;
  cursor: not-allowed;
  pointer-events: none;
}

.buttons-wrapper .button-secondary {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px; /* Match button-primary height */
  gap: 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--primary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 8px;
  transition: color 0.2s ease;
  text-decoration: none;
  margin: 0;
  width: auto;
  max-width: none;
  text-align: left;
  box-sizing: border-box;
}

.buttons-wrapper .button-secondary:hover {
  text-decoration: none;
  transform: none;
}

.buttons-wrapper .button-secondary .arrow {
  font-size: 18px;
  line-height: 1;
  transition: transform ease-in-out 0.4s;
}

.buttons-wrapper .button-secondary:hover .arrow {
  transform: translateX(-2px);
}

/* Form Section */
.step-form-content form-section {
  padding: 40px 0 80px 0;
  background-color: var(--text-color-secondary);
}

.step-form-content form-container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Form Styling */
.step-form-content form {
  background: white;
  padding: 8px 0 40px 0;
  border-radius: 12px;
  box-shadow: none;
  max-width: 865px;
  flex: 1;
  min-width: 0;
  display: block;
}

.step-form-content form .mb-3 {
  width: 100%;
}

/* Style form elements */
.step-form-content form .form-check {
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  padding: 8px 0;
}

.step-form-content form .form-check-input {
  width: 20px;
  height: 20px;
  margin-right: 12px;
  accent-color: var(--secondary);
}

.step-form-content form .form-check-label {
  font-size: 16px;
  font-weight: 500;
  color: var(--text-color);
  cursor: pointer;
  margin: 0;
}

.step-form-content form .form-check-input:checked + .form-check-label {
  color: var(--primary);
  font-weight: 600;
}

/* Assessment Questions Form Redesign - Match Static Reference */
/* Stepper Section */
/* Stepper CSS moved to components.css (shared across all assessment pages) */

/* Main Content Section */
.form-container {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 24px 0;
  width: 100%;
}

.form-section-container {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
}

.form-section-container .buttons-wrapper {
  margin-top: 0;
  margin-bottom: 0;
}

.form-section-header {
  display: flex;
  align-items: center;
  padding: 8px 0;
  width: 100%;
  border-bottom: 1px solid rgba(0, 0, 0, 0.12);
}

.form-section-title {
  flex-grow: 1;
  font-size: 24px;
  font-weight: 600;
  color: #121212;
  line-height: 1.334;
  padding: 4px 0;
}

.quick-actions {
  display: flex;
  gap: 8px;
}

.quick-action-btn {
  border: 1px solid rgba(0, 61, 91, 0.22);
  border-radius: 999px;
  padding: 4px 10px;
  cursor: pointer;
}

.quick-action-btn:hover {
  text-decoration: underline;
  text-decoration-color: var(--primary);
}

.quick-action-btn span {
  font-size: 13px;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.46px;
  line-height: 22px;
}

.question-group {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
}

.question-header {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.question-label {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-color);
  letter-spacing: 0.15px;
  line-height: 1.5;
  flex: 1;
  margin: 0;
}

/* Question Tooltip Icon & Text */
.question-tooltip-icon {
  position: relative;
  cursor: pointer;
  padding: 2px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
}

.question-tooltip-icon svg {
  width: 20px;
  height: 20px;
  color: inherit;
}

.question-tooltip-text {
  display: none;
  position: absolute;
  bottom: calc(100% + 12px);
  right: 0;
  background: var(--ternary, #f1f2f4);
  color: var(--text-primary, #2a2b2c);
  font-family: 'Montserrat', Arial, sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.5;
  padding: 10px 14px;
  border-radius: 6px;
  border: 1px solid var(--border-color, #e8e9ea);
  z-index: 1000;
  min-width: 200px;
  max-width: 320px;
  width: max-content;
  max-height: 300px;
  overflow-y: auto;
  word-wrap: break-word;
  white-space: normal;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Tooltip arrow pointing down */
.question-tooltip-text::after {
  content: '';
  position: absolute;
  top: 100%;
  right: 16px;
  border: 6px solid transparent;
  border-top-color: var(--ternary, #f1f2f4);
}

.question-tooltip-text::before {
  content: '';
  position: absolute;
  top: 100%;
  right: 15px;
  border: 7px solid transparent;
  border-top-color: var(--border-color, #e8e9ea);
  z-index: -1;
}

/* Desktop: Show on hover */
.question-tooltip-icon:hover .question-tooltip-text {
  display: block;
}

/* Mobile: Show when active (toggled via JS) */
.question-tooltip-text.active {
  display: block;
}

/* Custom scrollbar for tooltips */
.question-tooltip-text::-webkit-scrollbar {
  width: 6px;
}

.question-tooltip-text::-webkit-scrollbar-track {
  background: #f1f2f4;
  border-radius: 3px;
}

.question-tooltip-text::-webkit-scrollbar-thumb {
  background: #b4b5b7;
  border-radius: 3px;
}

.question-tooltip-text::-webkit-scrollbar-thumb:hover {
  background: #9a9b9d;
}

/* Form styling for choice buttons and range sliders */
/* Input wrapper styling */
.select-wrapper, .input-wrapper {
  margin-bottom: 32px;
}

.choice-buttons-wrapper {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.choice-button {
  border: 1px solid var(--primary);
  border-radius: 4px;
  padding: 2px;
  min-width: 40px;
  text-align: center;
  cursor: pointer;
  background-color: transparent;
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.choice-button input[type="radio"] {
  display: none;
}

.choice-button input[type="checkbox"] {
  display: none;
}

.choice-button span {
  display: block;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 400;
  color: var(--primary);
  letter-spacing: 0.16px;
  line-height: 18px;
}

/* Radio button styling - rely on JavaScript class management */
.choice-button.active {
  background-color: var(--primary);
  border-color: var(--primary);
}

.choice-button.active span {
  background-color: transparent;
  color: white;
}

/* Default state */
.choice-button:not(.active) {
  background-color: transparent;
  border-color: var(--primary);
}

.choice-button:not(.active) span {
  background-color: transparent;
  color: var(--primary);
}

.choice-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 3px 8px rgba(0, 61, 91, 0.16);
}

/* Range Slider Styles */
.range-slider-wrapper {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  padding: 8px 0 2px;
  --slider-steps: 2;
  --slider-track-color: #e8e9ea;
  position: relative;
}

.range-slider-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 8px;
  background: var(--slider-track-color);
  border-radius: 4px;
  outline: none;
  cursor: pointer;
  position: relative;
  z-index: 2;
}

.range-slider-breakpoints {
  position: absolute;
  top: 12px;
  left: 3px;
  right: 0;
  height: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  pointer-events: none;
  z-index: 1;
}

.range-slider-breakpoint {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--slider-track-color);
}

.range-slider-breakpoint.active {
  background: var(--primary);
}

/* Webkit (Chrome, Safari, Edge) */
.range-slider-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  background: #003d5b;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 61, 91, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.range-slider-input::-webkit-slider-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 61, 91, 0.4);
}

.range-slider-input::-webkit-slider-thumb:active {
  transform: scale(1.15);
}

/* Firefox */
.range-slider-input::-moz-range-thumb {
  width: 24px;
  height: 24px;
  background: #003d5b;
  border-radius: 50%;
  cursor: pointer;
  border: 3px solid #ffffff;
  box-shadow: 0 2px 6px rgba(0, 61, 91, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.range-slider-input::-moz-range-thumb:hover {
  transform: scale(1.1);
  box-shadow: 0 3px 8px rgba(0, 61, 91, 0.4);
}

.range-slider-input::-moz-range-track {
  width: 100%;
  height: 8px;
  background: #e8e9ea;
  border-radius: 4px;
}

/* Labels below the slider */
.range-slider-labels {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  margin-top: 8px;
}

.range-slider-label {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-color);
  opacity: 0.7;
  flex: 1;
  text-align: center;
  white-space: nowrap;
  transition: opacity 0.15s ease, color 0.15s ease, font-weight 0.15s ease;
  max-width: 50px;
}

.range-slider-label.active {
  opacity: 1;
  color: var(--primary);
  font-weight: 600;
}

/* Hide the JSON data script */
.range-slider-choices {
  display: none;
}

.btn {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  border-radius: 200px;
  cursor: pointer;
  border: none;
  background-color: transparent;
}

.btn.btn-primary {
  background-color: var(--primary);
  padding: 6px 24px;
}

/* Side Card */
.card-content {
  padding: 16px;
}

.card-title {
  font-size: 24px;
  font-weight: 600;
  color: var(--text-color);
  line-height: 1.334;
  margin-bottom: 8px;
}

.card-text {
  font-size: 16px;
  font-weight: 400;
  color: var(--text-color);
  line-height: 1.5;
  letter-spacing: 0.15px;
}

.card-text.muted {
  color: rgba(42, 43, 44, 0.67);
}

.card-list {
  margin: 8px 0;
}

/* 2026 visual refresh overrides */
#page-subtitle {
  margin-top: 8px;
  color: rgba(40, 29, 27, 0.78);
  max-width: 72ch;
}

/* Responsive adjustments */
@media screen and (min-width: 993px) {
  .form-section {
    min-width: 500px;
  }
}
@media screen and (min-width: 993px) and (max-width: 1100px) {
  .form-section-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media screen and (max-width: 992px) {
  .form-section {
    max-width: 600px;
    min-width: unset;
    margin-left: auto;
    margin-right: auto;
    padding-bottom: 0;
  }

  .card {
    position: static;
    width: 100% ;
    margin: 0 auto;
  }

  .buttons-wrapper {
    width: 100%;
    justify-content: space-between;
  }
}

@media screen and (max-width: 768px) {
  .step-form-content {
    margin-top: 10px;
  }

  .form-section-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

}

@media screen and (max-width: 390px) {
  .stepper-section .step-label,
  .stepper-section .step-label-medium {
    font-size: 11px;
    line-height: 1.15;
  }
}
