.popup {
  position: fixed;
  inset: 0;
  z-index: var(--z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}

.popup[hidden] {
  display: none;
}

.popup__overlay {
  position: absolute;
  inset: 0;
  background: var(--popup-overlay-bg);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.popup__box {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--popup-max-width);
  background: var(--popup-bg);
  border-radius: var(--popup-radius);
  padding: var(--popup-padding);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.popup__close {
  position: absolute;
  top: 16px;
  right: 16px;
  color: var(--color-text);
}

.popup__head {
  margin-bottom: 24px;
}

.popup__edit-notice {
  margin-bottom: 16px;
}

.popup__tag {
  margin-bottom: 8px;
}

.popup__title {
  margin-bottom: 16px;
}

.popup__subtitle {
  margin-top: 8px;
}

.popup__price {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 6px;
  width: fit-content;
}

.popup__price-main {
  font-size: var(--popup-price-size);
  font-weight: 500;
  color: var(--color-white);
  line-height: 1;
  white-space: nowrap;
}

.popup__price-old {
  font-size: var(--font-small);
  text-decoration: line-through;
}

.popup__form {
  margin-bottom: 16px;
}

.popup__legal {
  text-align: center;
}

.popup__legal a {
  color: inherit;
}

/* — ШАГИ ПОПАПА ------------------------------------------------------------ */
.popup__step { display: none; }
.popup[data-step="form"]    .popup__step[data-step="form"],
.popup[data-step="email"]   .popup__step[data-step="email"],
.popup[data-step="success"] .popup__step[data-step="success"],
.popup[data-step="error"]   .popup__step[data-step="error"] { display: block; }

.popup__step-title {
  font-size: var(--popup-status-title-size);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--popup-status-title-mb);
  line-height: var(--popup-status-title-lh);
}

.popup[data-step="success"] .popup__step-title { color: var(--popup-status-color-success); }
.popup[data-step="error"]   .popup__step-title { color: var(--popup-status-color-error); }

.popup__step[data-step="email"]   .popup__step-title,
.popup__step[data-step="success"] .popup__step-title,
.popup__step[data-step="error"]   .popup__step-title {
  font-size: var(--font-h4);
  line-height: var(--lh-card);
}

.popup__step[data-step="success"],
.popup__step[data-step="error"] {
  text-align: center;
}

.popup__step-icon {
  display: flex;
  justify-content: center;
  color: var(--popup-status-color-success);
  margin-bottom: 16px;
}

.popup__step[data-step="error"] .popup__step-icon {
  color: var(--popup-status-color-error);
}

.popup__step[data-step="success"] .popup__close {
  position: static;
  margin-top: 24px;
}

.popup__step-text {
  font-size: var(--popup-status-text-size);
  color: var(--color-text);
  line-height: var(--popup-status-text-lh);
  margin-bottom: var(--popup-status-text-mb);
}

.popup__step-note {
  font-size: var(--font-xs);
  color: var(--color-text-dark);
  line-height: var(--lh-faq);
  margin-bottom: var(--popup-status-text-mb);
}

.popup__step-actions {
  display: flex;
  flex-direction: column;
  gap: var(--popup-status-actions-gap);
  margin-top: 8px;
}

/* — ШАГИ INLINE-ФОРМ ------------------------------------------------------- */
.lead-step { display: none; }
[data-lead-wrap][data-step="form"]    .lead-step[data-step="form"],
[data-lead-wrap][data-step="email"]   .lead-step[data-step="email"],
[data-lead-wrap][data-step="success"] .lead-step[data-step="success"],
[data-lead-wrap][data-step="error"]   .lead-step[data-step="error"] { display: block; }

[data-lead-wrap][data-step="success"] .lead-step[data-step="success"],
[data-lead-wrap][data-step="error"]   .lead-step[data-step="error"] { text-align: center; }

.lead-step__icon {
  display: flex;
  justify-content: center;
  color: var(--popup-status-color-success);
  margin-bottom: 16px;
}

[data-lead-wrap][data-step="error"] .lead-step__icon { color: var(--popup-status-color-error); }

.lead-step__title {
  font-size: var(--popup-status-lead-title-size);
  font-weight: 600;
  color: var(--color-white);
  margin-bottom: var(--popup-status-lead-title-mb);
}

[data-lead-wrap][data-step="success"] .lead-step__title { color: var(--popup-status-color-success); }
[data-lead-wrap][data-step="error"]   .lead-step__title { color: var(--popup-status-color-error); }

.lead-step__text {
  font-size: var(--popup-status-text-size);
  color: var(--color-text);
  line-height: var(--popup-status-text-lh);
  margin-bottom: var(--popup-status-lead-text-mb);
}

.lead-step__phone {
  color: var(--color-white);
  text-decoration: none;
}

.lead-step__phone:hover {
  color: var(--color-accent);
}
