/* Lead panel — slides from the right (~1/3 viewport)
   Full mode (.is-full) — covers the viewport
   Motion is driven by lead-modal.js (Web Animations) */

body.lead-modal-open {
  overflow: hidden;
}

.lead-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  visibility: hidden;
  pointer-events: none;
}

.lead-modal.is-open,
.lead-modal.is-closing {
  visibility: visible;
  pointer-events: auto;
}

.lead-modal__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: rgb(1 15 36 / 0.4);
  opacity: 0;
}

.lead-modal__dialog {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: min(100%, 22.5rem);
  height: 100%;
  max-height: 100%;
  max-height: 100dvh;
  overflow: hidden;
  background: #fff;
  border: 0;
  border-left: 1px solid rgb(1 15 36 / 0.1);
  box-shadow: none;
  padding: 1.5rem 1.25rem 1.35rem;
  transform: translate3d(100%, 0, 0);
  opacity: 1;
  will-change: transform, opacity;
}

@media (min-width: 1024px) {
  .lead-modal__dialog {
    width: 33.333vw;
    min-width: 22rem;
    max-width: 28rem;
    padding: 1.75rem 1.5rem 1.5rem;
  }
}

/* Drawer: keep native grid layout, fit height without scroll */
.lead-modal:not(.is-full) .lead-modal__inner {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-height: 0;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

.lead-modal:not(.is-full) .lead-modal__title {
  margin: 0 2rem 0.4rem 0;
}

.lead-modal:not(.is-full) .lead-modal__lead {
  margin: 0 0 1.2rem;
}

.lead-modal:not(.is-full) .lead-form {
  width: 100%;
  min-width: 0;
}

.lead-modal:not(.is-full) .lead-form__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(0.85rem, 1.8vh, 1.05rem);
  width: 100%;
}

.lead-modal:not(.is-full) .lead-form .register-field,
.lead-modal:not(.is-full) .lead-form .register-field input,
.lead-modal:not(.is-full) .lead-form .register-field .iti,
.lead-modal:not(.is-full) .lf-select,
.lead-modal:not(.is-full) .lf-select__trigger {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.lead-modal:not(.is-full) .lead-form .register-field input,
.lead-modal:not(.is-full) .lead-form .register-field .iti,
.lead-modal:not(.is-full) .lf-select {
  margin-top: 0.4rem;
}

.lead-modal:not(.is-full) .lead-form .register-field input,
.lead-modal:not(.is-full) .lf-select__trigger {
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
}

.lead-modal:not(.is-full) .lead-form .register-submit.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 2.75rem;
  margin-top: 0.45rem;
  line-height: 1.2;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
}

/* Full-screen contact modal */
.lead-modal.is-full .lead-modal__backdrop {
  background: rgb(1 15 36 / 0.55);
}

.lead-modal.is-full .lead-modal__dialog {
  inset: 0;
  top: 0;
  right: 0;
  left: 0;
  bottom: 0;
  width: 100%;
  min-width: 0;
  max-width: none;
  height: 100%;
  max-height: none;
  border: 0;
  border-left: 0;
  transform: none;
  /* opacity/transform animated in JS — do not force 0 here */
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: auto;
}

.lead-modal.is-full .lead-modal__close {
  top: 1.25rem;
  right: 1.25rem;
  width: 2.5rem;
  height: 2.5rem;
  z-index: 2;
}

.lead-modal.is-full .lead-modal__inner {
  width: min(100% - 2.5rem, 36rem);
  max-height: calc(100% - 3rem);
  overflow: auto;
  padding: 3.25rem 0 2rem;
}

.lead-modal.is-full .lead-modal__title {
  margin: 0 0 0.5rem;
  font-size: clamp(1.65rem, 3vw, 2.15rem);
  font-weight: 300;
  letter-spacing: -0.025em;
}

.lead-modal.is-full .lead-modal__lead {
  margin: 0 0 1.75rem;
  font-size: 1rem;
  max-width: 28rem;
}

.lead-modal.is-full .lead-form__grid {
  grid-template-columns: 1fr;
  gap: 1.1rem;
}

@media (min-width: 640px) {
  .lead-modal.is-full .lead-form__grid {
    grid-template-columns: 1fr 1fr;
  }

  .lead-modal.is-full .lead-form__full {
    grid-column: 1 / -1;
  }
}

.lead-modal__close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  background: transparent;
  color: rgb(1 15 36 / 0.45);
  cursor: pointer;
  transition: color 0.2s ease;
}

.lead-modal__close:hover {
  color: #010f24;
}

.lead-modal__title {
  margin: 0 2rem 0.4rem 0;
  font-family: Nohemi, sans-serif;
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #010f24;
}

.lead-modal__lead {
  margin: 0 0 1.35rem;
  font-size: 0.875rem;
  line-height: 1.55;
  color: rgb(1 15 36 / 0.55);
}

.lead-modal .lead-form__grid {
  grid-template-columns: 1fr;
  gap: 0.95rem;
}

.lead-modal .lead-form .register-field label {
  font-size: 0.68rem;
  color: rgb(1 15 36 / 0.55);
}

.lead-modal .lead-form .register-field input {
  margin-top: 0.4rem;
  border: 0;
  border-bottom: 1px solid rgb(1 15 36 / 0.18);
  background: transparent;
  border-radius: 0;
  padding: 0.55rem 0;
  font-size: 0.9rem;
}

.lead-modal .lead-form .register-field input:focus {
  border-bottom-color: #3054ad;
}

.lead-modal .lead-form .register-field .iti {
  margin-top: 0.4rem;
}

.lead-modal .lead-form .register-field .iti input {
  padding-left: 3.25rem;
}

.lead-modal .lf-select {
  margin-top: 0.4rem;
}

.lead-modal .lf-select__trigger {
  margin-top: 0;
  border: 0;
  border-bottom: 1px solid rgb(1 15 36 / 0.18);
  background: transparent;
  border-radius: 0;
  padding: 0.55rem 0;
  box-shadow: none;
}

.lead-modal .lf-select__trigger:focus,
.lead-modal .lf-select.is-open .lf-select__trigger {
  border-bottom-color: #3054ad;
  outline: none;
}

.lead-modal .lf-select__list {
  border: 1px solid rgb(1 15 36 / 0.12);
  background: #fff;
  box-shadow: none;
}

.lead-modal .lead-form .register-submit.btn-primary {
  min-height: 2.75rem;
  margin-top: 0.35rem;
  background: #3054ad;
  clip-path: none;
  letter-spacing: 0.12em;
}

.lead-modal .lead-form .register-submit.btn-primary:hover {
  filter: brightness(1.06);
}

.lead-modal .lead-form .register-required-note,
.lead-modal .lead-form .register-legal {
  font-size: 0.7rem;
}
