/* Interactive MCQ Styling for A to Z Neurology */

.mcq-interactive {
  background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 60%, #f2f6f4 100%);
  border: 2px solid #1C7C54;
  border-radius: 10px;
  padding: 25px;
  margin: 30px 0;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

.mcq-title {
  color: #1C7C54;
  font-size: 1.3em;
  margin-top: 0;
  margin-bottom: 15px;
  border-bottom: 2px solid #1C7C54;
  padding-bottom: 10px;
}

.mcq-question {
  font-size: 1.1em;
  font-weight: 500;
  color: #333;
  line-height: 1.6;
  margin-bottom: 20px;
  padding: 15px;
  background: white;
  border-left: 4px solid #1C7C54;
  border-radius: 5px;
}

.mcq-options {
  margin: 20px 0;
}

.mcq-option {
  background: white;
  border: 2px solid #e6e9ec;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 12px 0;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.mcq-option:hover {
  border-color: #1C7C54;
  background: #f0f8f4;
  transform: translateY(-2px);
  box-shadow: 0 8px 18px rgba(28, 124, 84, 0.08);
}

.mcq-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
}

.mcq-option label {
  cursor: pointer;
  display: flex;
  align-items: center;
  width: 100%;
  margin: 0;
  gap: 10px;
}

.mcq-option input[type="radio"]:checked ~ label {
  font-weight: 600;
  color: #0f5a3c;
}

.option-letter {
  font-weight: bold;
  color: #1C7C54;
  margin-right: 10px;
  font-size: 1.1em;
  min-width: 30px;
}

.option-text {
  flex: 1;
  line-height: 1.5;
}

.mcq-option input[type="radio"]:focus-visible + label {
  outline: 2px solid #1C7C54;
  outline-offset: 4px;
  border-radius: 10px;
}

.mcq-option input[type="radio"]:checked + label {
  background: linear-gradient(90deg, rgba(28, 124, 84, 0.12), rgba(28, 124, 84, 0.06));
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(28, 124, 84, 0.35);
}

/* Correct/Incorrect states */
.mcq-option.correct {
  border-color: #28a745;
  background: #d4edda;
  animation: highlightCorrect 0.5s ease;
}

.mcq-option.incorrect {
  border-color: #dc3545;
  background: #f8d7da;
  animation: highlightIncorrect 0.5s ease;
}

.mcq-option.correct .option-letter {
  color: #28a745;
}

.mcq-option.incorrect .option-letter {
  color: #dc3545;
}

.mcq-option.correct::after {
  content: "✓";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: #28a745;
  font-weight: bold;
}

.mcq-option.incorrect::after {
  content: "✗";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 24px;
  color: #dc3545;
  font-weight: bold;
}

/* Submit button */
.mcq-submit {
  background: linear-gradient(120deg, #1C7C54, #178a62);
  color: white;
  border: none;
  padding: 12px 30px;
  font-size: 1.1em;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: block;
  margin: 20px auto 0;
  box-shadow: 0 10px 18px rgba(23, 138, 98, 0.25);
}

.mcq-submit:hover {
  background: linear-gradient(120deg, #155d3e, #0f5a3c);
  transform: translateY(-2px) scale(1.01);
  box-shadow: 0 14px 22px rgba(23, 138, 98, 0.35);
}

.mcq-submit:active {
  transform: translateY(0);
}

.mcq-submit.reset-btn {
  background: #6c757d;
}

.mcq-submit.reset-btn:hover {
  background: #5a6268;
}

/* Feedback */
.mcq-feedback {
  margin-top: 20px;
  padding: 20px;
  border-radius: 8px;
  animation: fadeIn 0.5s ease;
}

.feedback-content {
  font-size: 1.2em;
  font-weight: bold;
  margin-bottom: 15px;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
}

.feedback-content.correct {
  background: #d4edda;
  border: 2px solid #28a745;
  color: #155724;
}

.feedback-content.incorrect {
  background: #f8d7da;
  border: 2px solid #dc3545;
  color: #721c24;
}

.correct-msg {
  color: #28a745;
}

.incorrect-msg {
  color: #dc3545;
}

.mcq-explanation {
  background: white;
  padding: 15px;
  border-left: 4px solid #1C7C54;
  border-radius: 5px;
  margin-top: 15px;
  line-height: 1.6;
}

.mcq-explanation strong {
  color: #1C7C54;
  display: block;
  margin-bottom: 8px;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes highlightCorrect {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.02);
  }
  100% {
    transform: scale(1);
  }
}

@keyframes highlightIncorrect {
  0%, 100% {
    transform: translateX(0);
  }
  25% {
    transform: translateX(-5px);
  }
  75% {
    transform: translateX(5px);
  }
}

/* Disabled state */
.mcq-option input[type="radio"]:disabled ~ label {
  cursor: default;
}

.mcq-option:has(input[type="radio"]:disabled):not(.correct):not(.incorrect) {
  opacity: 0.6;
  cursor: default;
}

.mcq-option:has(input[type="radio"]:disabled):not(.correct):not(.incorrect):hover {
  transform: none;
  border-color: #ddd;
  background: white;
}

/* Responsive design */
@media (max-width: 768px) {
  .mcq-interactive {
    padding: 15px;
  }

  .mcq-question {
    font-size: 1em;
  }

  .mcq-option {
    padding: 12px;
  }

  .option-letter {
    min-width: 25px;
  }
}

/* Print styles - show answers */
@media print {
  .mcq-submit {
    display: none;
  }

  .mcq-feedback {
    display: block !important;
  }

  .mcq-option.correct {
    border-color: #28a745;
    background: #d4edda;
  }
}
