.newsletter-popup {
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 9000;

    width: min(430px, calc(100vw - 32px));
    padding: 26px;

    background: #ffffff;
    color: #10233d;

    border: 1px solid #dce5ee;
    border-radius: 18px;

    box-shadow:
        0 24px 60px rgba(16, 35, 61, 0.18),
        0 6px 20px rgba(16, 35, 61, 0.08);

    opacity: 0;
    transform: translateY(18px) scale(0.985);

    transition:
        opacity 180ms ease,
        transform 180ms ease;
}

.newsletter-popup[hidden] {
    display: none !important;
}

.newsletter-popup.is-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.newsletter-popup__close {
    position: absolute;
    top: 12px;
    right: 14px;

    border: 0;
    background: transparent;

    color: #75869a;
    font-size: 28px;
    line-height: 1;

    cursor: pointer;
}

.newsletter-popup__close:hover {
    color: #10233d;
}

.newsletter-popup__title {
    max-width: 350px;
    margin: 0 28px 10px 0;

    color: #10233d;
    font-size: 24px;
    line-height: 1.15;
    letter-spacing: -0.025em;
}

.newsletter-popup__intro {
    margin: 0 0 18px;

    color: #5f6f80;
    font-size: 14px;
    line-height: 1.55;
}

.newsletter-popup__label {
    display: block;
    margin-bottom: 7px;

    font-size: 13px;
    font-weight: 700;
}

.newsletter-popup__controls {
    display: flex;
    gap: 8px;
}

.newsletter-popup__input {
    min-width: 0;
    flex: 1;

    padding: 11px 12px;

    border: 1px solid #cad6e2;
    border-radius: 10px;

    background: #ffffff;
    color: #10233d;

    font: inherit;
}

.newsletter-popup__input:focus {
    outline: 3px solid rgba(53, 107, 164, 0.15);
    border-color: #5379a5;
}

.newsletter-popup__submit {
    flex: 0 0 auto;

    padding: 11px 15px;

    border: 0;
    border-radius: 10px;

    background: #10233d;
    color: #ffffff;

    font: inherit;
    font-size: 13px;
    font-weight: 800;

    cursor: pointer;
}

.newsletter-popup__submit:hover {
    background: #17385f;
}

.newsletter-popup__submit:disabled {
    opacity: 0.6;
    cursor: wait;
}

.newsletter-popup__consent {
    margin: 11px 0 0;

    color: #7a8795;
    font-size: 11px;
    line-height: 1.45;
}

.newsletter-popup__consent a {
    color: inherit;
    text-decoration: underline;
}

.newsletter-popup__honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.newsletter-popup__error {
    margin: 10px 0 0;

    color: #b42318;
    font-size: 12px;
}

.newsletter-popup__success {
    display: flex;
    flex-direction: column;
    gap: 7px;

    padding: 14px;

    border-radius: 12px;
    background: #f2f7f4;

    color: #214c39;
    font-size: 14px;
    line-height: 1.5;
}

@media (max-width: 640px) {
    .newsletter-popup {
        right: 12px;
        bottom: 12px;
        width: calc(100vw - 24px);
        padding: 22px 18px;
    }

    .newsletter-popup__controls {
        flex-direction: column;
    }

    .newsletter-popup__submit {
        width: 100%;
    }
}

/*
 * Elements controlled by JavaScript must remain hidden
 * until their hidden attribute is explicitly removed.
 */
.newsletter-popup [hidden] {
    display: none !important;
}
