/* Newsletter - flex layout `newsletter`
   Live .block-newsletter: 1px grey rule on top, 64px vertical padding, Teko h2,
   single-row form: full-width email input (grey border, 5px radius) + navy Teko
   button (20px, 15px 32px, 4px radius). Stacks under 746px. */
.newsletter {
    max-width: 100%;
    border-top: 1px solid var(--grey-2);
    background: var(--background);

    & .newsletter_inner {
        padding-top: 64px;
        padding-bottom: 64px;
    }

    & .newsletter_title {
        margin: 0 0 16px;
        font-size: 32px;
        font-weight: 500;
        text-transform: uppercase;
        color: var(--headings);
    }

    & .newsletter_content {
        margin-bottom: 16px;
        color: var(--text-muted);
    }

    /* Built-in form + Formidable / plugin forms share the row layout */
    & .newsletter_form,
    & .newsletter_form_plugin .frm_fields_container {
        display: flex;
        flex-direction: row;
        align-items: center;
        gap: 16px;

        @media (max-width: 746px) {
            flex-direction: column;
            align-items: stretch;
        }
    }

    & .newsletter_label,
    & .newsletter_form_plugin .frm_primary_label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        white-space: nowrap;
    }

    & .newsletter_input,
    & .newsletter_form_plugin input[type="email"],
    & .newsletter_form_plugin input[type="text"] {
        flex: 1;
        width: 100%;
        padding: 14px 32px 14px 16px;
        border: 1px solid var(--grey-2);
        border-radius: var(--radius-sm);
        background: transparent;
        color: var(--black);
        font-family: var(--font-body);
        font-size: 16px;
        font-weight: 400;
        outline: none;
        transition: border-color .3s var(--ease);

        &:focus {
            border-color: var(--secondary);
        }
    }

    & .newsletter_form_plugin .frm_form_field {
        flex: 1;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    & .newsletter_form_plugin .frm_submit {
        margin: 0;

        @media (max-width: 746px) {
            width: 100%;
        }
    }

    & .newsletter_button,
    & .newsletter_form_plugin .frm_submit button,
    & .newsletter_embed button[type="submit"] {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: fit-content;
        margin: 0;
        padding: 15px 32px;
        border: 0;
        border-radius: var(--radius);
        background: var(--primary);
        color: var(--white);
        font-family: var(--font-display);
        font-size: 20px;
        font-weight: 500;
        line-height: 1;
        text-transform: uppercase;
        white-space: nowrap;
        cursor: pointer;
        transition: background-color .3s var(--ease);

        & span {
            color: inherit;
            font-family: inherit;
            font-size: inherit;
            font-weight: inherit;
        }

        &:hover,
        &:focus-visible {
            background: var(--primary-mid);
            color: var(--white);
        }

        @media (max-width: 746px) {
            width: 100%;
        }
    }
}
