.radio-control--email-options {
    display: flex;
    flex-direction: column-reverse;
    gap: var(--givewp-spacing-2);

    .components-radio-control__option {
        margin: .15rem 0;
    }

    .components-base-control__help {
        margin: 0;
    }
}

.select-control--email-options {
    .components-input-control__label {
        color: rgb(60, 67, 74);
        font-size: 0.813rem;
    }

    .components-base-control__help {
        color: var(--givewp-grey-500);
        font-size: 0.75rem;
        margin: 0;

    }

    .components-input-control__container {
        min-height: 2.25rem !important;
    }
}

.base-control--email-options {
    margin-bottom: 0.5rem;

    .components-base-control, .components-base-control__field {
        margin-bottom: 0;
    }
}

[id^='__wp-uploader'] {
    z-index: 9999999999;
}

.media-frame {
    z-index: 1 !important;
}

.components-modal__content {
    display: flex;

    > div {
        width: 100%;
    }
}

.email-preview__back-btn {
    z-index: 11; /* Above the modal header */
    position: absolute;
    top: 0;
    right: 50%;
    margin: var(--givewp-spacing-8) 0;
    padding: var(--givewp-spacing-4) var(--givewp-spacing-8);
    translate: 50% 0;
}

.email-settings-preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.email-settings-preview-generating {
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.givewp-form-settings {
    .email-settings {
        padding-bottom: 3rem;

        .components-text-control__input {
            height: 2.25rem;
        }

        .givewp-ql-text-editor, #toolbar, .ql-container .ql-snow, .ql-editor {
            border-radius: 2px;
        }

        &__email-btn {
            height: 2.5rem;
            width: 100%;
            justify-content: center;

            &--preview {
                padding: 0.5rem 1rem;
                width: auto;
            }
        }

        &__close-btn {
            z-index: 11;
            position: absolute;
            top: -0.4rem;
            right: 0;
            display: flex;
            gap: var(--givewp-spacing-3);
            margin: var(--givewp-spacing-4) var(--givewp-spacing-6);
            padding: var(--givewp-spacing-4) var(--givewp-spacing-12);
        }

        &__header {
            font-size: .875rem;
            line-height: 1.25rem;
            margin: 0 0 0.5rem 0;
        }

        &__description {
            color: var(--givewp-grey-500);
            font-size: 0.75rem;
            line-height: 1.5;
            margin: 0 0 .5rem 0;
        }

        &__col-left {
            flex: 2;
            overflow-y: Scroll;

        }

        &__col-right {
            flex: 1;
            display: flex;
            flex-direction: column;
            gap: var(--givewp-spacing-10);
            padding-right: 10px;
            overflow-y: Scroll;
        }

        &__logo-upload {
            display: flex;
            gap: 0.25rem;

            .components-button {
                border-radius: 0.125rem;
                flex: 0 0 auto;
                height: auto;
                padding-left: 1rem;
                padding-right: 1rem;
            }
        }

        &__send-preview-email {
            display: flex;
            flex-direction: column;
            gap: 0.5rem;
            width: 100%;
        }
    }
}

.email-settings-modal-tabs {
    display: flex;
    gap: var(--givewp-spacing-10);
    height: 100%;

    .components-tab-panel__tabs {
        flex: 2;
        border-bottom: 0;
    }

    .components-tab-panel__tab-content {
        flex: 3;
    }

    .components-tab-panel__tabs-item {
        &.is-active {
            background-color: var(--givewp-grey-25);
        }

        &:after {
            background: initial; // Remove the underline.
        }
    }

    .components-button {
        text-align: left;
    }
}

.email-settings-template {
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;

    &__container {
        display: flex;
        flex-direction: column;
        gap: var(--givewp-spacing-6);
        margin-bottom: 20px;

        li {
            display: flex;
            gap: 1rem;
            justify-content: space-between;
            align-items: center;
        }
    }

    &__recipient {
        display: flex;
        flex-direction: column;
        gap: var(--givewp-spacing-3);

        &-delete-btn {
            padding: 0;
            color: var(--givewp-grey-500);

            &:hover {
                color: var(--givewp-red-500);
            }
        }

        &-add-email-btn {
            height: 2.5rem;
            width: 100%;
            justify-content: center;
            gap: .25rem;
        }
    }
}
