/* Body styling */
body, label {
  font-family: "Montserrat", sans-serif;
  color: #333;
  text-align: center;
  background-image: url("https://www.planningmi.org/aws/MAP/asset_manager/get_image/918409?ver=1");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  height: 100vh;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  line-height: 1.5
}

/* Quiz container dynamically resizes */
#quiz-container {
  background: white;
  padding: 10px;
  padding-top: 0px;
  padding-bottom: 10px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  max-width: 550px;
  width: 90%; /* Responsive width */
  height: auto; /* Allows container to expand based on content */
  display: flex;
  flex-direction: column;
  justify-content: flex-start; /* Aligns content to the top */
}

/* Ensure the text does not overflow */
#question-text {
  width: 100%;
  word-wrap: break-word;
  text-align: center; /* Centers the question text */
  font-size: 18px;
}

/* Centers buttons properly */
#quiz-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px; /* Adds space between buttons */
  width: 100%;
}

/* Buttons styling for better UX */
button {
  display: block;
  width: 100%;
  padding: 10px 20px;
  transition: 0.3s; /* Slight transition for hover */
  border: none;
  background: #51818d;
  color: white;
  cursor: pointer;
  border-radius: 3px;
  font-size: 16px;
}

button:hover {
  background-color: #0056b3;
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.8);
}

/* Ensures hidden elements do not take up space */
.hidden {
  display: none;
}

#results {
  margin-top: 20px; /* Reduced space between question and answers */
  width: 100%;
  text-align: center; /* Ensures the section itself is centered */
  font-size: 18px;
}

#results-heading {
  font-size: 22px;
  font-weight: bold;
  margin-bottom: 10px;
}

/* Answers list styling */
#answers-list {
  list-style-type: none;
  padding: 0;
  padding-top: 5px;
  margin: 0;
  text-align: left; /* Left-aligns the answers */
  width: 100%; /* Full width of the container */
  font-size: 16px;
  padding-left: 20px; /* Optional: Adds padding to the left for better alignment */
}

/* Answer container with scrolling */
#answers-container {
  max-height: 200px; /* Adjust this value as needed */
  overflow-y: auto; /* Allows vertical scrolling as needed */
  overflow-x: hidden; /* Prevents horizontal scrolling */
  width: 100%; /* Full width of the container */
  background: white;
  border-radius: 1px;
  box-sizing: border-box; /* Ensures padding is included in the height/width */
  padding-top: 00px;
  padding-left: 0px; 
  padding-bottom: 10px;
  text-align: left; /* Ensures the answers are aligned to the left */
  word-wrap: break-word;
  word-break: break-word;
  
  /* Make sure the scrollbar is always visible */
  scrollbar-width: thin; /* Firefox */
  scrollbar-color: #51818d #f1f1f1; /* Firefox: thumb color and track color */
}

/* Scrollbar styles for Webkit browsers (Chrome, Safari) */
#answers-container::-webkit-scrollbar {
  width: 8px; /* Width of the scrollbar */
}

#answers-container::-webkit-scrollbar-thumb {
  background-color: #51818d; /* Color of the thumb */
  border-radius: 4px; /* Rounded corners */
}

#answers-container::-webkit-scrollbar-track {
  background-color: #f1f1f1; /* Track color */
}

/* Buttons container */
.buttons-container {
  margin-top: 5px;
  display: flex;
  flex-direction: row-reverse; /* This swaps the order */
  justify-content: center;
  gap: 10px;
  margin-bottom: 0px;
}

#restart-btn {
  display: inline-block;
}

/* Logo placement */
#company-logo {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 130px;
  height: auto;
  opacity: 0.8;
}

#video-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  object-fit: cover;
  z-index: -2; /* Ensure video stays in the far back */
  pointer-events: none;
}

/* Dark Overlay */
#dark-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6); /* 60% darkness */
  z-index: -1; /* Stays above the video */
}

.question-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
  padding: 10px;
  border-bottom: 1px solid #eee;
  text-align: left;
}

.question-item span {
  display: block;
  margin-left: 15px;
  text-align: left;
}

.radio-options {
  display: flex;
  gap: 15px;
}

.radio-options label {
  display: flex;
  align-items: center;
  gap: 5px;
  text-align: left;
}

#question-screen.scrollable {
  max-height: 500px;
  overflow-y: auto;
}

.back-btn {
  background-color: #ffcccb; /* Light red color */
  color: #333; /* Dark text for better readability */
  transition: 0.3s;
}

.back-btn:hover {
  background-color: #ff9999; /* Slightly darker red on hover */
  box-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}
/* Hide default checkbox */
.checkbox-options input[type="checkbox"] {
  display: none; /* Hide the default checkbox */
}

/* Create custom checkbox */
.checkbox-options label {
  position: relative;
  padding-left: 30px; /* Space for custom checkbox */
  cursor: pointer;
  display: inline-block;
  font-size: 16px;
  user-select: none; /* Prevent text selection */
}

/* Custom checkbox design */
.checkbox-options label:before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  width: 20px;
  height: 20px;
  border: 2px solid #51818d; /* Border color */
  border-radius: 4px; /* Rounded corners */
  background-color: #fff; /* White background */
  transition: all 0.3s ease;
}

/* Change when checkbox is checked */
.checkbox-options input[type="checkbox"]:checked + label:before {
  background-color: #51818d; /* Background color when checked */
  border-color: #0056b3; /* Change border color when checked */
  box-shadow: 0 0 5px rgba(0, 123, 255, 0.5); /* Optional: Add a glow effect */
}

/* Create checkmark when checkbox is checked */
.checkbox-options input[type="checkbox"]:checked + label:after {
  content: '✔'; /* Checkmark symbol */
  position: absolute;
  left: 4px; /* Position checkmark inside checkbox */
  top: -2px;
  font-size: 18px;
  color: white; /* Checkmark color */
}
