/* Loader container styles */
.loader-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5); /* Semi-transparent black overlay */
  display: none; /* Initially hidden */
  z-index: 999; /* Ensure it's above other content */
}

/* Loader styles */
.loader {
  border: 8px solid #f3f3f3; /* Light grey */
  border-top: 8px solid #3498db; /* Blue */
  border-radius: 50%;
  width: 50px;
  height: 50px;
  animation: spin 1s linear infinite; /* Spin animation */
  margin: auto; /* Center loader horizontally and vertically */
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
}

/* Spin animation */
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

#question_form {
  width: 100%;
  height: 100%;
  padding-bottom: 150px;
}
#question_form .error-msg{
  text-align: right; 
  background: #ff9595; 
  padding:10px 40px; 
  border:1px solid #eee; 
  margin-bottom: 20px; 
  border-radius: 10px;
}
#question_form .question-list{ 
  text-align:right; 
}
#question_form .question-list ul.question-lists{ 
  list-style:none; 
  padding:0; 
}

ul.question-lists {
  margin-bottom: 126px;
  list-style: none;
  counter-reset: my-counter;
}
ul.question-lists li{
  padding: 0;
  margin-bottom: 11px; 
  border-radius: 20px;
  position: relative;

  counter-increment: my-counter;
}
ul.question-lists li:before {
  content: counter(my-counter) ". ";
  position: absolute;
  right: 80px;
  top: 17px;
  font-size: 20px;
}

ul.question-lists li:nth-child(odd){ 
  background:#08649B1A; 
}
ul.question-lists li:nth-child(even){ 
  background:#FFB56030;
}

ul.question-lists li label {
  padding: 15px 120px 15px 80px; 
}
ul.question-lists input[type=checkbox] {
  display: none;
}
ul.question-lists input[type=checkbox] + label {
  display: block;
  cursor: pointer;
  font-size: 23px;
  line-height: 32px;
}
ul.question-lists input[type=checkbox] + label:before {
  content: "\2714";
  border: 2px solid #1D74FF;
  display: inline-block;
  width: 32px;
  height: 32px;
  margin-left: 12px;
  line-height: 32px;
  position: absolute;
  right: 35px;
  top: 15px;
  
  vertical-align: middle;
  color: transparent;
  text-align: center;
  font-size: 20px;
}

ul.question-lists input[type=checkbox] + label:active:before {
  transform: scale(0);
}

ul.question-lists input[type=checkbox]:checked + label:before {
  background-color: #1d74ff;
  border-color: #1d74ff;
  color: #fff;
}


.forminline-wrapper {
  display: flex;
  flex-wrap: wrap;
  margin-top: 40px;
  padding: 0 80px;
  column-gap: 60px;
}

.forminline-wrapper .form-group {
  margin-bottom: 10px; 
  flex: 1 1 100%; 
}
.forminline-wrapper input {
  font-size: 20px;
  line-height: 30px;
  padding: 15px 60px;
  direction: rtl;
  height: 62px;
  background: transparent;
}
.forminline-wrapper input[type="text"] {
  border: none;
  border-bottom: 1px solid #000000;
  border-radius: 0;
}
.forminline-wrapper input[type=text]:focus{
  border: none;
  border-bottom: 1px solid #1D74FF;
}
.forminline-wrapper input.question-btn {
  background: #0B6FAC;
  border-color: #0B6FAC;
  color: #fff;
  border-radius: 80px;
}
.forminline-wrapper input.question-btn:hover {
  background: #4d3c73;
  border-color: #4d3c73;
}
.form-text {
  font-size: 20px;
  line-height: 20px;
  direction: rtl;
  color: #1e7ab3;
  font-weight: 500;
}



ul.quiz-result {
  height: 100%;
  width: 100%;
  display: flex;
  flex-wrap: wrap;
  column-gap: 50px;
  padding: 0;
  margin: 0 auto;
  padding-top: 50px;
  padding-bottom: 20px;
}
ul.quiz-result li {
  width: calc((100% - 400px) / 9);
  list-style: none;
  text-align: center;
}
ul.quiz-result li .progress {
  width: 100%;
  height: 400px;
  align-content: end;
  border: solid 1px #d1d1d1;
}
ul.quiz-result li .progress .progress-bar {
  width: 100%;
  background: #ff9251;
}
ul.quiz-result li .progress-cat {
  background: #ff9251;
  color: #fff;
  border: solid 1px #ff9251;
  border-top: solid 2px #fff;
}

ul.quiz-result li:nth-child(2) .progress .progress-bar,
ul.quiz-result li:nth-child(2) .progress-cat {
  background: #e49938;
}
ul.quiz-result li:nth-child(3) .progress .progress-bar,
ul.quiz-result li:nth-child(3) .progress-cat {
  background: #e48938;
}
ul.quiz-result li:nth-child(4) .progress .progress-bar,
ul.quiz-result li:nth-child(4) .progress-cat {
  background: #e6a265;
}
ul.quiz-result li:nth-child(5) .progress .progress-bar,
ul.quiz-result li:nth-child(5) .progress-cat {
  background: #e47d38;
}
ul.quiz-result li:nth-child(6) .progress .progress-bar,
ul.quiz-result li:nth-child(6) .progress-cat {
  background: #e46d38;
}
ul.quiz-result li:nth-child(7) .progress .progress-bar,
ul.quiz-result li:nth-child(7) .progress-cat {
  background: #e58a66;
}
ul.quiz-result li:nth-child(8) .progress .progress-bar,
ul.quiz-result li:nth-child(8) .progress-cat {
  background: #965139;
}
ul.quiz-result li:nth-child(9) .progress .progress-bar,
ul.quiz-result li:nth-child(9) .progress-cat {
  background: #6a2b3c;
}


/* Adjustments for smaller screens */
@media (min-width: 768px) {
  #question_form .forminline-wrapper .form-group {
    flex: 1 1 auto; 
    max-width: calc(50% - 10px); 
  }
}

@media (max-width: 991px) {
  ul.quiz-result {
    column-gap: 20px;
  }
  ul.quiz-result li {
    width: calc((100% - 160px) / 9);
  }
}

@media (max-width: 768px) {
  #question_form {
    padding-bottom: 80px;
  }

  ul.question-lists li{
    padding: 0;
  }
  ul.question-lists li label {
    padding: 15px 85px 15px 20px;
  }
  ul.question-lists li:before {
    right: 45px;
  }
  ul.question-lists input[type=checkbox] + label:before {
    top: 20px;
    width: 24px;
    height: 24px;
    right: 15px;
    line-height: 22px;
    font-size: 16px;
  }
  .forminline-wrapper {
    padding: 0 20px;
  }
  .forminline-wrapper .form-group {
    margin-left: 0px;
  }

  ul.quiz-result li {
    width: calc((100% - 40px) / 3);
  }
  ul.quiz-result li .progress {
    height: 200px;
  }
}