/* ===== Quiz Options Styling ===== */

.options-container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 20px 0;
}

.option-label {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background-color: #ffffff;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1.5;
  color: #333;
  transition: border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
  position: relative;
}

.option-label:hover {
  border-color: #7b5ea7;
  background-color: #f7f3fc;
  box-shadow: 0 2px 8px rgba(123, 94, 167, 0.15);
}

.option-label:active {
  transform: scale(0.99);
}

/* Hide the default radio button and replace with a custom circle */
.option-label input[type="radio"] {
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  min-width: 20px;
  border: 2px solid #b0b0b0;
  border-radius: 50%;
  background-color: #fff;
  cursor: pointer;
  position: relative;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  flex-shrink: 0;
}

.option-label input[type="radio"]:checked {
  border-color: #7b5ea7;
  background-color: #7b5ea7;
}

.option-label input[type="radio"]:checked::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #ffffff;
  transform: translate(-50%, -50%);
}

/* Highlight the whole card when its radio is selected */
.option-label:has(input[type="radio"]:checked) {
  border-color: #7b5ea7;
  background-color: #f3edfa;
  box-shadow: 0 2px 10px rgba(123, 94, 167, 0.2);
  font-weight: 500;
}

/* Fallback for browsers without :has() support */
.option-label input[type="radio"]:checked + text,
.option-label input[type="radio"]:checked ~ span {
  font-weight: 500;
}

/* Remove the <br> spacing since we use flex gap */
.option-label br {
  display: none;
}

/* Mobile adjustments */
@media (max-width: 600px) {
  .option-label {
    padding: 12px 14px;
    font-size: 0.95rem;
    gap: 10px;
  }

  .option-label input[type="radio"] {
    width: 18px;
    height: 18px;
    min-width: 18px;
  }
}
