@charset "UTF-8";

/* Variables */
:root {
  --main-color: #820000;
  --hover-color: #660000;
  --light-bg: #f9f7fb;
  --text-color: #333;
  --font: system-ui, sans-serif;
}

/* Base */
body {
  font-family: var(--font);
  background: #fff;
  color: var(--text-color);
  margin: 0;
  padding: 0;
}

.hidden {
  display: none !important;
}

/* Layout Wrapper */
.quiz-wrapper {
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 20px;
}

/* Intro Section */
.quiz-intro {
  text-align: center;
}

.quiz-intro h1 {
  font-size: 2em;
  color: var(--main-color);
  margin-bottom: 20px;
}

.quiz-intro p {
  font-size: 1.1em;
  margin-bottom: 30px;
}

/* Quiz Body */
.quiz-body {
  text-align: left;
}

#quizStep form {
  margin-top: 30px;
}

#quizStep input[type="radio"],
#quizStep input[type="checkbox"] {
  margin-right: 10px;
}

/* Navigation */
.quiz-controls {
  display: flex;
  justify-content: space-between;
  margin-top: 30px;
}

.quiz-controls button {
  padding: 12px 20px;
  font-size: 1em;
  min-width: 120px;
  border-radius: 6px;
  border: none;
  background: var(--main-color);
  color: white;
  cursor: pointer;
}

/* Final Message */
.quiz-finish {
  background-color: var(--light-bg);
  padding: 40px 20px;
  border-radius: 12px;
  text-align: center;
}

.quiz-finish h2 {
  font-size: 2em;
  margin-bottom: 10px;
  color: var(--main-color);
}

.quiz-finish p {
  font-size: 1.1em;
  margin-bottom: 30px;
}

/* Final Form */
#quizFormEnd {
  max-width: 400px;
  margin: 0 auto;
  text-align: left;
}

#quizFormEnd input {
  width: 100%;
  padding: 12px;
  font-size: 1em;
  margin-bottom: 15px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

#quizFormEnd button {
  width: 100%;
  padding: 12px;
  font-size: 1em;
  background: var(--main-color);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#quizFormEnd button:hover {
  background: var(--hover-color);
  transform: none;
}

.quiz-wrapper {
  max-width: 800px;
  margin: 0 auto;
  padding: 40px 20px;
}

.quiz-option {
  background-color: #fff;
  border: 2px solid #ccc;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}

.quiz-option.selected {
  background-color: #e1f5e4;
  border-color: #2d6a4f;
  color: #1b4332;
}

.quiz-option input {
  margin-right: 0.75rem;
}

.quiz-option input:checked + span {
  font-weight: bold;
  color: #1b4332;
}

.quiz-option input:checked ~ span {
  color: #1b4332;
  font-weight: bold;
}

.quiz-option input:checked ~ label {
  border-color: #2d6a4f;
}

.quiz-controls button {
  background-color: #15803d;
  border: none;
  color: white;
  padding: 0.75rem 1.5rem;
  border-radius: 999px;
  font-size: 1rem;
  margin: 0.5rem;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.quiz-controls button:hover {
  background-color: #2d6a4f; /* darker green, same tone family */
  transform: none;           /* disables pop/jump */
  box-shadow: none;          /* removes glow/pop effect */
}

.quiz-progress-bar {
  width: 100%;
  background-color: #e5e7eb;
  border-radius: 999px;
  height: 8px;
  margin-bottom: 1rem;
  overflow: hidden;
}

.quiz-progress-fill {
  height: 8px;
  background-color: #15803d;
  width: 0%;
  transition: width 0.3s ease;
}

.quiz-option input[type="radio"],
.quiz-option input[type="checkbox"] {
  display: none;
}

.quiz-option {
  border: 2px solid #ccc;
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
  display: flex;
  align-items: center;
}

.quiz-option input:checked + span {
  font-weight: bold;
  color: #15803d;
}

.quiz-option input:checked ~ span {
  color: #15803d;
}

.quiz-option input:checked ~ span {
  font-weight: bold;
}

.quiz-option input:checked ~ span,
.quiz-option input:checked ~ label {
  border-color: #15803d;
}

.quiz-option input:checked + span {
  font-weight: bold;
  color: #15803d;
}

.quiz-option label {
  width: 100%;
  display: flex;
  align-items: center;
  cursor: pointer;
}

.quiz-option:hover {
  background-color: #e1f5e4; /* light green */
  border-color: #ccc;        /* keep neutral border on hover */
  transform: none;
  border-color: #2d6a4f;
}

/* Overlay */
#quizOverlay {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(120, 120, 120, 0.4); /* mid grey */
}

/* Spinner */
#quizSpinner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border: 8px solid #fff;
  border-top: 8px solid #820000;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

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

/* Two-column layout for quiz options on wider screens */
@media (min-width: 640px) {
  #quizStep form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
  }

  .quiz-option {
    margin-bottom: 0; /* remove default spacing under each option */
  }
}


