/* Deva Quiz Modal Styles */
.deva-quiz-modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.7);
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.deva-quiz-modal-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 1;
}

.deva-quiz-modal-content {
  background: white;
  border-radius: 12px;
  max-width: 800px;
  width: 85%;
  max-height: 85vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

/* Tablet and mobile styles */
@media (max-width: 768px) {
  .deva-quiz-modal-content {
    width: 100%;
    height: 100vh;
    max-height: 100vh;
    border-radius: 0;
  }

  .deva-quiz-modal-overlay {
    align-items: stretch;
  }

  .deva-quiz-modal-body {
    padding: 20px 16px 24px;
  }

  .deva-quiz-header-bar {
    padding: 12px 16px;
    border-radius: 0;
  }
}

/* 1. Quiz header bar */
.deva-quiz-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  border-bottom: 1px solid #e5e7eb;
  position: sticky;
  top: 0;
  background: #eff7f2;
  border-radius: 12px 12px 0 0;
  z-index: 1;
}

.deva-quiz-header-title {
  font-size: 18px;
  font-weight: 600;
  color: #111827;
}

.deva-quiz-back-btn-header {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #fff;
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}

.deva-quiz-modal-close {
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #6b7280;
  border-radius: 6px;
  transition: color 0.2s ease, background-color 0.2s ease;
  background: none !important;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 36px;
}

.deva-quiz-back-btn-header:hover:not(:disabled),
.deva-quiz-modal-close:hover {
  color: #71796c;
  background-color: #f3f4f6;
}

.deva-quiz-back-btn-header:disabled {
  color: #d1d5db;
  cursor: not-allowed;
  background: none;
}

.deva-quiz-back-btn-header:disabled:hover {
  background-color: transparent;
}

.deva-quiz-modal-body {
  padding: 24px 30px 30px;
}

/* 2. Centrally aligned message */
.deva-quiz-stage-message {
  text-align: center;
  font-size: 24px;
  font-weight: bold;
  color: #48733d;
  margin-bottom: 24px;
  min-height: 20px;
}

/* 3. Left aligned Quiz title and description */
.deva-quiz-intro-section {
  margin-bottom: 24px;
}

.deva-quiz-title {
  margin: 0 0 8px 0;
  font-size: 18px;
  font-weight: 600;
  color: #111827;
  text-align: left;
}

.deva-quiz-intro {
  margin: 0;
  color: #6b7280;
  line-height: 1.5;
  text-align: left;
}

/* 4. Progress section */
.deva-quiz-progress-section {
  margin-bottom: 32px;
}

.deva-quiz-progress-text {
  font-size: 14px;
  font-weight: 500;
  color: #6b7280;
  margin-bottom: 8px;
}

.deva-quiz-progress {
  margin-bottom: 20px;
}

.deva-quiz-progress-bar {
  background: #ebf3e8;
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
}

.deva-quiz-progress-fill {
  background: linear-gradient(90deg, #48733d 0%, #48733d 100%);
  height: 100%;
  width: 0%;
  transition: width 0.3s ease;
  border-radius: 8px;
}

/* 5 & 6. Question and answers */
.deva-quiz-question-container {
  margin-bottom: 32px;
}

.deva-quiz-question-text {
  font-size: 18px;
  font-weight: 500;
  margin-bottom: 20px;
  color: #111827;
}

.deva-quiz-answers {
  margin-bottom: 20px;
}

.deva-quiz-answer-option {
  display: block;
  margin-bottom: 12px;
  padding: 15px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.deva-quiz-answer-option:hover {
  background-color: #b5d1a7;
}

.deva-quiz-answer-option.selected {
  border-color: #48733d;
  background-color: #b5d1a7;
}

.deva-quiz-answer-option input[type="radio"]:checked {
  accent-color: #48733d;
}

.deva-quiz-answer-option input[type="radio"] {
  margin-right: 12px;
}

.deva-quiz-answer-text {
  font-weight: 400;
  color: #374151;
}

/* 7. Next button with arrow */
.deva-quiz-navigation {
  text-align: right;
}

.deva-quiz-btn {
  background: #48733d;
  color: white;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background-color 0.2s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
}

.deva-quiz-btn:hover:not(:disabled) {
  background: #3d5f34;
}

.deva-quiz-btn:disabled {
  background: #9ca3af;
  cursor: not-allowed;
}

.deva-quiz-btn svg {
  flex-shrink: 0;
}

/* Loading states */
.deva-quiz-loading {
  text-align: center;
  padding: 40px;
  color: #6b7280;
}

.deva-quiz-spinner {
  border: 3px solid #f3f3f3;
  border-top: 3px solid #48733d;
  border-radius: 50%;
  width: 30px;
  height: 30px;
  animation: spin 1s linear infinite;
  margin: 0 auto 15px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
