/* Align options horizontally */
.option {
  display: flex;
  align-items: center;
  font-size: 15px;
  font-weight: 500;
}

.min-width, .sec-width{
  display: inline-block;
  width: 17px;
}

.bg-option{
  background-color: #f1f1f1;
}

.navigation {
  margin-top: 20px;
  display: flex;
  justify-content: space-between;
}

button {
  padding: 10px 15px;
  background-color: #007bff;
  color: white;
  border: none;
  cursor: pointer;
}

.btn-fixed-width {
  min-width: 150px;
}

button:disabled {
  background-color: #cccccc;
}

/* Explanation Drawer */
.explanation-drawer {
  margin-top: 10px;
  padding: 15px;
  border: 1px solid #e7e7e9;
  background-color: #f8f9fa;
  word-wrap: break-word;
  font-size: 14px;
}

.explanation-drawer.border-correct{
  border: 1px solid #198754;
}

.explanation-drawer.border-incorrect{
  border: 1px solid #dc3545;
}

/* Option highlighting */
label {
  display: inline;
  padding: 10px 0px;
  margin-top: 5px;
  border-radius: 4px;
}

input[type="radio"]:checked + label {
  font-weight: bold;
}

.questionDescription {
  color: #233672;
  font-family: "Roboto Condensed", "Roboto", sans-serif;
  font-weight: bold;
  font-size: clamp(1rem, 2vw, 1.25rem);
}

.option-text, .count-and-rating, .quiz-name-end-test {
  font-size: clamp(0.875rem, 1.5vw, 1rem);
  font-weight: 500;
}

.option-text {
  padding-left: clamp(1.3rem, 1.3vw, 2rem);
}

.correct-ans {
  background: #dff6dd;
  border: 1px solid #107c10;
}

.timed-q-ans {
  background: #cec800;
  color: #fff;
}

.incorrect-ans {
  background: #fde7e9;
  border: 1px solid #a80000;
}

/* Radio and checkbox customization */
.custom-radio,
.custom-checkbox {
  display: inline-block;
}

/* For disabled radio buttons and checkboxes */
.custom-radio:disabled,
.custom-checkbox:disabled,
label:has(.custom-radio:disabled),
label:has(.custom-checkbox:disabled) {
  cursor: not-allowed;
}

/* For enabled radio buttons and checkboxes */
.custom-radio:not(:disabled),
.custom-checkbox:not(:disabled),
label:has(.custom-radio:not(:disabled)),
label:has(.custom-checkbox:not(:disabled)) {
  cursor: pointer;
}

label .custom-radio:disabled::before,
label .custom-checkbox:disabled::before {
  border: 2px solid #bfbaba;
}

/* Specific styles for custom radio buttons */
label .custom-radio::before {
  border-radius: 50%;
}

label .custom-radio::before,
label .custom-checkbox::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 30px;
  height: 30px;
  background-color: #fff;
  border: 2px solid #595757;
  transform: translateY(-50%);
}

label .custom-radio:checked::before,
label .custom-checkbox:checked::before {
  background-color: #007bff;
  border-color: #5a75b8;
}

.incorrect-ans > label .custom-radio:checked::before,
.incorrect-ans > label .custom-checkbox:checked::before {
  background-color: #dc3545;
  border-color: #9a1e2a;
  color: #fff;
}

.correct-ans > label .custom-radio::before,
.correct-ans > label .custom-checkbox::before {
  color: #fff;
  background-color: #198754;
  border-color: #0b5c37;
}

/* Position and style the letters inside the circle */
label .custom-radio::after,
label .custom-checkbox::after {
  position: absolute;
  top: 50%;
  left: clamp(12px, 2vw, 15px);
  font-size: clamp(12px, 2vw, 14px);
  transform: translate(-50%, -50%);
}

/* Letter mapping */
.options-container .col-12:nth-child(1) .custom-radio::after,
.options-container .col-12:nth-child(1) .custom-checkbox::after { content: "A"; }

.options-container .col-12:nth-child(2) .custom-radio::after,
.options-container .col-12:nth-child(2) .custom-checkbox::after { content: "B"; }

.options-container .col-12:nth-child(3) .custom-radio::after,
.options-container .col-12:nth-child(3) .custom-checkbox::after { content: "C"; }

.options-container .col-12:nth-child(4) .custom-radio::after,
.options-container .col-12:nth-child(4) .custom-checkbox::after { content: "D"; }

.options-container .col-12:nth-child(5) .custom-radio::after,
.options-container .col-12:nth-child(5) .custom-checkbox::after { content: "E"; }

.options-container .col-12:nth-child(6) .custom-radio::after,
.options-container .col-12:nth-child(6) .custom-checkbox::after { content: "F"; }


/*When one option is selected(radio)*/
label .custom-radio:checked::after,
label .custom-checkbox:checked::after,
.correct-ans > label .custom-radio::after,
.correct-ans > label .custom-checkbox::after,
.correct-ans > label .custom-radio:checked::after,
.correct-ans > label .custom-checkbox:checked::after {
  font-family: 'Font Awesome 5 Free', Arial, sans-serif;
  content: '\f00c';
  color: white;
  font-size: clamp(12px, 2vw, 14px);
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translate(-50%, -50%);
}

/* When Ans is verified and turns to incorrect X sign */
.incorrect-ans > label .custom-radio:checked::after,
.incorrect-ans > label .custom-checkbox:checked::after,
.incorrect-ans > label .custom-radio:checked::after,
.incorrect-ans > label .custom-checkbox.incorrect-ans::after {
  font-family: 'Font Awesome 5 Free';
  color: white;
  font-size: clamp(12px, 2vw, 14px);
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translate(-50%, -50%);
}

/* Specific styles for custom checkboxes */
label .custom-checkbox::before {
  border-radius: 4px;
}

#selected-test-mode {
  display: inline;
  background: #182b46;
  color: white !important;
  padding: 0px 5px 1px 5px;
  border-radius: 3px;
}

.disabled-btn {
  pointer-events: none; /* Prevents click events */
  opacity: 0.5; /* Makes it look disabled */
}

#questionStatusContainer span {
  width: 30px;
  font-size: small;
  text-align: center;
}

#questionStatusContainer {
  gap: 5px;
  padding-bottom: 5px;
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center;
}

.modal-dialog {
  top: 100px;
}

.loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #f4f4f4;
  display: flex;
  justify-content: center;
  align-items: center;
  color: #333333;
  font-size: 20px;
  z-index: 9999;
}

.spinner {
  border: 4px solid rgba(255, 255, 255, 0.3);
  border-top: 4px solid #333333;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  animation: spin 1s linear infinite;
}

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

  100% {
    transform: rotate(360deg);
  }
}
.question-rating {
    position: relative;
    display: inline-block;
    white-space: nowrap;
    pointer-events: none;
    color: #c9c9c9;
}

.question-rating.rated-1,
.question-rating.rated-2,
.question-rating.rated-3,
.question-rating.rated-4,
.question-rating.rated-5 {
    color: #dc3545;
}
.question-rating::after {
    content: '☆☆☆☆☆';
    color: #c9c9c9;
    position: absolute;
    left: 0;
    z-index: -1;
    pointer-events: none;
}

.progress-bar-container {
  background: linear-gradient(45deg, #FF6F00, #FF9100);
  height: 10px;
  transition: width 0.3s ease;
}

.custom-progress {
  display: flex;
  overflow: hidden;
  font-size: .75rem;
  background-color: #e9ecef;
  width: 100%;
}

/* General Button Style */
button {
  border: none;
  outline: none;
  font-weight: 600;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
  color: white;
  transition: transform 0.2s ease, background 0.3s ease, box-shadow 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
  font-family: 'Poppins', Arial, sans-serif;
}

/* Disabled State */
#next-button:disabled,
#prev-button:disabled,
#check-answer-button:disabled,
#submit-test:disabled {
  color: #666666;
  cursor: default;
  transform: none;
  transform: none !important;
  box-shadow: none !important;
  transition: none !important;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

/* Verify Answer Button */
#submit-exam,
#submit-test,
#check-answer-button {
  background: linear-gradient(45deg, #00C853, #00E676); /* Vibrant gradient */
}

#submit-exam:hover,
#submit-test:hover,
#check-answer-button:hover {
  background: linear-gradient(45deg, #00E676, #69F0AE);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

#submit-test:disabled,
#check-answer-button:disabled {
  background: #A5D6A7;
}

/* Previous Button */
#prev-button {
  background: linear-gradient(45deg, #607D8B, #78909C);
}

#prev-button:hover {
  background: linear-gradient(45deg, #78909C, #90A4AE);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

#prev-button:disabled {
  background: #B0BEC5;
}

/* Next Button */
#next-button {
  background: linear-gradient(45deg, #FF6F00, #FF9100);
}

#next-button:hover {
  background: linear-gradient(45deg, #FF8F00, #FFB300);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

#next-button:disabled {
  background: #FFB074;
}

/* Confirm End Test Button */
#confirm-end-test {
  background: linear-gradient(45deg, #B71C1C, #D32F2F);
}

#confirm-end-test:hover {
  background: linear-gradient(45deg, #D32F2F, #EF5350);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

#practice-test-completed:hover {
  background: linear-gradient(45deg, #1976D2, #42A5F5);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

#practice-test-completed:hover {
  background: linear-gradient(45deg, #42A5F5, #64B5F6);
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.15);
}

.select-correct-options{
  color: #dc3545; /**secondary - #6c757d*/
  font-size: small;
}

@media (max-width: 767px) {
  /*When one option is selected(radio)*/
  label .custom-radio:checked::after,
  label .custom-checkbox:checked::after,
  .correct-ans > label .custom-radio::after,
  .correct-ans > label .custom-checkbox::after,
  .correct-ans > label .custom-radio:checked::after,
  .correct-ans > label .custom-checkbox:checked::after,
  .incorrect-ans > label .custom-radio:checked::after,
  .incorrect-ans > label .custom-checkbox:checked::after,
  .incorrect-ans > label .custom-radio:checked::after,
  .incorrect-ans > label .custom-checkbox.incorrect-ans::after {
    font-size: clamp(12px, 2vw, 14px);
    left: clamp(12px, 2vw, 15px);
  }
  label .custom-radio::before,
  label .custom-checkbox::before {
    width: 25px;
    height: 25px;
  }
}

#question-container{
  padding-top: 4px;
}