/* ═══════════════════════════════════════════════════════════════════════════
   STROYKA LEADS — Modal form styles
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Floating action button ────────────────────────────────────────────── */
.lead-fab {
  position: fixed;
  bottom: 28px;
  right: 24px;
  z-index: 8000;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 20px 0 16px;
  height: 52px;
  background: var(--clr-accent, #1da268);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(29, 162, 104, .45);
  transition: transform .2s, box-shadow .2s, background .2s;
  font-family: inherit;
}
.lead-fab:hover {
  background: #158050;
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(29, 162, 104, .55);
}
.lead-fab i { font-size: 18px; }
.lead-fab__label { letter-spacing: .02em; }

/* ── Overlay ────────────────────────────────────────────────────────────── */
.lead-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 9900;
  background: rgba(8, 18, 38, .7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: lmOverlayIn .22s ease both;
}
.lead-modal-overlay[hidden] { display: none !important; }

@keyframes lmOverlayIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Modal shell ────────────────────────────────────────────────────────── */
.lead-modal {
  position: relative;
  display: flex;
  width: 100%;
  max-width: 860px;
  max-height: 90dvh;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 28px 90px rgba(0, 0, 0, .38), 0 4px 20px rgba(0, 0, 0, .15);
  animation: lmModalIn .32s cubic-bezier(.34, 1.28, .64, 1) both;
}

@keyframes lmModalIn {
  from { opacity: 0; transform: scale(.9) translateY(28px); }
  to   { opacity: 1; transform: none; }
}

/* ── Close ──────────────────────────────────────────────────────────────── */
.lead-modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 20;
  width: 34px;
  height: 34px;
  background: #fff;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(17, 24, 39, .12);
  border-radius: 50%;
  color: #111827;
  font-size: 13px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 22px rgba(17, 24, 39, .14);
  transition: background .2s, color .2s, transform .18s, box-shadow .2s;
  padding: 0;
}
.lead-modal__close:hover {
  background: var(--clr-accent, #1da268);
  color: #fff;
  box-shadow: 0 10px 26px rgba(29, 162, 104, .28);
  transform: scale(1.12) rotate(90deg);
}

/* ── Image panel ────────────────────────────────────────────────────────── */
.lead-modal__image {
  flex: 0 0 40%;
  background: linear-gradient(160deg, #1a2d55 0%, #b84400 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  min-height: 480px;
}

.lead-modal__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    170deg,
    rgba(8, 20, 14, .82) 0%,
    rgba(26, 56, 40, .70) 100%
  );
  display: flex;
  align-items: flex-end;
  padding: 40px 36px;
}

.lead-modal__image-content { color: #fff; width: 100%; }

.lead-modal__logo-badge {
  width: 50px;
  height: 50px;
  background: var(--clr-accent, #1da268);
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 22px;
  box-shadow: 0 10px 30px rgba(29, 162, 104, .45);
}

.lead-modal__image-title {
  font-size: 2.1rem;
  font-weight: 900;
  line-height: 1.12;
  margin: 0 0 14px;
  letter-spacing: -.4px;
  color: #fff;
  text-shadow: 0 2px 16px rgba(0,0,0,.55);
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.lead-modal__image-tagline {
  font-size: .88rem;
  opacity: .88;
  margin-bottom: 22px;
  font-weight: 500;
}

.lead-modal__perks {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.lead-modal__perks li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: .84rem;
  font-weight: 500;
  opacity: .92;
}
.lead-modal__perks li i {
  color: #4ade80;
  font-size: 15px;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 4px rgba(74,222,128,.5));
}

/* ── Form side ──────────────────────────────────────────────────────────── */
.lead-modal__form-side {
  flex: 1;
  overflow-y: auto;
  padding: 40px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
}

.lead-modal__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--clr-accent, #1da268);
  background: rgba(29, 162, 104, .09);
  padding: 4px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

.lead-modal__title {
  font-size: 1.65rem;
  font-weight: 900;
  margin: 0 0 6px;
  color: #111827;
  letter-spacing: -.3px;
}

.lead-modal__subtitle {
  font-size: .85rem;
  color: #6b7280;
  margin-bottom: 24px;
  line-height: 1.5;
}

/* ── Form groups ────────────────────────────────────────────────────────── */
.lead-form__group { margin-bottom: 16px; }

.lead-form__label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  color: #374151;
  margin-bottom: 6px;
  letter-spacing: .01em;
}
.lead-form__req  { color: var(--clr-accent, #1da268); }
.lead-form__opt  { font-weight: 400; color: #9ca3af; font-size: .73rem; }

.lead-form__input-wrap {
  position: relative;
}
.lead-form__input-wrap > i {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: #9ca3af;
  font-size: 15px;
  pointer-events: none;
  z-index: 1;
  transition: color .2s;
}
.lead-form__input-wrap--area > i {
  top: 13px;
  transform: none;
}

.lead-form__input {
  display: block;
  width: 100%;
  padding: 12px 14px 12px 40px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: .9rem;
  font-family: inherit;
  color: #111827;
  background: #f9fafb;
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.lead-form__input:focus {
  border-color: var(--clr-accent, #1da268);
  background: #fff;
  box-shadow: 0 0 0 3px rgba(29, 162, 104, .13);
}
.lead-form__input:focus + i,
.lead-form__input-wrap:focus-within > i {
  color: var(--clr-accent, #1da268);
}
.lead-form__input.is-error {
  border-color: #ef4444;
  background: #fff5f5;
}
.lead-form__input.is-error:focus {
  box-shadow: 0 0 0 3px rgba(239, 68, 68, .13);
}

.lead-form__textarea {
  resize: vertical;
  min-height: 82px;
  line-height: 1.5;
}

.lead-form__error {
  display: block;
  font-size: .73rem;
  color: #ef4444;
  margin-top: 4px;
  min-height: 16px;
  font-weight: 500;
}

/* ── Custom checkbox ────────────────────────────────────────────────────── */
.lead-form__consent-wrap { margin-bottom: 20px; }

.lead-form__consent-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}
.lead-form__consent-label input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.lead-form__checkmark {
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  border: 2px solid #d1d5db;
  border-radius: 5px;
  margin-top: 1px;
  background: #fff;
  transition: border-color .18s, background .18s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lead-form__consent-label input:checked ~ .lead-form__checkmark {
  background: var(--clr-accent, #1da268);
  border-color: var(--clr-accent, #1da268);
}
.lead-form__consent-label input:checked ~ .lead-form__checkmark::after {
  content: '';
  display: block;
  width: 5px;
  height: 8px;
  border: 2px solid #fff;
  border-top: 0;
  border-left: 0;
  transform: rotate(45deg) translateY(-1px);
}
.lead-form__consent-text {
  font-size: .8rem;
  color: #6b7280;
  line-height: 1.45;
}
.lead-form__consent-text a {
  color: var(--clr-accent, #1da268);
  text-decoration: underline;
}

/* ── Submit button ──────────────────────────────────────────────────────── */
.lead-form__submit {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 24px;
  background: var(--clr-accent, #1da268);
  color: #fff;
  font-size: .95rem;
  font-weight: 700;
  font-family: inherit;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  transition: background .2s, transform .15s, box-shadow .2s;
  box-shadow: 0 6px 24px rgba(29, 162, 104, .38);
  letter-spacing: .01em;
}
.lead-form__submit:hover:not(:disabled) {
  background: #158050;
  transform: translateY(-1px);
  box-shadow: 0 10px 32px rgba(29, 162, 104, .5);
}
.lead-form__submit:active:not(:disabled) { transform: none; }
.lead-form__submit:disabled {
  opacity: .7;
  cursor: not-allowed;
}

.lead-form__submit-arrow {
  width: 28px;
  height: 28px;
  background: rgba(255, 255, 255, .22);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: transform .2s;
}
.lead-form__submit:hover:not(:disabled) .lead-form__submit-arrow {
  transform: translateX(3px);
}

/* spinner */
.lead-form__spinner[hidden] { display: none !important; }
.lead-form__spinner {
  display: flex;
  align-items: center;
}
.lead-spinner-ring {
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255,255,255,.38);
  border-top-color: #fff;
  border-radius: 50%;
  animation: lmSpin .7s linear infinite;
}
@keyframes lmSpin { to { transform: rotate(360deg); } }

/* ── Guarantee line ─────────────────────────────────────────────────────── */
.lead-modal__guarantee {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .74rem;
  color: #9ca3af;
  margin: 12px 0 0;
  line-height: 1.4;
}
.lead-modal__guarantee i { color: #10b981; font-size: 15px; flex-shrink: 0; }

/* ── Success panel ──────────────────────────────────────────────────────── */
.lead-success { display: flex; align-items: center; justify-content: center; flex: 1; }
.lead-success[hidden] { display: none !important; }

.lead-success__inner {
  text-align: center;
  padding: 24px 8px;
  animation: lmSuccessIn .5s cubic-bezier(.34, 1.3, .64, 1) both;
}
@keyframes lmSuccessIn {
  from { opacity: 0; transform: scale(.82); }
  to   { opacity: 1; transform: none; }
}

.lead-success__icon-wrap {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px;
  box-shadow: 0 14px 44px rgba(16, 185, 129, .38);
  animation: lmPop .55s cubic-bezier(.34, 1.55, .64, 1) .08s both;
}
@keyframes lmPop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}
.lead-success__svg { width: 44px; height: 44px; }

/* Animated SVG check */
.lead-success__circle {
  stroke-dasharray: 160;
  stroke-dashoffset: 160;
  animation: lmCircle .5s ease .15s forwards;
}
@keyframes lmCircle { to { stroke-dashoffset: 0; } }

.lead-success__check {
  stroke-dasharray: 36;
  stroke-dashoffset: 36;
  animation: lmCheck .35s ease .55s forwards;
}
@keyframes lmCheck { to { stroke-dashoffset: 0; } }

.lead-success__title {
  font-size: 1.65rem;
  font-weight: 900;
  color: #111827;
  margin-bottom: 12px;
  letter-spacing: -.3px;
}
.lead-success__text {
  color: #4b5563;
  margin-bottom: 8px;
  line-height: 1.6;
  font-size: .93rem;
}
.lead-success__sub {
  font-size: .82rem;
  color: #9ca3af;
  margin-bottom: 28px;
}
.lead-success__btn { min-width: 160px; }

/* ── Mobile ─────────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  .lead-modal {
    flex-direction: column;
    max-height: 96dvh;
    border-radius: 18px;
    overflow-y: auto;
  }

  .lead-modal__image {
    flex: 0 0 190px;
    min-height: 190px;
  }
  .lead-modal__image-overlay {
    padding: 22px 58px 22px 22px;
    align-items: flex-end;
  }
  .lead-modal__image-content {
    max-width: 100%;
  }
  .lead-modal__image-title {
    max-width: 310px;
    font-size: clamp(1.75rem, 8vw, 2.35rem);
    line-height: 1.08;
    margin-bottom: 0;
  }
  .lead-modal__image-tagline,
  .lead-modal__perks { display: none; }
  .lead-modal__logo-badge {
    width: 48px;
    height: 48px;
    margin-bottom: 14px;
  }

  .lead-modal__form-side {
    padding: 24px 20px 28px;
    overflow-y: visible;
  }
  .lead-modal__title { font-size: 1.35rem; }

  .lead-modal__close {
    background: #fff;
    color: #111827;
  }

  .lead-fab { bottom: 80px; } /* above mobile browser nav */
}

@media (max-width: 380px) {
  .lead-modal__image    { flex: 0 0 178px; min-height: 178px; }
  .lead-modal__image-overlay { padding: 20px 54px 20px 20px; }
  .lead-modal__image-title { font-size: 1.8rem; }
  .lead-modal__form-side { padding: 20px 16px 24px; }
  .lead-modal__title    { font-size: 1.2rem; }
  .lead-fab__label      { display: none; }
  .lead-fab             { padding: 0; width: 50px; height: 50px; justify-content: center; }
}
