////
/// Editor Styles
///
/// These styles apply only in the editor.
///
/// @group  Styles
/// @author Sky Shabatura <theme@sky.camp>
/// @link   https://taproot-theme.com
////

.editor-styles-wrapper {
    // blocks with block padding under certain conditions
    .wp-block-columns {
        @extend .has-block-spacing;

        &.has-background,
        &[style*='background-color'] {
            @extend .has-block-padding;

            &.alignfull {
                .alignfull:not(.has-background) {
                    padding-left: 0;
                    padding-right: 0;
                }
            }
        }
    }

    .wp-block-column {
        margin-bottom: var(--text-spacing);
        margin-left: 0 !important;

        // inner contents
        & > :first-child {
            margin-top: 0;
        }

        & > :last-child {
            margin-bottom: 0;
        }

        // last column
        &:last-child {
            margin-bottom: 0;
        }

        .wp-block {
            width: 100%;
        }
    }
}

// Responsive editor styles
#start-resizable-editor-section {
    display: none;
}

.editor-styles-wrapper {
    @include screen('editor-tablet') {
        .wp-block-columns {
            display: flex;
            flex-direction: row;
        }

        // Individual columns.
        .wp-block-column {
            margin-right: var(--block-spacing);
            flex-basis: 50%;

            // last column
            &:last-child {
                margin-right: 0;
            }
        }
    }
}

// End responsive editor styles
#end-resizable-editor-section {
    display: none;
}
