.lead-modal[hidden] {
    display: none;
}

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

.lead-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    padding: 20px;
    font-family: Inter, Arial, sans-serif;
}

.lead-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgb(8 14 28 / 76%);
    backdrop-filter: blur(6px);
}

.lead-modal__dialog {
    position: relative;
    width: min(100%, 520px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    border: 1px solid rgb(255 255 255 / 16%);
    border-radius: 24px;
    background: #fff;
    color: #17213a;
    box-shadow: 0 28px 90px rgb(0 0 0 / 34%);
}

.lead-modal__content {
    padding: 38px;
}

.lead-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: 50%;
    background: #eef2f7;
    color: #24304a;
    font: 400 28px/1 Arial, sans-serif;
    cursor: pointer;
}

.lead-modal__close:hover,
.lead-modal__close:focus-visible {
    background: #dfe6ef;
}

.lead-modal__eyebrow {
    margin: 0 48px 8px 0;
    color: #167148;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.lead-modal h2 {
    margin: 0 42px 12px 0;
    color: #101a3d;
    font-family: Montserrat, Arial, sans-serif;
    font-size: clamp(1.65rem, 5vw, 2.25rem);
    line-height: 1.12;
}

.lead-modal__description {
    margin: 0 0 24px;
    color: #536078;
    font-size: 0.98rem;
    line-height: 1.6;
}

.lead-modal__alert {
    margin: 0 0 16px;
    padding: 11px 13px;
    border: 1px solid #efb5b5;
    border-radius: 10px;
    background: #fff1f1;
    color: #8a2020;
    font-size: 0.88rem;
    line-height: 1.45;
}

.lead-modal__form {
    display: grid;
    gap: 16px;
}

.lead-modal__field {
    display: grid;
    gap: 7px;
    color: #25314a;
    font-size: 0.88rem;
    font-weight: 700;
}

.lead-modal__field input {
    width: 100%;
    height: 50px;
    border: 1px solid #cdd6e3;
    border-radius: 11px;
    background: #fff;
    color: #17213a;
    padding: 0 14px;
    font: 500 1rem/1 Inter, Arial, sans-serif;
    outline: none;
}

.lead-modal__field input:focus,
.lead-modal__phone:focus-within {
    border-color: #167148;
    box-shadow: 0 0 0 3px rgb(22 113 72 / 14%);
}

.lead-modal__phone {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    min-width: 0;
    border: 1px solid #cdd6e3;
    border-radius: 11px;
    background: #fff;
    overflow: hidden;
}

.lead-modal__phone.is-invalid {
    border-color: #ba3535;
}

.lead-modal__phone input {
    min-width: 0;
    border: 0;
    border-radius: 0;
    box-shadow: none;
}

.lead-modal__phone input:focus {
    box-shadow: none;
}

.lead-modal__prefix {
    align-self: stretch;
    display: grid;
    place-items: center;
    padding: 0 13px;
    border-right: 1px solid #dce3ec;
    background: #f4f7fa;
    color: #26334d;
    font-weight: 800;
}

.lead-modal__field small {
    color: #68758d;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.4;
}

.lead-modal__field-error {
    color: #a32929 !important;
}

.lead-modal__consent {
    display: grid;
    grid-template-columns: 19px 1fr;
    gap: 10px;
    align-items: start;
    color: #546078;
    font-size: 0.76rem;
    line-height: 1.5;
}

.lead-modal__consent input {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: #167148;
}

.lead-modal__consent a {
    color: #1558a6;
    font-weight: 700;
}

.lead-modal__submit {
    min-height: 52px;
    border: 0;
    border-radius: 12px;
    background: #167148;
    color: #fff;
    padding: 13px 20px;
    font: 800 0.98rem/1.25 Montserrat, Arial, sans-serif;
    cursor: pointer;
    box-shadow: 0 10px 24px rgb(22 113 72 / 22%);
}

.lead-modal__submit:hover,
.lead-modal__submit:focus-visible {
    background: #105d3a;
}

.lead-modal__submit:disabled {
    cursor: wait;
    opacity: 0.72;
}

.lead-modal__disclaimer {
    margin: -3px 0 0;
    color: #738097;
    font-size: 0.72rem;
    line-height: 1.5;
    text-align: center;
}

.lead-modal__dismiss {
    justify-self: center;
    border: 0;
    background: transparent;
    color: #55627a;
    padding: 3px 8px;
    font: 600 0.82rem/1.3 Inter, Arial, sans-serif;
    text-decoration: underline;
    text-underline-offset: 3px;
    cursor: pointer;
}

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

@media (max-width: 560px) {
    .lead-modal {
        align-items: center;
        padding: 10px;
    }

    .lead-modal__dialog {
        max-height: calc(100vh - 20px);
        border-radius: 20px;
    }

    .lead-modal__content {
        padding: 30px 22px 24px;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .lead-modal:not([hidden]) .lead-modal__dialog {
        animation: lead-modal-enter 220ms ease-out both;
    }

    @keyframes lead-modal-enter {
        from {
            opacity: 0;
            transform: translateY(14px) scale(0.985);
        }
    }
}
