.section-newsletter {
    background-color: var(--color-violet-100);
    color: var(--color-black);
}

.section-newsletter h2.wp-block-heading {
    letter-spacing: 0.2px;
    line-height: 1.4;
}

.section-newsletter p {
    letter-spacing: 0.1px;
    
    @media (width >=1024px) {
        font-size: var(--text-base-lg);
    }
}

.section-newsletter p br {
    @media (width <=620px) {
        display: none;
    }
}

.section-newsletter .formkit-form {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    padding-block: 1.2rem 0.4rem;

    @media (width >=600px) {
        flex-direction: row;
    }

    @media (width >=769px) {
        gap: 0;
    }
}

.section-newsletter .newsletter-field {
    width: 100%;
    
    @media (width >=600px) {
        max-width: 435px;
        margin-right: -3rem;
    }
}

.section-newsletter form.formkit-form[data-format="inline"] {
    margin-bottom: 0;
}

.section-newsletter input[type="email"] {
    border-color: var(--color-beige-100);
    padding: 0.72rem 5rem 0.72rem 2.4rem;
    border-radius: calc(infinity * 1px);

    @media (width >=679px) {
        border-top-right-radius: 0;
        border-bottom-right-radius: 0;
    }
}

.section-newsletter .newsletter-error-text {
    display: block;
    margin-top: 0.5rem;
    color: var(--color-red-500);
    font-size: var(--text-xs);
    text-align: center;
}

.section-newsletter .nds-btn {
    position: relative;
    display: block;
    width: 100%;
    padding: calc(var(--spacing) * 3.8) 10px;
    white-space: nowrap;

    @media (width >=600px) {
        flex: 0 0 225px;
        margin-left: 1rem;
    }

    @media (width >=1024px) {
        flex: 0 0 275px;
    }
}

.section-newsletter .formkit-alert-success + .nds-btn {
    display: none;
}

.section-newsletter .nds-btn span {
    position: relative;
}

.section-newsletter .nds-btn[disabled] .formkit-spinner {
    display: inline-flex;
}

/* Spinner container */
.formkit-spinner {
    position: absolute;
    width: 100%;
    height: 20px;
    left: 0;
    display: none;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

/* Spinner dots */
.formkit-spinner div {
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background-color: var(--color-indigo-400);
    opacity: 0.3;
    animation: formkit-dot 1.2s infinite ease-in-out;
}

.formkit-spinner div:nth-child(1) { animation-delay: 0s; }
.formkit-spinner div:nth-child(2) { animation-delay: 0.15s; }
.formkit-spinner div:nth-child(3) { animation-delay: 0.3s; }

@keyframes formkit-dot {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

.formkit-alert {
    font-size: var(--text-sm);
}

.formkit-alert-success {
    display: flex;
    gap: 5px;
}

ul.formkit-alert-error {
    flex: 0 0 100%;
    width: 100%;
    text-align: center;
}

.formkit-alert-success::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    color: var(--color-indigo-700);
    background-color: var(--color-indigo-700);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6L9 17L4 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 6L9 17L4 12' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

ul.formkit-alert-error li {
    display: flex;
    justify-content: center;
    gap: 5px;
    color: var(--color-red-500);
}

ul.formkit-alert-error li::before {
    content: '';
    display: inline-block;
    width: 24px;
    height: 24px;
    background-color: var(--color-red-500);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 6L6 18' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6 6L18 18' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M18 6L6 18' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M6 6L18 18' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}


