body {

    .block-editor-writing-flow {
        margin: 50px auto;
        background-color: #ffff;
        box-shadow: 0px 20px 40px rgba(0,0,0,0.05);
        max-width: 718px;
        padding: 30px;
        @include mq('md'){
            padding: 40px;
        }
    }
}

.template-knowledge-base-blocks {

    .block-editor-writing-flow {
        margin: 0 auto;
        max-width: 718px;
        padding: 0;
        @include mq('md'){
            padding: 0;
        }
        background: var(--color-bg);
        box-shadow: none;
    }
}

.template-knowledge-base-blocks.kbg-sidebar-none {
    .block-editor-writing-flow {
        max-width: 100%;
        width: 100%;
        flex: 0 0 100%;
    }
}

body.template-knowledge-base-blocks.kbg-sidebar-right{
    .wp-block > .container{
        padding-left: 0;
        padding-right: 0;
    }
}

[data-block] {
	margin-top: 25px;
    margin-bottom: 25px;
}

.wp-block {
	max-width: var(--width-full);
}

.wp-block[data-align=wide],
.wp-block.alignwide {
	max-width: var(--width-full);
}

.wp-block[data-align=full],
.wp-block.alignfull {
	max-width: none;
}
.editor-styles-wrapper .block-editor-block-list__layout.is-root-container > .wp-block[data-align=full]{
    margin-left: 0 !important;
    margin-right: 0 !important;
}

.layout-e-image .entry-media.kbg-card-image{
    margin-bottom: 0;
}

//Editor title
.wp-block.editor-post-title.editor-post-title__block{
    margin: 0 auto;
}
.wp-block.editor-post-title.editor-post-title__block .editor-post-title__input{
    padding: 0;
}
.template-knowledge-base-blocks .wp-block.editor-post-title.editor-post-title__block .editor-post-title__input{
    margin-top: 30px;
    margin-bottom: 30px;
}
.block-editor-writing-flow .container, 
.page-template-template-knowledge-base-blocks .wp-block-columns, 
.kbg-blocks-full-content > *:not(.wp-block-kbg-search-box):not(.aligncenter):not(.alignleft):not(.alignright):not(.alignfull):not(blockquote){
    padding: 0;
}
//Headings
[data-type="core/heading"]{
    @extend %vertical-margin-x-small;
}
//list
.editor-styles-wrapper ul[data-type="core/list"],
.editor-styles-wrapper ol[data-type="core/list"]{
    li{
        padding-left: 10px;
        margin-bottom: 15px;
        line-height: 1.6;
    }
}
//quote
.editor-styles-wrapper [data-type="core/quote"]{
    font-size: 18px;
}
.editor-styles-wrapper [data-type="core/pullquote"]{
    p{
        font-size: 20px !important;
    }
}

//code
.editor-styles-wrapper [data-type="core/code"]{
    border: none;
    padding: 40px;

    code{
        background: transparent;
    }
}
.editor-styles-wrapper [data-type="core/preformatted"],
.editor-styles-wrapper [data-type="core/verse"]{
    padding: 40px;
}

//Search
.editor-styles-wrapper [data-type="kbg/search-box"]{
    .wp-block-cover__inner-container{
        justify-content: center;
    }
    .kbg-default .kbg-big .wp-block-search__button,
    .kbg-default .kbg-small .wp-block-search__button{
        min-width: 160px !important;
    }
    .wp-block-cover[data-type="kbg/search-box"]{
        padding: 0;
    }
    .search-content.kbg-small,
    .search-content.kbg-icon {

        @include mq('lg') {
            flex: 0 0 32%;
        }

        .wp-block-search {
            max-width: 440px;
        }
    }
    .wp-block-search.kbg-boxed {
        background: rgba(0,0,0,.1);
  
        padding: 15px;
        @include mq('md'){ 
            padding: 16px;
        }
        @include mq('lg'){ 
            padding: 20px;
        }
    }
    .kbg-boxed.wp-block-search {



        .wp-block-search__inside-wrapper {
            display: block;
            background: transparent;
            padding: 0;

            input {
                background: #fff;
                margin-bottom: 10px;
                text-align: center;
                height: 50px;
                line-height: 50px;
                @include mq('md') {
                    height: 60px;
                    line-height: 60px;
                }
                @include mq('lg') {
                    height: 65px;
                    line-height: 65px;
                }
            }

            .wp-block-search__button {
                width: 100%;
                max-width: 100%;
                min-width: auto;
                margin: 0;
                height: 50px;
                line-height: 50px;
                @include mq('md') {
                    height: 60px;
                    line-height: 60px;
                }
                @include mq('lg') {
                    height: 65px;
                    line-height: 65px;
                }
                svg path {
                    fill: var(--color-button-primary-text);
                }
            }
        }
        
    }



}
//Contact
.editor-styles-wrapper [data-type="kbg/contact-box"]{
    justify-content: center;

    [data-align="full"] .wp-block-cover__inner-container{
        max-width: var(--width-full) !important;
		margin: 0 auto;
    }

    .wp-block-cover[data-type="kbg/contact-box"]{
        padding: 0;
    }

        h2.h1{
            padding: 0 !important;
            margin: 0 0 10px 0;
        }

    .kbg-small{
        max-width: 100%;
        flex: 0 0 100%;
        padding: 0 50px;
        align-items: center;
        .box-media{
            margin-right: 50px;
        }
        .box-content{
            flex: auto;
            padding-right: 50px;
        }
        .d-lg-flex{
            flex: 1;
        }
        &.kbg-icon{
            .box-media{
                flex: 0 0 140px;
                img{
                    min-width: 140px;
                }
            }
        }
    }
    .kbg-small.kbg-image{
        padding-left: 0;
    }
    .kbg-large{
        width: 100%;
        .box-description{
            max-width: 500px;
            margin: 0 auto 30px;
        }
        h2.h1{
            padding: 0 !important;
            margin: 0 auto 10px auto;
        }
    }
    .kbg-large.kbg-image{
        .box-media{
            margin-bottom: 30px;
        }
    }
    .wp-block-cover__inner-container{
        justify-content: center;
    }
    .wp-block-button__link{
        background: var(--color-button-tertiary);
        color: var(--color-txt);
        white-space: pre !important;
    }
}

.editor-styles-wrapper [data-type="core/categories"]{
    ul{
        list-style: inside disc;
        margin: 0;
    }

}
.editor-styles-wrapper [data-type="core/latest-posts"]{
    list-style: inside disc;
    li{
        margin-bottom: 15px;
    }
}

.editor-styles-wrapper [data-type="core/tag-cloud"]{
    a{
        margin-right: 7px;
        margin-bottom: 7px;
        padding: 0 10px;
        font-size: 1.1rem !important;
        height: 32px;
        font-family: var(--h-font);
        font-weight: var(--h-font-weight);
        box-shadow: none;
        &:hover{
            color: var( --color-txt );
            box-shadow: none;
        }
    }
}

.editor-styles-wrapper [data-type="core/rss"]{
    ul{
        padding: 0;
        margin: 0;
    }
}
.editor-styles-wrapper [data-type="core/latest-comments"]{
    ol{
        padding: 0;
        margin: 0;
    }
}

.editor-styles-wrapper [data-type="core/categories"],
.editor-styles-wrapper [data-type="core/archives"]{
    ul{
        list-style: none;
        margin-left: 0;
        padding: 0;
    }
    li{
        position: relative;
    }
    .wp-block-categories__post-count,
    .count{
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 30px;
        height: 30px;
        line-height: 30px;
        border-radius: 50%;
        @extend %button-style-primary;
        text-align: center;
        font-size: 1.1rem;
        font-weight: 700;
        margin-left: 10px;
        position: absolute;
        right: 0;
    }
}
.editor-styles-wrapper [data-type="kbg/accordion"]{
    .container{
        padding: 0;
    }
}


.editor-styles-wrapper [data-type="kbg/search-box"].is-selected:after{
    left: 0 !important;
    right: 0 !important;
}

.editor-styles-wrapper [data-type="kbg/knowledge-base-icon"] .layout-e-icon .entry-media.kbg-card-icon{
    margin-bottom: 0;
}
.editor-styles-wrapper [data-type="kbg/knowledge-base-list"] .entry-list article a {
    border-bottom: none;
}
.editor-styles-wrapper [data-type="kbg/knowledge-base-list"] .entry-list article{
    border-bottom: 1px solid rgba(0,0,0,.1);
}
.editor-styles-wrapper [data-type="kbg/knowledge-base-list"] .entry-list .col-12:last-child article{
    border-bottom: none;
}