.agency-quiz-lock {
  overflow: hidden;
}

.agency-quiz-popup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
  font-family: inherit;
}

.agency-quiz-popup.is-open {
  opacity: 1;
  pointer-events: auto;
}

.agency-quiz-popup__overlay {
  position: absolute;
  inset: 0;
  background: rgba(27, 18, 33, 0.62);
  backdrop-filter: blur(4px);
}

.agency-quiz-popup__dialog {
  position: relative;
  max-width: 620px;
  margin: 5vh auto;
  background: #fffaf6;
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(48, 27, 57, 0.28);
  overflow: hidden;
}

.agency-quiz-popup__dialog::before {
  content: "";
  display: block;
  height: 8px;
  background: linear-gradient(90deg, #8b3f8f 0%, #f4a62a 52%, #0fa7a0 100%);
}

.agency-quiz-popup__content {
  padding: 30px;
}

.agency-quiz-popup__close {
  position: absolute;
  right: 16px;
  top: 16px;
  border: 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  background: rgba(139, 63, 143, 0.08);
  color: #5b2f6a;
  font-size: 24px;
  cursor: pointer;
}

.agency-quiz-popup__badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(15, 167, 160, 0.1);
  color: #0d837d;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.agency-quiz-popup__title {
  margin: 16px 0 8px;
  font-size: 32px;
  line-height: 1.1;
  color: #23152c;
}

.agency-quiz-popup__subtitle {
  margin: 0 0 18px;
  color: #6c6072;
  font-size: 16px;
  line-height: 1.5;
}

.agency-quiz-popup__progress {
  width: 100%;
  height: 8px;
  background: #eee5ef;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 22px;
}

.agency-quiz-popup__progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, #8b3f8f 0%, #f4a62a 60%, #0fa7a0 100%);
}

.agency-quiz-popup__options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.agency-quiz-option {
  border: 1px solid #eadfe7;
  background: #ffffff;
  border-radius: 18px;
  min-height: 68px;
  padding: 16px;
  text-align: left;
  font-size: 16px;
  font-weight: 600;
  color: #32263b;
  cursor: pointer;
  transition: all 0.18s ease;
}

.agency-quiz-option:hover,
.agency-quiz-option.is-active {
  border-color: #8b3f8f;
  box-shadow: 0 12px 24px rgba(139, 63, 143, 0.12);
  transform: translateY(-1px);
}

.agency-quiz-popup__summary {
  background: #fff;
  border: 1px solid #efe5ee;
  border-radius: 18px;
  padding: 14px 16px;
  color: #4b3f52;
  line-height: 1.6;
  margin-bottom: 16px;
}

.agency-quiz-popup__form {
  display: grid;
  gap: 12px;
}

.agency-quiz-popup__form input[type="text"],
.agency-quiz-popup__form input[type="tel"] {
  width: 100%;
  border: 1px solid #e5dce7;
  border-radius: 16px;
  background: #fff;
  min-height: 54px;
  padding: 0 16px;
  font-size: 16px;
}

.agency-quiz-popup__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  color: #655a6b;
}

.agency-quiz-popup__actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 8px;
}

.agency-quiz-popup__actions.is-end {
  justify-content: flex-end;
}

.agency-quiz-popup__primary,
.agency-quiz-popup__secondary {
  border: 0;
  border-radius: 999px;
  min-height: 52px;
  padding: 0 22px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}

.agency-quiz-popup__primary {
  background: #f4a62a;
  color: #fff;
  box-shadow: 0 12px 30px rgba(244, 166, 42, 0.28);
}

.agency-quiz-popup__secondary {
  background: transparent;
  color: #6e3c7a;
  border: 1px solid #dbcfe0;
}

.agency-quiz-popup__full {
  width: 100%;
}

.agency-quiz-popup__error {
  color: #b42318;
  font-size: 14px;
}

@media (max-width: 767px) {
  .agency-quiz-popup__dialog {
    margin: 0;
    min-height: 100vh;
    max-width: 100%;
    border-radius: 0;
  }

  .agency-quiz-popup__content {
    padding: 24px 18px 28px;
  }

  .agency-quiz-popup__title {
    font-size: 26px;
  }

  .agency-quiz-popup__options {
    grid-template-columns: 1fr;
  }

  .agency-quiz-popup__actions {
    flex-direction: column;
  }
}
