.af-form {
    .acf-fields {
        .-top,
        .-border {
            border: none;
        }

        input {
            &:focus-visible {
                outline: none;
            }
        }
    }

    textarea {
        border-color: var(--e-global-color-accent);
        border-width: 3px;

        &:focus-visible {
            outline: none;
        }
    }

    .acf-radio-list {
        border-bottom: 3px solid var(--e-global-color-accent);
    }

    .acf-field,
    .af-field {
        border: none !important;
    }

    .af-field-type-group,
    .acf-field-li-person-emails,
    .acf-field-li-person-addresses {
        border-top: none !important;

        > .af-label {
            display: none;
        }
    }

    .acf-field-li-person-addresses {
        padding-bottom: 55px !important;
    }

    .af-field-li-person-general {
        .acf-field {
            display: flex;
            align-items: start;
            flex-direction: column-reverse;
            border: none !important;

            .acf-input {
                width: 100%;
            }

            &.acf-field-li-person-slogan {
                .acf-label {
                    display: flex;
                    width: 100%;
                    justify-content: space-between;
                    align-items: start;

                    small {
                        margin-top: 0 !important;
                    }
                }
            }
        }
    }

    .af-field-li-public-video-url {
        display: flex;
        align-items: start;
        flex-direction: column-reverse;
    }

    .acf-label {
        padding-top: 7px;

        .description,
        .af-field-instructions {
            font-size: 13px;
        }
    }

    .acf-button {
        color: #000;
        background: var(--e-global-color-accent);
        padding: 10px;
        border-radius: 10px;
        border-color: var(--e-global-color-accent);
        font-size: 14px;

        &:hover {
            background: #000;
            color: #fff;
            border-color: #000;
        }
    }

    .acf-fr {
        display: none;
    }

    .acf-input input {
        border-width: 0 0 3px 0 !important;
        border-color: var(--e-global-color-accent);
        border-radius: 0;
        font-size: 20px !important;
        min-height: 40px;
    }

    .acf-field {
        .acf-label {
            margin: 0;
        }

        .acf-switch {
            border-radius: 25px;
            width: 80px;
            color: #000 !important;
            border-color: #000 !important;

            .acf-switch-on {
                color: #000 !important;
                text-shadow: none;
                visibility: hidden;
            }

            &.-on {
                background-color: var(--e-global-color-accent);
                border-color: #000;

                .acf-switch-slider {
                    left: calc(50% + 13px);
                }

                .acf-switch-on {
                    visibility: visible;
                }

                .acf-switch-off {
                    display: none;
                }
            }


            .acf-switch-off {
                overflow: hidden;
                padding-right: 14px;
                padding-left: 0;
                text-align: right;
            }

            .acf-switch-slider {
                border-color: #000;
                text-shadow: none;
                background-color: #000;
                height: 24px;
                width: 24px;
                border-radius: 12px;
            }
        }
    }
}

/* AF Forms */

.af-field-li-membership {
    display: flex !important;
    flex-direction: row;
}

.acf-repeater-add-row,
.acf-gallery-main .acf-gallery-toolbar {
    background: var(--e-global-color-accent) !important;
    color: var(--e-global-color-primary) !important;
    padding: 10px;
    font-size: 14px !important;
    border-radius: 4px;

    &:hover {
        background: var(--e-global-color-primary) !important;
        color: #ffffff !important;

        a {
            color: #ffffff !important;
        }
    }

    li {
        width: 100%;

        a {
            color: var(--e-global-color-primary) !important;
            display: block;
        }
    }
}

.af-field-hausbesuch-anliegen > .af-label.acf-label:first-child {
    display: none;
}

.af-field .acf-table {
    border: none;
    background: none;
}

.af-field .acf-table tr {
    border-bottom: 10px solid #fff;
}

.af-field .acf-table .acf-row-number {
    display: block;
    background: var(--e-global-color-accent);
    width: 24px;
    margin-left: -20px;
    height: 24px;
    line-height: 24px;
    border-radius: 15px;
    box-shadow: 3px 3px 5px 0px rgba(0, 0, 0, 0.2);
    color: #000;
}

form .af-field table tr td:first-child {
    background: var(--e-global-color-accent);
    width: 8px;
    padding: 0px;
}

form .af-field table tr td:nth-child(2) {
    background: #efefef;
    padding: 20px !important;
    font-size: 18px;
}

form .af-field table tr td:nth-child(2) label {
    font-size: 18px;
}


form .af-field table tr td:nth-child(3) {
    display: table-cell !important;

    .acf-icon.-minus.small.acf-js-tooltip {
        display: block !important;
    }
}


.af-field-hausbesuch-anliegen .af-label,
.af-field-li-department .af-label {
    order: 1;
    border-style: solid;
    border-width: 0px 0px 3px 0px;
    border-color: var(--e-global-color-accent);
    width: auto;
}

.media-sidebar {
    display: none;
}

.media-toolbar {
    right: 0 !important;
}

.media-frame-tab-panel {
    button {
        &:hover {
            background-color: var(--e-global-color-accent) !important;
        }
    }
}

.media-toolbar-secondary {
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    max-width: 100%;
    width: 20%;
}

@media (max-width: 1400px) {
    /* .af-field {
        float: none !important;
        width: 100% !important;
    }
    */
    .af-label {
        padding-top: 10px;
    }

    .media-toolbar {
        display: flex;
        flex-flow: column;
        width: auto;
        height: auto !important;
        position: relative !important;

        .media-toolbar-secondary,
        .media-toolbar-primary {
            max-width: 100% !important;
            width: 100% !important;

            select {
                font-size: 13px !important;
            }
        }

        .media-toolbar-primary {
            display: flex;
            flex-flow: row nowrap;
        }
    }

    .attachments-wrapper {
        top: 0 !important;

        .attachments {
            top: 0 !important;

            position: relative !important;
        }
    }
}


.department-issue-container {
    padding: 10px 0;

    > h2 {
        color: var(--e-global-color-primary) !important;
    }

    .issue-wrapper {
        padding: 10px 0;
        border-bottom: 1px solid var(--e-global-color-accent);

        &:first-of-type {
            padding-top: 0;
        }

        h3, p {
            margin: 0;
        }

        .issue-title {
            position: relative;
            cursor: pointer;
            text-transform: uppercase;
            font-size: 18px;
            font-weight: 400;

            span {
                text-transform: lowercase;
            }
        }

        .issue-details {
            display: none;
            padding-top: 10px;

            &.active {
                display: block;
            }

            .issue-media {
                img {
                    width: 300px;
                    height: 200px;
                    object-fit: cover;
                }
            }
        }

        &:has(.issue-details.active) {
            .issue-title {
                &:after {
                    content: "X";
                    width: 20px;
                    height: 20px;
                    font-size: 20px;
                    display: inline-block;
                    position: absolute;
                    top: 0;
                    right: 0;
                }
            }
        }
    }
}


form .acf-repeater-add-row {
    display: flex;
    flex-direction: row;
    gap: 20px;
}


form .acf-repeater-add-row::before {
    content: "\e147";
    font-family: 'Material Symbols Outlined';
    font-weight: 200;
    font-size: 24px;
    line-height: 1;

}

form .acf-form-submit {
    padding: 0 30px 20px 30px;
}

form .af-submit-button {
    display: flex;
    flex-direction: row;
    gap: 20px;
}

form .af-submit-button::before {
    content: "\f6e8";
    font-family: 'Material Symbols Outlined';
    font-weight: 200;
    font-size: 24px;
    line-height: 1;
}

form .acf-file-uploader .acf-button {
    display: inline-block;
}