/* ---- Формы заявок и всплывающее окно ---- */

.lead-hp {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
}

.lead-form input::placeholder,
.lead-form textarea::placeholder { color: #9a9a9a; }

.lead-form textarea {
  width: 100%;
  min-height: 92px;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 14px 16px;
  background: var(--color-white);
  font-family: inherit;
  font-size: var(--fs-body);
  line-height: 1.4;
  color: var(--color-black);
  outline: 0;
  resize: vertical;
}
.lead-form textarea:focus { border-color: var(--color-accent); }
.lead-form .form__input-wrap small { opacity: .7; font-size: max(12px, .85em); }

.lead-form .is-invalid { border-color: #e5484d !important; }

.lead-form__error {
  display: block;
  min-height: 0;
  margin-top: 4px;
  font-style: normal;
  font-size: var(--fs-caption);
  line-height: var(--lh-caption);
  color: #ff8a8d;
}
.lead-form__error:empty { display: none; }

.lead-form__consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  font-size: var(--fs-micro);
  line-height: var(--lh-micro);
  color: rgba(255, 255, 255, 0.88);
  cursor: pointer;
}
.lead-form__consent input {
  flex: 0 0 18px;
  width: 18px; height: 18px;
  margin: 0;
  accent-color: var(--color-accent);
}
.lead-form__consent a { color: inherit; text-decoration: underline; }
.lead-form__consent a:hover { color: var(--color-accent); }

.lead-form .form__submit:disabled { opacity: .6; cursor: progress; }

.lead-form__status {
  margin-top: 12px;
  font-size: var(--fs-small);
  line-height: var(--lh-small);
}
.lead-form__status:empty { display: none; }
.lead-form__status.is-success {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(70, 167, 88, .18);
  color: #c9f2d2;
}
.lead-form__status.is-error { color: #ff8a8d; }

/* после успешной отправки прячем поля, оставляем сообщение */
.lead-form.is-sent .form__input-wrap,
.lead-form.is-sent .lead-form__consent,
.lead-form.is-sent .form__submit { display: none; }

/* ---- Модальное окно ---- */
html.lead-modal-open { overflow: hidden; }

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 10000; /* выше cookie-баннера (9999) */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  transition: opacity .2s ease;
}
.lead-modal[hidden] { display: none; }
.lead-modal.is-open { opacity: 1; }

.lead-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .7);
}

.lead-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  padding: 36px 32px 28px;
  border-radius: var(--radius-image);
  background: var(--color-card-grey);
  box-shadow: var(--shadow-soft);
  color: var(--color-white);
  transform: translateY(12px);
  transition: transform .2s ease;
}
.lead-modal.is-open .lead-modal__dialog { transform: none; }

.lead-modal__close {
  position: absolute;
  top: 12px; right: 14px;
  width: 36px; height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.88);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}
.lead-modal__close:hover { color: var(--color-white); background: rgba(255, 255, 255, .08); }

.lead-modal__title {
  margin: 0 32px 10px 0;
  font-size: 26px;
  line-height: 1.2;
  font-weight: 700;
}
.lead-modal__text {
  margin: 0 0 18px;
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: rgba(255, 255, 255, 0.88);
}
.lead-modal__product {
  margin: -6px 0 18px;
  padding: 10px 14px;
  border-left: 3px solid var(--color-accent);
  border-radius: 6px;
  background: rgba(255, 255, 255, .05);
  font-size: var(--fs-small);
  line-height: var(--lh-small);
  font-weight: 600;
}
.lead-modal__product[hidden] { display: none; }

.lead-modal .form__inner { max-width: none; }
.lead-modal .form__input-wrap span { color: rgba(255, 255, 255, 0.88); }

/* ---- Кнопка в карточке товара ---- */
.catalog-product__lead {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: 100%;
  margin-bottom: 10px;
  padding: 15px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--color-accent);
  color: var(--color-on-accent);
  font-family: inherit;
  font-size: 15px;
  line-height: 22px;
  font-weight: 700;
  cursor: pointer;
  transition: background-color .2s ease, transform .2s ease;
}
.catalog-product__lead:hover { background: var(--color-accent-dark); transform: translateY(-1px); }
.catalog-product__lead .button__arrow { flex: 0 0 auto; }

@media (max-width: 575px) {
  .lead-modal__dialog { padding: 30px 18px 22px; }
  .lead-modal__title { font-size: 22px; }
}

/* Вторичная кнопка (у товаров без своих фото) */
.catalog-product__lead--ghost {
  background: transparent;
  color: var(--color-white);
  border: 1px solid rgba(255, 255, 255, .35);
}
.catalog-product__lead--ghost:hover {
  background: rgba(255, 255, 255, .06);
  border-color: var(--color-white);
}
