/* Exit Intent Newsletter, grafica del restyle 2026: il «pass» della newsletter
   (stessi colori, caratteri e forme di .lm-nl-pass e .lm-nl-box del sito), senza codice a barre. */

/* Overlay */
#ein-overlay {
    position: fixed;
    inset: 0;
    background: rgb(17 20 24 / .72);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    opacity: 0;
    transition: opacity .3s ease;
}

#ein-overlay.ein-visible {
    opacity: 1;
}

/* Modal: il pass */
#ein-modal {
    background: #fff;
    max-width: 520px;
    width: 100%;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    border-radius: 18px;
    box-shadow: 0 1px 2px rgb(17 20 24 / .08), 0 18px 40px rgb(17 20 24 / .28);
    position: relative;
    font-family: var(--global-body-font-family, "Source Sans 3", sans-serif);
    transform: translateY(-16px);
    transition: transform .3s ease;
}

#ein-overlay.ein-visible #ein-modal {
    transform: translateY(0);
}

/* Header: la testata nera del pass, con la fessura e l'etichetta */
#ein-header {
    background: #111418;
    color: #fff;
    padding: 34px 64px 22px 28px;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

#ein-header::before {
    content: "";
    position: absolute;
    top: 10px;
    left: 50%;
    width: 56px;
    height: 9px;
    margin-left: -28px;
    border-radius: 9px;
    background: #fff;
}

#ein-header::after {
    content: "Newsletter mensile";
    order: -1;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    line-height: 1.4;
    background: var(--global-palette1, #0B5C7E);
    color: #fff;
    padding: 3px 9px;
    border-radius: 4px;
}

#ein-title {
    margin: 0;
    font-family: var(--global-heading-font-family, "Source Serif 4", Georgia, serif);
    font-size: 25px;
    font-weight: 600;
    line-height: 1.22;
    letter-spacing: 0;
    text-transform: none;
    color: #fff;
}

#ein-close-x {
    position: absolute;
    top: 18px;
    right: 12px;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: 0;
    border-radius: 8px;
    color: #fff;
    font-size: 30px;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    opacity: .8;
    transition: opacity .2s, background .2s;
}

#ein-close-x:hover {
    opacity: 1;
    background: rgb(255 255 255 / .1);
}

#ein-close-x:focus-visible {
    opacity: 1;
    outline: 2px solid #fff;
    outline-offset: 0;
}

/* Body */
#ein-body {
    padding: 22px 28px 24px;
}

#ein-description {
    margin: 0 0 18px;
    padding: 0 0 16px;
    border-bottom: 1px dashed #C9CED4;
    font-size: 17px;
    line-height: 1.5;
    color: #4A525C;
}

/* Form row */
#ein-form-row {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

#ein-email {
    flex: 1;
    min-width: 0;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 17px;
    color: #111418;
    background: #fff;
    border: 2px solid #C9CED4;
    border-radius: 8px;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
}

#ein-email::placeholder {
    color: #6B737D;
}

#ein-email:focus {
    border-color: var(--global-palette1, #0B5C7E);
    box-shadow: 0 0 0 3px rgb(210 0 74 / .15);
}

#ein-submit {
    padding: 12px 22px;
    background: var(--global-palette1, #0B5C7E);
    color: #fff;
    border: 0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    transition: background .2s;
}

#ein-submit:hover {
    background: var(--global-palette2, #08445E);
}

#ein-submit:focus-visible {
    outline: 2px solid #111418;
    outline-offset: 2px;
}

#ein-submit:disabled {
    background: #8A9099;
    cursor: not-allowed;
}

/* Message */
#ein-message {
    padding: 10px 14px;
    margin-bottom: 12px;
    border-radius: 8px;
    font-size: 15px;
    line-height: 1.45;
    text-align: left;
}

#ein-message.ein-success {
    background: #E8F3EC;
    color: #13612e;
}

#ein-message.ein-error {
    background: #FCEBE7;
    color: #b82105;
}

/* Privacy */
#ein-privacy {
    font-size: 13px;
    color: #5F6670;
    line-height: 1.45;
    margin-bottom: 14px;
}

#ein-lock {
    display: none;
}

#ein-privacy a {
    color: #5F6670;
    text-decoration: underline;
}

#ein-privacy a:hover {
    color: var(--global-palette1, #0B5C7E);
}

/* Close link */
#ein-close-link {
    display: inline-block;
    font-size: 14px;
    color: #4A525C;
    text-decoration: underline;
    cursor: pointer;
}

#ein-close-link:hover {
    color: #111418;
}

/* Mobile responsive */
@media (max-width: 480px) {
    #ein-header {
        padding: 30px 56px 18px 20px;
        gap: 10px;
    }

    #ein-close-x {
        top: 14px;
        right: 6px;
    }

    #ein-title {
        font-size: 21px;
    }

    #ein-body {
        padding: 18px 20px 20px;
    }

    #ein-description {
        font-size: 16px;
    }

    #ein-form-row {
        flex-direction: column;
    }

    #ein-submit {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    #ein-overlay,
    #ein-modal {
        transition: none;
    }
}
