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

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

.ezw-lead-modal {
    position: fixed;
    inset: 0;
    z-index: 100000;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 180ms ease, visibility 180ms ease;
}

.ezw-lead-modal.is-open {
    opacity: 1;
    visibility: visible;
}

.ezw-lead-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 7, 5, .82);
    backdrop-filter: blur(7px);
}

.ezw-lead-modal__card {
    position: relative;
    width: min(100%, 540px);
    max-height: calc(100vh - 48px);
    overflow-y: auto;
    padding: 34px;
    border: 1px solid rgba(214, 183, 93, .46);
    border-radius: 20px;
    background: linear-gradient(145deg, #222014 0%, #11150f 68%, #0c100d 100%);
    color: #f8f4e8;
    box-shadow: 0 32px 90px rgba(0, 0, 0, .58), 0 0 0 1px rgba(214, 183, 93, .08) inset;
    transform: translateY(12px) scale(.985);
    transition: transform 180ms ease;
}

.ezw-lead-modal.is-open .ezw-lead-modal__card {
    transform: translateY(0) scale(1);
}

.ezw-lead-modal__close {
    position: absolute;
    top: 14px;
    right: 14px;
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid rgba(214, 183, 93, .28);
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    color: #e8d79e;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
}

.ezw-lead-modal__close:hover,
.ezw-lead-modal__close:focus-visible {
    border-color: #d6b75d;
    background: rgba(214, 183, 93, .12);
    outline: none;
}

.ezw-lead-modal__eyebrow {
    margin: 0 0 8px;
    color: #d6b75d;
    font-size: .8rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.ezw-lead-modal__card h2 {
    margin: 0;
    color: #fffaf0;
    font-size: clamp(2rem, 7vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.ezw-lead-modal__intro {
    max-width: 430px;
    margin: 12px 0 24px;
    color: #c8c1ad;
    font-size: 1rem;
    line-height: 1.65;
}

.ezw-lead-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 17px 14px;
}

.ezw-lead-form__field {
    min-width: 0;
}

.ezw-lead-form__field--full,
.ezw-lead-form__privacy,
.ezw-lead-form__status,
.ezw-lead-form__submit {
    grid-column: 1 / -1;
}

.ezw-lead-form__field label {
    display: block;
    margin: 0 0 7px;
    color: #eee5cd;
    font-size: .875rem;
    font-weight: 600;
}

.ezw-lead-form__field label span {
    color: #9e9786;
    font-weight: 400;
}

.ezw-lead-form__field input {
    display: block;
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: 11px 13px;
    border: 1px solid rgba(214, 183, 93, .28);
    border-radius: 10px;
    background: rgba(255, 255, 255, .045);
    color: #fff;
    font: inherit;
    font-size: 1rem;
    outline: none;
    transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.ezw-lead-form__field input::placeholder {
    color: #817d70;
}

.ezw-lead-form__field input:focus {
    border-color: #d6b75d;
    background: rgba(255, 255, 255, .07);
    box-shadow: 0 0 0 3px rgba(214, 183, 93, .12);
}

.ezw-lead-form__trap {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    white-space: nowrap !important;
}

.ezw-lead-form__privacy {
    margin: -2px 0 0;
    color: #958f80;
    font-size: .8rem;
    line-height: 1.55;
}

.ezw-lead-form__status {
    min-height: 0;
    margin: -4px 0 0;
    font-size: .9rem;
    line-height: 1.5;
}

.ezw-lead-form__status:empty {
    display: none;
}

.ezw-lead-form__status.is-success {
    color: #bce7ae;
}

.ezw-lead-form__status.is-error {
    color: #ffb6ac;
}

.ezw-lead-form__submit {
    min-height: 50px;
    padding: 12px 20px;
    border: 0;
    border-radius: 10px;
    background: linear-gradient(135deg, #e0b62e, #c58d08);
    color: #17150d;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 12px 26px rgba(198, 143, 10, .22);
}

.ezw-lead-form__submit:hover,
.ezw-lead-form__submit:focus-visible {
    filter: brightness(1.08);
    outline: 2px solid #f3d77e;
    outline-offset: 3px;
}

.ezw-lead-form__submit:disabled {
    cursor: wait;
    opacity: .65;
}

@media (max-width: 600px) {
    .ezw-lead-modal {
        place-items: center;
        padding: 16px;
    }

    .ezw-lead-modal__card {
        width: min(100%, 340px);
        max-height: calc(100dvh - 32px);
        padding: 20px 16px 16px;
        border-radius: 16px;
    }

    .ezw-lead-modal__eyebrow {
        margin-bottom: 5px;
        font-size: .72rem;
    }

    .ezw-lead-modal__card h2 {
        font-size: 1.7rem;
        line-height: 1.08;
    }

    .ezw-lead-modal__intro {
        margin: 8px 0 14px;
        font-size: .9rem;
        line-height: 1.45;
    }

    .ezw-lead-form {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .ezw-lead-form__field,
    .ezw-lead-form__privacy,
    .ezw-lead-form__status,
    .ezw-lead-form__submit {
        grid-column: 1;
    }

    .ezw-lead-form__field label {
        margin-bottom: 4px;
        font-size: .8rem;
    }

    .ezw-lead-form__field input {
        min-height: 42px;
        padding: 8px 11px;
        border-radius: 8px;
        font-size: .95rem;
    }

    .ezw-lead-form__privacy {
        margin-top: 0;
        font-size: .72rem;
        line-height: 1.4;
    }

    .ezw-lead-form__submit {
        min-height: 44px;
        padding: 10px 16px;
        border-radius: 8px;
        font-size: .95rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ezw-lead-modal,
    .ezw-lead-modal__card {
        transition: none;
    }
}
