/* Форма с квизом в модальных окнах: ровные поля, ритм 8/12/20/28 px, кнопка как в hero.
   Подключается после homepage-reference-preview.css и снимает его сжатые отступы. */

.rh-preview .rh-modal .rh-service-dialog__form-panel,
.rh-preview .rh-modal .rh-service-dialog:not(.rh-consult-dialog) .rh-service-dialog__form-panel:has(.rh-modal-quiz),
.rh-preview .rh-modal .rh-consult-dialog .rh-service-dialog__form-panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  padding: 56px 40px 36px;
}

.rh-preview .rh-modal .rh-service-dialog__form-panel > h4,
.rh-preview .rh-modal .rh-consult-dialog h3 {
  max-width: none;
  margin: 0 0 12px;
  padding-right: 56px;
}

.rh-preview .rh-modal .rh-service-dialog__form-panel > p,
.rh-preview .rh-modal .rh-service-dialog__form-panel:has(.rh-modal-quiz) > p {
  max-width: none;
  margin: 0 0 28px;
}

.rh-preview .rh-modal .rh-modal-quiz,
.rh-preview .rh-modal .rh-consult-dialog .rh-modal-quiz {
  display: grid;
  gap: 20px;
  width: 100%;
  max-width: none;
  margin: 0;
}

.rh-preview .rh-modal .rh-modal-quiz__title {
  color: #fff;
  font-size: 17px;
  font-weight: 500;
  line-height: 1.35;
}

.rh-preview .rh-modal .rh-modal-quiz__intro {
  margin-top: -12px;
  color: rgba(255, 255, 255, 0.64);
  font-size: 15px;
  line-height: 1.5;
}

.rh-preview .rh-modal .rh-modal-quiz__progress {
  gap: 10px;
}

.rh-preview .rh-modal .rh-modal-quiz__progress-text {
  color: rgba(255, 255, 255, 0.56);
  font-size: 14px;
}

.rh-preview .rh-modal .rh-modal-quiz__question {
  margin: 0 0 12px;
  padding: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.4;
}

.rh-preview .rh-modal .rh-modal-quiz__options,
.rh-preview .rh-modal .rh-consult-dialog .rh-modal-quiz__options {
  gap: 10px;
  margin: 0;
}

.rh-preview .rh-modal .rh-modal-quiz__option,
.rh-preview .rh-modal .rh-consult-dialog .rh-modal-quiz__option {
  gap: 12px;
  min-height: 60px;
  padding: 14px 16px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.35;
  cursor: pointer;
  transition: border-color 160ms, background-color 160ms;
}

.rh-preview .rh-modal .rh-modal-quiz__option:hover {
  background: rgba(255, 255, 255, 0.04);
}

.rh-preview .rh-modal .rh-modal-quiz__option input {
  flex: none;
  margin: 0;
}

.rh-preview .rh-modal .rh-modal-quiz .rh-form__status:empty {
  display: none;
}

.rh-preview .rh-modal .rh-modal-quiz__actions {
  gap: 12px;
  margin-top: 8px;
}

.rh-preview .rh-modal .rh-modal-quiz__actions .rh-btn,
.rh-preview .rh-modal .rh-modal-quiz .rh-modal-form__submit {
  min-height: 50px;
  margin: 0;
  padding: 0 24px;
  border-radius: 7px;
}

.rh-preview .rh-modal .rh-modal-quiz__actions .rh-btn--light,
.rh-preview .rh-modal .rh-modal-quiz .rh-modal-form__submit {
  background: #fff;
  color: #2e3d36;
}

.rh-preview .rh-modal .rh-modal-quiz__actions .rh-btn--ghost {
  border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent;
  color: #fff;
}

.rh-preview .rh-modal .rh-modal-quiz__result:not([hidden]) {
  display: grid;
  gap: 12px;
}

.rh-preview .rh-modal .rh-modal-quiz .rh-field {
  gap: 8px;
  margin: 0;
}

.rh-preview .rh-modal .rh-modal-quiz .rh-field input {
  height: 48px;
}

.rh-preview .rh-modal .rh-modal-quiz .rh-checkbox {
  margin: 4px 0;
}

@media (max-width: 640px) {
  .rh-preview .rh-modal .rh-service-dialog__form-panel,
  .rh-preview .rh-modal .rh-service-dialog:not(.rh-consult-dialog) .rh-service-dialog__form-panel:has(.rh-modal-quiz),
  .rh-preview .rh-modal .rh-consult-dialog .rh-service-dialog__form-panel {
    padding: 56px 20px 28px;
  }

  .rh-preview .rh-modal .rh-modal-quiz__options {
    grid-template-columns: 1fr;
  }

  .rh-preview .rh-modal .rh-modal-quiz__actions .rh-btn {
    flex: 1;
  }
}
