.quiz {
  width: 100%;
  padding: 50px;
  margin: 60px 0 35px 0;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  display: flex;
  align-items: flex-start;
  justify-content: end;
  min-height: 670px;
}

.quiz:has(.form) {
  align-items: stretch;
}

.quiz_content {
  width: 50%;
  display: flex;
  flex-direction: column;
  align-items: start;
  justify-content: center;
  position: relative;
}

.quiz_content.send_form {
  display: none;
}

.quiz_content.send_form.active {
  display: flex;
  justify-content: center;
  align-items: center;
}

.quiz_content.form::before {
  display: none;
}

.quiz_content.form {
  justify-content: space-between;
}

.quiz_content::before {
  content: "";
  margin-bottom: 40px;
  width: 20%;
  height: 2px;
  background: linear-gradient(
    90deg,
    #ab8d60 0.02%,
    #b29466 7.02%,
    #dbc087 51.01%,
    #ab8d60 100%
  );
}

.quiz_title {
  color: #fff;
  font-size: calc(20px + 10 * ((100vw - 370px) / (1920 - 370)));
  font-style: normal;
  font-weight: 700;
  line-height: 130%;
  margin-bottom: 20px;
}

.quiz_sub_title {
  color: #fff;
  font-size: calc(16px + 4 * ((100vw - 370px) / (1920 - 370)));
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
  margin-bottom: 40px;
}

.quiz_btn {
  color: #fff;
  font-size: 18px;
  font-style: normal;
  font-weight: 700;
  line-height: normal;
  margin-bottom: 20px;
  background-color: #ab885d;
  padding: 15px;
  cursor: pointer;
  border: 1px solid #96744000;
  width: calc(100% - 45px);
  transition: all linear 0.2s;
}

.quiz_btn:hover {
  background-color: #7e6546;
}

.quiz_row {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: start;
  gap: 15px;
  width: calc(100% - 45px);
}

.quiz_footer_icon {
  background-image: url(/wp-content/themes/Emigras/images/quizBonus.svg);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  height: 45px;
  aspect-ratio: 1 / 1;
}

.quiz_footer_description {
  color: #fff;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 140%;
}

.quiz_content:not(.send_form):after {
  content: "";
  position: absolute;
  top: 34%;
  left: 38%;
  height: 100px;
  aspect-ratio: 1 / 1;
  background-image: url(/wp-content/themes/Emigras/images/widget_icon.png);
  background-repeat: no-repeat;
  background-size: contain;
  animation-name: rotation;
  animation-duration: 5s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
  visibility: hidden;
  transition: 0.3s all ease-in;
  opacity: 0;
}

.quiz_content:not(.send_form).active::after {
  visibility: visible;
  opacity: 1;
}

/* form */

.quiz_question {
  color: #fff;
  font-size: 16px;
  font-style: normal;
  font-weight: 500;
  line-height: 140%;
  margin-bottom: 15px;
}

.quiz_sub_question {
  color: #fff;
  font-size: 14px;
  font-style: italic;
  font-weight: 400;
  line-height: 140%;
  margin-bottom: 15px;
}

.quiz_form {
  width: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.quiz_column {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: flex-start;
  gap: 10px;
}

.quiz_column label {
  border: 1px solid #ab8d60;
  opacity: 0.8;
  background: #215d63;
  padding: 12px 12px 12px 40px;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 7px;
  width: 100%;
  height: 45px;
  color: #fff;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%;
  cursor: pointer;
  position: relative;
}

.quiz_column label::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 15px;
  transform: translateY(-50%);
  display: inline-block;
  background-image: url(/wp-content/themes/Emigras/images/not_checked.svg);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  width: 14px;
  height: 14px;
  transition: 0.3s all linear;
}

.quiz_column label:has(.quiz_field:checked)::before {
  background-image: url(/wp-content/themes/Emigras/images/checked.svg);
}

.quiz_field {
  display: none; /* Сховуємо оригінальний радіо кнопку */
}

.quiz_content.form .quiz_row {
  justify-content: flex-end;
  width: 100%;
}

.quiz_content.send_form .quiz_row {
  justify-content: flex-end;
  max-width: 340px;
}

.quiz_prev {
  height: 45px;
  aspect-ratio: 1 / 1;
  cursor: pointer;
  border: none;
  background-image: url(/wp-content/themes/Emigras/images/quiz_prev_first.png);
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  background-color: transparent;
}

.quiz_prev.first {
  background-image: url(/wp-content/themes/Emigras/images/quiz_prev.png);
}

.quiz_next {
  background-color: #f5f5f5;
  color: #15383c;
  font-size: 14px;
  font-style: normal;
  font-weight: 400;
  line-height: 120%;
  height: 45px;
  padding: 10px 35px;
  cursor: pointer;
  border: none;
}

.quiz_next:disabled{
  cursor: no-drop;
  background: #8f8f8f;
}

/* thank you */

.quiz_thank_you_container {
  width: 100%;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.quiz_thank_you_container .quiz_title {
  margin-bottom: 10px;
  text-align: center;
}

.quiz_thank_you_container .quiz_sub_title {
  margin-bottom: 30px;
  text-align: center;
}

.quiz_thank_you_loading {
  height: 100px;
  aspect-ratio: 1 / 1;
  background-image: url(/wp-content/themes/Emigras/images/widget_icon.png);
  background-repeat: no-repeat;
  background-size: contain;
  animation-name: rotation;
  animation-duration: 5s;
  animation-iteration-count: infinite;
  animation-timing-function: linear;
}

/* send form */

.send_form {
  width: 50%;
  align-items: center;
}

.quiz .srm {
  margin-bottom: 35px;
}

.send_form .quiz_title {
  margin-bottom: 10px;
  text-align: center;
}

.send_form .quiz_sub_title {
  margin-bottom: 35px;
  text-align: center;
}

.send_form .srm p {
  font-weight: 700;
  font-size: 16px;
  line-height: 130%;
  color: #967340;
  padding: 7px 35px 10px 35px;
  margin: 0 0 5px 0;
}

.send_form .srm input[type="text"],
.send_form .srm input::placeholder {
  color: #cec0ab;
  font-size: 14px;
}

.send_form input[type="submit"] {
  font-size: 15px;
  height: 50px;
}

.send_form .quiz_row {
  max-width: 340px;
}


@media screen and (max-width: 1000px) {
  .quiz {
    align-items: flex-start;
    width: calc(100% + 30px);
    left: -15px;
    position: relative;
  }

  .quiz_content {
    width: 45%;
  }
}

@media screen and (max-width: 768px) {

  .quiz {
    padding: 50px 25px;
    justify-content: center;
    background-position: bottom right;
    min-height: 590px;
  }

  .quiz_content {
    width: 60%;
  }

  .quiz_content::before {
    height: 50px;
    width: 2px;
  }
}

@media screen and (max-width: 600px) {
  .quiz:has(.form) {
    padding: 20px 15px;
}

.quiz:has(.send_form.active) {
  padding: 30px 15px;
}

  .quiz {
    padding: 50px 15px;
    justify-content: center;
    align-items: flex-start;
  }

  .quiz_content {
    width: 100%;
    align-items: center;
  }

  .quiz_content.send_form .srm {
    width: calc(100% - 30px)
  }

  .quiz_title {
    margin-bottom: 10px;
    text-align: center;
  }

  .quiz_sub_title {
    text-align: center;
  }

  .quiz_btn {
    margin: 0 auto 25px auto;
    width: calc(100% - 40px);
  }

  .quiz_row {
    width: calc(100% - 40px);
    margin: 0 auto;
  }

  .quiz_content.send_form .quiz_row {
    width: calc(100% - 30px)
  }
  
}