.op3-element[data-op3-element-type$="form"] {

    width: 100%;
    max-width: 100%;
    margin: 0 auto;

    // @todo - move to core?
    .visually-hidden {
        position: absolute;
        display: block;
        visibility: hidden;
        width: 1px;
        height: 1px;
        margin: -1px;
        padding: 0;
        border: 0;
        clip: rect(0, 0, 0, 0);
        overflow: hidden;
        white-space: nowrap;
    }

    .op3-element-form__container {
        padding: 20px;
        overflow: visible;
        border-width: 0;
    }

    .op3-element-form__children {
        --op3-flex-gap:20px;
        --op3-flex-basis-steps:4;
        --op3-flex-basis-span:1;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        flex-wrap: wrap;
        gap: var(--op3-flex-gap);
    }

    // Child elements.
    .op3-element {
        width: 100%;
        margin: 0;

        // Do not use field sizing for headline and text, always use user
        // defined size.
        &[data-op3-element-type="headline"],
        &[data-op3-element-type="text"] {
            flex-basis: auto !important;
        }

        // Make sure show_all_elements doesn't override input hidden.
        &[data-op3-element-spec="hidden"] {
            display: none !important;
        }

        // Button element (submit) styling.
        &[data-op3-element-type="button"] {
            max-width: 100%;

            > .op3-link {
                padding: 0.25em 1em;
                border-radius: 3px;
            }
        }
    }

    // Hide GDPR checkboxes when "Show to EU visitors only" is selected but
    // visitor is not from EU.
    [data-op3-gdpr-disabled] .op3-element-form__children .op3-element {
        &[data-op3-element-spec="gdpr1"],
        &[data-op3-element-spec="gdpr2"] {
            display: none !important;
        }
    }

    // Hide GDPR checkboxes when gdpr is off
    [name="optin-gdpr-activate"][value="off"] ~ .op3-element-form__children .op3-element {
        &[data-op3-element-spec="gdpr1"],
        &[data-op3-element-spec="gdpr2"] {
            display: none !important;
        }
    }




    /*
    // stacked or inline
    [data-op3-optin-field-layout] {
        flex-direction: column;
        align-items: center;

        &[data-op3-optin-field-layout="inline"] {
            flex-direction: row;
            align-items: flex-end;
            flex-wrap: wrap;

            .op3-element[data-op3-element-spec="gdpr1"],
            .op3-element[data-op3-element-spec="gdpr2"] {
                order: 9999;
                margin-right: 0 !important;
                margin-left: 0 !important;
                margin-bottom: 0 !important;
            }

            .op3-element {
                margin: 0 !important;
                flex-grow: 1;
            }
        }

        &[data-op3-optin-field-layout="stacked"] {
            .op3-element {
                &:not([data-op3-element-type="button"]) {
                    margin-right: 0 !important;
                    margin-left: 0 !important;
                }

                &:first-child {
                    margin-top: 0 !important;
                }

                &:last-child {
                    margin-bottom: 0 !important;
                }

                &[data-op3-element-type="button"] > .op3-link,
                label {
                    margin: 0 !important;
                }
            }

            // left align checkboxes on stacked layout
            [data-op3-element-type="checkbox"] {
                margin-right: auto;
            }
        }
    }
    */

    .op3-element-input-edit-error {
        color: red;
        font-family: inherit;
        font-size: 14px;
        padding-top: 5px;
        margin-bottom: 0;

        &::before {
            content: '* ';
        }
    }
}

.op3-form-notification {
    position: relative;
    display: flex;
    align-items: center;
    padding: 10px;
    background-color: #e3fbe5;
    color: #298258;
    border: 1px solid #58c583;
    border-radius: 5px;

    &.warning-notification {
        background-color: #fff3cd;
        color: #856404;
        border-color: #ffeeba;
        margin-bottom: 25px;
    }

    &.error-notification {
        background-color: #f8d7da;
        color: #721c24;
        border-color: #f5c6cb;
        margin-bottom: 25px;
        flex-direction: column;
        align-items: flex-start;

        p:last-child {
            margin-bottom: 0;
        }
    }
}
