
/**
 * .wp-block-columns only-child image overwrite inline style
 * Presentation like card block
 *
 * If you no need this presentation
 * Image after SHIFT + ENTER ( add br elements )
 */

#document{
    .wp-block-columns{
        .wp-block-column{
            p img:only-child{
                display:block;
                margin-left:calc(var(--thm_content_gap) * -1);
                margin-right:calc( var(--thm_content_gap) * -1);
                width:calc(100% + var(--thm_content_gap) * 2) ! important;
                max-width:none;
            }
            p.has-only-image{
                margin-top:0;
                margin-bottom:0;
            }
            .wp-block-image {
                margin-top:0;
                margin-block-start:0;
            }
            .wp-block-embed{
                margin-top:0;
            }
            .shortcode-wrapper{
                margin-top:0;
                margin-bottom:0;
            }
        }
    }
}
/**
 * Embed Wrapper
 * ========================================================================== */
.wp-block-embed__wrapper{
    word-wrap:normal;
    overflow-wrap:normal;
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    margin-top:0;
    margin-bottom:0;
}
.wp-block-embed__wrapper iframe[height],
.wp-block-embed__wrapper object[height],
.wp-block-embed__wrapper embed[height]{
    // classic editor
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    width: calc(100% - 2px);
    max-height:100%;
}
.wp-block-embed__wrapper iframe:not([height]),
.wp-block-embed__wrapper object:not([height]),
.wp-block-embed__wrapper embed:not([height]){
    height: 100%;
}
.wp-block-embed__wrapper + *{
    margin-top:1em;
}

/**
 * Freeform embed media
 * media is not wrapping figure
 */

.entry-content > .wp-block-embed__wrapper{
    padding-bottom: calc(var(--thm_content_width) * .5625);
}
/**
 * Alignfull
 * ========================================================================== */

.enable-alignfull{
    [class|="wp-block"],
    //[class*=" wp-block"],
    .shortcode-wrapper,
    [class|="wp-block-embed"],
    // [class*=" wp-block-embed"],
    .emulsion-table-wrapper,
    .wp-block-audio,
    .wp-block-video,
    .wp-block-latest-posts,
    .wp-block-latest-comments,
    .wp-block-categories,
    .wp-block-image,
    .wp-block-pullquote,
    .wp-block-gallery,
    .wp-block-media-text,
    .wp-block-columns,
    ol,
    ul,
    p{
        &.alignwide{
            width:calc( var(--thm_content_width) + var(--thm_align_offset) );
            position: relative;
            left:0;
            margin-left:auto;
            margin-right:auto;
            max-width:100%;
        }
    }
}

/**
 * Has Sidebar
 * ========================================================================== */

.emulsion-has-sidebar{
    &.enable-alignfull{
        .entry-content{

            & > .wp-block-embed{
                &.alignfull{
                    @extend %has-sidebar-alignfull;
                    margin-left:0;
                    margin-right:0;
                }
            }
            & > p{
                &.alignfull{
                    @extend %has-sidebar-alignfull;
                }
            }
            & > ol,
            & > ul{
                &.alignfull{
                    @extend %has-sidebar-alignfull;
                }
            }


            & >  ul.wp-block-gallery{
                &.alignfull{
                    left: calc( var( --thm_sidebar_width) / 2 * -1 - 30px );
                }
            }
            & > .wp-block-media-text{
                margin-top:1.5rem;
                margin-bottom:.75rem;
                margin-top:0;
                margin-bottom:0;
                display:grid;
                &.alignfull{
                    @extend %has-sidebar-alignfull;
                    width:100%;
                    margin-left:0;
                    margin-right:0;
                }
            }
            & > .sectionized-wp-block-media-text .wp-block-media-text{
                margin-top:0;
                margin-bottom:0;
                display:grid;
                &.alignfull{
                    width:100%;
                    margin-left:0;
                    margin-right:0;
                }
            }
            & > .wp-block-embed-screencast{
                &.alignfull{
                    a{
                        overflow:hidden;
                        img{
                            width:100%;
                            height:auto;
                        }
                    }
                }
            }
            & > figure.wp-block-embed-twitter.alignfull{
                width:100%;
                margin-left:0;
                position:static;
            }
            & > .wp-block-image{
                &.alignfull{
                    position:relative;
                    max-width:none;
                    padding-left:0;
                    padding-right:0;

                }
            }
            & > .wp-block-cover{

                &.alignfull{
                    margin-left:auto;
                    margin-right:auto;
                    padding-left:0;
                    padding-right:0;
                    max-width:none;
                }
            }

        }

        ul.wp-block-gallery{
            &.alignfull{
                width: calc( var(--thm_main_width-with-sidebar) + 40px );
                position: relative;
                left:0;
                margin-left:0;
                margin-right:0;
                max-width:none;
            }
        }

        .emulsion-table-wrapper.alignfull{
            @extend %has-sidebar-alignfull;
            margin:0;
            margin-top:3rem;
            margin-bottom:3rem;
            left:0;
            .wp-block-table{
                margin-right:auto;
                margin-left:auto;
                width:calc( 100% - 48px);
            }
        }

        .stream{
            ul.wp-block-gallery{
                &.alignfull{
                    position:static;
                    margin-left:-24px;
                }
            }
            .wp-block-image{
                &.alignfull{
                    position:static;
                    margin-left:-24px;
                }
            }
        }

    }
    [class|="sectionized"]{
        // [class*=" sectionized"]{
        margin-left:auto;
        margin-right:auto;
        padding-left:0;
        padding-right:0;
        max-width:none;
        position:relative;
        & > [class|="wp-block"]{
            //   & > [class*=" wp-block"]{
            margin-top:0;
            margin-bottom:0;
            position:static;
        }

    }

    .wp-block-cover{
        &.alignleft{
            .wp-block-cover-text{
                width:calc( var( --thm_main_width-with-sidebar ) / 2 );
            }
        }
        &.alignright{
            .wp-block-cover-text{
                left:0;
                width:calc( var( --thm_main_width-with-sidebar ) / 2 );
            }
        }
        &.alignfull{
            margin-left:auto;
            margin-right:auto;
            padding-left:0;
            padding-right:0;
            max-width:none;
        }
    }
    .wp-block-embed-screencast{
        a{
            display:block;
            img{
                width:100%;
                height:auto;
            }
        }
        &.aligncenter{
            .wp-block-embed__wrapper{
                text-align:center;
            }
        }
    }
    .wp-block-embed-facebook{
        .wp-block-embed__wrapper{
            padding-bottom:0;
            height:auto;
        }
    }
}
.disable-alignfull .wp-block-cover{
    position:relative;
}

/**
 * No Sidebar
 * ========================================================================== */

.emulsion-no-sidebar{
    &.enable-alignfull{
        .wp-block-embed{
            &.alignfull{
                position:relative;
                width:calc(100vw - 20px);
                position: relative;
                margin-left:0;
                margin-right:0;
                max-width:none;
                left:calc( 50% - 50vw );
            }
        }
        figure.wp-block-embed-twitter.alignfull{
            // current not support
            width:100%;
            margin-left:0;
            position:static;
        }
        [class|="sectionized"]{
            // [class*=" sectionized"]{
            clear:both;
            float:none;
            margin-top:0;
            margin-bottom:0;
            position:static;
            width:auto;
            margin-left:calc( var(--thm_content_width) / 2 - 50vw);
            margin-right:calc( var(--thm_content_width) / 2 - 50vw);
            padding-left:calc( 50vw - var(--thm_content_width) / 2 );
            padding-right:calc( 50vw - var(--thm_content_width) / 2 );
            max-width:none;
        }
        .wp-block-cover {
            &.alignfull{
                margin-left:calc( var(--thm_content_width) / 2 - 50vw);
                margin-right:calc( var(--thm_content_width) / 2 - 50vw);
                padding-left:calc( 50vw - var(--thm_content_width) / 2 );
                padding-right:calc( 50vw - var(--thm_content_width) / 2 );

                &[style]{
                    width:100vw;
                }
                .wp-block-cover-text{

                }
                .wp-block-cover__inner-container{
                    position:static;
                    margin-left:auto;
                    margin-right:auto;
                    padding-left:var(--thm_content_gap);
                    padding-right:var(--thm_content_gap);
                }
                &:not([style]){
                    //video background
                    height:calc( 100vw * 0.5625 );
                    margin-top:3rem;
                    margin-bottom:1.5rem;
                    video{
                        padding-left:0;
                        padding-right:0;
                        width:100vw;
                        height:calc(100vw * 0.5625 );
                    }

                }

                &.has-left-content{
                    p{
                        text-align:left;
                    }
                }
                &.has-right-content{
                    p{
                        text-align:right
                    }
                }
            }
        }
        .wp-block-gallery{
            &.alignfull{
                @extend %no-sidebar-alignfull;
            }
        }
        .wp-block-categories{
            &.alignfull{
                @extend %no-sidebar-alignfull;
                ul{
                    width:100%;
                    max-width:100%;
                }
            }
        }
        .wp-block-pullquote{
            &.alignfull{
                @extend %no-sidebar-alignfull;
                margin-left:auto;
                margin-right:auto;
                blockquote{
                    p{
                        width: -moz-fit-content;
                        width:fit-content;
                    }
                    cite{
                        width: -moz-fit-content;
                        width:fit-content;
                        margin-left:auto;
                        margin-right:auto;
                        display:block;
                    }
                }
            }
        }
        .emulsion-table-wrapper{
            &.alignfull{
                width:100vw;
            }
        }
        .wp-block-media-text{
            margin-top:1.5rem;
            margin-bottom:.75rem;
            display:grid;
            &.alignfull{
                @extend %no-sidebar-alignfull;
                margin-left:auto;
                margin-right:auto;
            }
            &.alignwide{
                @extend %alignwide;
                margin-left:auto;
                margin-right:auto;

            }
        }
        .wp-block-latest-comments{
            &.alignfull{
                @extend %no-sidebar-alignfull;
                .wp-block-latest-comments__comment-meta{
                    width:100%;
                    max-width:none;
                }
                .wp-block-latest-comments__comment-excerpt{
                    width:100%;
                    max-width:none;
                }
            }
        }
        .wp-block-video{
            &.alignfull{
                @extend %no-sidebar-alignfull;
                left:calc( 50% - 50vw );
                video{
                    width:100%;
                    max-width:none;
                }
            }
        }
        .wp-block-group,
        .wp-block-columns,
        .emulsion-table-wrapper,
        .wp-block-audio,
        .wp-block-latest-posts,
        .wp-block-image,
        .wp-block-categories,
        ol,
        ul,
        p{
            &.alignfull{
                @extend %no-sidebar-alignfull;
                box-sizing:border-box;
            }
        }

        .wp-block-embed-facebook{
            .wp-block-embed__wrapper{
                padding-bottom:0;
                height:auto;
            }
        }
    }
}
/**
 * Media Embed
 * ========================================================================== */

[class|="wp-block-embed"]{
    //[class*=" wp-block-embed"]{
    display:block;
    height:min-content;
    width:var(--thm_content_width);
    margin-left:auto;
    margin-right:auto;
    a{
        display:block;
        img{
            width:100%;
            height:auto;
        }
    }
    figcaption{
        padding-left: var(--thm_content_gap, 24px);
        padding-right: var(--thm_content_gap, 24px);
    }
    &.alignfull{
        width:100%;
    }
}
.wp-block-video.alignleft,
.wp-block-embed.alignleft,
.wp-block-embed-vimeo.alignleft,
.wp-block-embed-facebook.alignleft,
.wp-block-embed-twitter.alignleft,
.wp-block-embed-instagram.alignleft,
.wp-block-embed-wordpress-tv.alignleft,
.wp-block-embed-reddit.alignleft,
.wp-block-embed-flickr.alignleft,
.wp-block-embed-kickstarter.alignleft,
.wp-block-embed-wordpress.alignleft,
.wp-block-embed-soundcloud.alignleft,
.wp-block-embed-slideshare.alignleft,
.wp-block-embed-ted.alignleft,
.wp-block-embed-issuu.alignleft,
.wp-block-embed-cloudup.alignleft,
.wp-block-embed-reverbnation.alignleft,
.wp-block-embed-youtube.alignleft{
    /* Core style overwrite */
    @extend %alignleft;
    z-index:2;
}
.wp-block-video.alignright,
.wp-block-embed.alignright,
.wp-block-embed-vimeo.alignright,
.wp-block-embed-facebook.alignright,
.wp-block-embed-twitter.alignright,
.wp-block-embed-twitter.alignright,
.wp-block-embed-instagram.alignright,
.wp-block-embed-wordpress-tv.alignright,
.wp-block-embed-reddit.alignright,
.wp-block-embed-flickr.alignright,
.wp-block-embed-kickstarter.alignright,
.wp-block-embed-wordpress.alignright,
.wp-block-embed-soundcloud.alignright,
.wp-block-embed-slideshare.alignright,
.wp-block-embed-ted.alignright,
.wp-block-embed-issuu.alignright,
.wp-block-embed-cloudup.alignright,
.wp-block-embed-reverbnation.alignright,
.wp-block-embed-youtube.alignright{
    /* Core style overwrite */
    @extend %alignright;
    z-index:2;
}
.entry-content{
    .wp-block-embed-slideshare{
        .wp-block-embed__wrapper{
            padding-bottom:82.5%;
            iframe{
                height:100%;
            }
        }
        &.alignleft,
        &.alignright{
            .wp-block-embed__wrapper{
                padding-bottom: 88%;
            }
        }
    }
    .wp-block-embed-reverbnation{
        .wp-block-embed__wrapper{
            overflow:hidden;
            width:500px;
            height:500px;
            max-width:100%;
            margin-left:auto;
            margin-right:auto;
        }
        &.alignleft,
        &.alignright{
            margin-bottom:3rem;
            .wp-block-embed__wrapper{
            }
        }
    }
    figure{
        &.wp-block-embed-instagram{

            /**
             * not support alignwide , alignfull
             * has style attribute
             */

            display:block;
            max-width:502px;
            margin-bottom:1rem;
            .wp-block-embed__wrapper{
                height:calc(502px / 10 * 20);
                padding-bottom:0;
            }
            &.alignright{
                margin-left:1rem;
            }
            & figcaption{
                max-width:502px;
                display:block;
            }
        }
    }
}
/**
 * Media Embed Alignfull
 * ========================================================================== */
.enable-alignfull{
    .wp-block-audio.alignfull,
    .wp-block-video.alignfull,
    .wp-block-embed.alignfull,
    .wp-block-embed-vimeo.alignfull,
    .wp-block-embed-facebook.alignfull,
    .wp-block-embed-twitter.alignfull,
    .wp-block-embed-twitter.alignfull,
    .wp-block-embed-instagram.alignfull,
    .wp-block-embed-wordpress-tv.alignfull,
    .wp-block-embed-reddit.alignfull,
    .wp-block-embed-flickr.alignfull,
    .wp-block-embed-kickstarter.alignfull,
    .wp-block-embed-wordpress.alignfull,
    .wp-block-embed-soundcloud.alignfull,
    .wp-block-embed-slideshare.alignfull,
    .wp-block-embed-ted.alignfull,
    .wp-block-embed-cloudup.alignfull,
    .wp-block-embed-reverbnation.alignfull,
    .wp-block-embed-youtube.alignfull{
        margin-left:auto;
        margin-left:auto;
        padding-left:0;
        padding-right:0;
        max-width:none;
    }
    figure{
        &.wp-block-embed-twitter{
            &.is-type-rich{
                &.aligncenter{
                    twitter-widget{
                        margin-left:auto;
                        margin-right:auto;
                    }
                }
            }
        }
        .wp-block-embed-reverbnation{
            &.alignwide{
                //No support. object has max-width
                width:100%;
                height:fit-content;
                left:0;
                margin-left:auto;
                margin-right:auto;
            }
            &.alignfull{
                // Todo specificity
                //No support. object has max-width
                width:100% ! important;
                height:fit-content;
                position:static ! important;
                left:0;
                margin-left:auto ! important;
                margin-right:auto ! important;
            }
        }
        &.wp-block-embed-instagram{
            &.alignwide{
                margin-left:0;// for alignwide position. yet support
            }
            &.alignfull{
                position:static!important;// for alignfull. yet support
            }
        }
        .alignwide img,
        .alignfull img{
            max-width:100%;
            width:100%;
            -o-object-fit:cover;
            object-fit:cover;
            margin-top:0;
            display:block;
            position:relative;
        }
        .alignfull img{
            height:calc( var(--thm_main_width) * 0.5625);
        }
    }
    .wp-block-embed-slideshare{
        &.alignwide{
            .wp-block-embed__wrapper{
                padding-bottom: 81.5%;
            }
        }
        &.alignfull{
            .wp-block-embed__wrapper{
                padding-bottom: 80.5%;
            }
        }
    }
}

/**
 * Block Video
 * ========================================================================== */

.wp-block-video{
    margin-top:1.5rem;
    margin-bottom:.75rem;
    &.alignfull{
        video{
            width:100%;
            max-width:none;
        }
    }
}
/**
 * It was Wraped with figure element
 * ========================================================================== */

figure{
    &[class|="wp-block-embed"]{
        //&[class*=" wp-block-embed"]{
        position:relative;
        max-width:100%;
        clear:both;
        figcaption{
            overflow: hidden;
            white-space:nowrap;
            text-overflow:ellipsis;
        }
        div:not(.wp-block-embed__wrapper){
            iframe{
                width:100%;
                height:100%;
            }
            object{
                width:100%;
                height:100%;
            }
            embed{
                width:100%;
                height:100%;
            }
        }
        .rd-reverbnation,
        .rd-reddit{
            max-width:none;
            margin:0;
        }
    }

    &.wp-block-embed-mixcloud{
        padding-bottom:0;
        height:120px;
        .wp-block-embed__wrapper{
            padding-bottom:0;
            height:120px;
        }
    }
    &.wp-block-embed-reddit{
        position:relative;
        z-index:1;
        min-height:250px;
        .wp-block-embed__wrapper{
            overflow:visible;
            padding-bottom:0;
            padding-top:0;
            position:relative;
            iframe{
                position:relative;
                position:relative;
                display:block;
                min-height:240px;
                z-index:10;
            }
        }
        &.alignright,
        &.alignleft{
            min-height:250px;
            overflow:hidden;
            .wp-block-embed__wrapper{
                iframe{
                    min-height:240px;
                }
            }
        }
    }
    &.wp-block-embed-wordpress{
        // non ratio style
        margin-right:auto;
        margin-left:auto;
        min-height:200px;
        height:auto;
        overflow:visible;
        .wp-block-embed__wrapper{
            position:relative;
            overflow:hidden;
            padding:0;
            height:100%;
            display:block;
            p{
                margin:0;
                height:100%;
                overflow:visible;
            }
            iframe{
                display:block;
                position:relative;
                min-height:240px;
                max-width:100%;
                height:100%;
                overflow:visible;
                z-index:2;
            }
        }
        .wp-block-embed__wrapper:before{
            content:none!important;
            display:none;
            padding:0!important;
        }
    }
    &.wp-block-embed-wordpress{
        &.wp-embed-aspect-1-1{
            .wp-block-embed__wrapper{
                iframe{
                    position:static;
                    min-height:240px;
                    height:100%;
                    overflow:hidden;
                }
            }
        }
    }
    &.is-provider-theme-directory{
        margin-left:auto;
        margin-right:auto;
    }
    &.wp-block-embed-issuu{

        /**
         * Not Support alignwide alignfull
         * wide and height was defined style attribute.
         */

        .wp-block-embed__wrapper{
            height:calc(var(--thm_main_width) * .5625);
            max-height:75vh;
            padding-bottom:0;
            iframe{
                position:static;
                height:100%;
                overflow:hidden;
            }
        }
    }
    &.is-provider-tumblr{
        .wp-block-embed__wrapper{
            overflow:hidden;
            height:680px;
            padding-bottom:0;
            iframe{
                height:100%;
            }
        }

    }
    &.wp-block-embed-amazon-kindle{
        .wp-block-embed__wrapper{
            iframe{
                height:100%;
            }
        }
    }
    &.wp-block-embed-wordpress{
        &.alignwide{
            @extend %alignwide;
        }
    }
    &.wp-block-embed-twitter{
        // non ratio style
        margin-right:auto;
        margin-left:auto;
        min-height:200px;
        height:auto;
        overflow:visible;
        figcaption{
            width:520px;
            max-width:100%;
            margin-left:auto;
            margin-right:auto;
            text-align:center;
        }
        .wp-block-embed__wrapper{
            margin-left:auto;
            margin-right:auto;
            position:relative;
            overflow:hidden;
            padding:0;
            height:100%;
            display:block;
            twitter-widget{
                margin-left:auto;
                margin-right:auto;
                display:block;
            }
            p{
                margin:0;
                height:100%;
                overflow:visible;
            }
            iframe{
                display:block;
                position:relative;
                min-height:200px;
                max-width:100%;
                height:100%;
                overflow:visible;
                z-index:2;
            }

        }
        &.alignleft,
        &.alignright{
            .wp-block-embed__wrapper{
            }
        }
        .wp-block-embed__wrapper:before{
            content:none!important;
            display:none;
            padding:0!important;
        }
        .is-type-wp-embed .wp-block-embed__wrapper iframe{
        }
        &.alignwide{
            /* Not Support */
            // @extend %alignwide;

        }
    }
}

.wp-block-embed-flickr.alignleft{
    text-align:right;
}
.wp-block-embed.alignfull iframe{
    position:absolute;
    width:100%;
    height:100%;
}
.wp-block-embed.alignwide iframe,
.wp-block-embed.alignfull.is-provider-youtube iframe{
    position:absolute;
    width:100%;
    height:100%;
}

/**
 * media enc
 */

.enable-alignfull{
    .wp-block-latest-comments.alignfull,
    .wp-block-audio.alignfull{
        padding-left:var(--thm_content_gap);
        padding-right:var(--thm_content_gap);
    }
    .wp-block-cover {
        &.alignwide{
            @extend %alignwide;
            padding-left:0;
            padding-right:0;
            max-width:100%;
            //   min-height:50vh;
            background-size:cover;
            background-position:center center;
            background-repeat:no-repeat;
            display:flex;
            align-items:safe center;
            justify-content:safe center;
            .wp-block-cover-text{
                transform: translate(0,0);
                margin-top:0;
            }
        }
        &.alignfull{
            //   min-height:50vh;
            background-size:cover;
            background-position:center center;
            background-repeat:no-repeat;
            background-attachment:fixed;
            display:flex;
            align-items:safe center;
            justify-content:safe center;
            position:relative;
            .wp-block-cover-text{

            }
            &:not([style]){
                height:calc( var(--thm_main_width) * 0.5625 );
                margin-top:3rem;
                margin-bottom:1.5rem;
                video{
                    padding-left:0;
                    padding-right:0;
                    width:var(--thm_main_width);
                    height:calc( var(--thm_main_width) * 0.5625 );
                }
            }
        }
        &.alignright{
            @extend %alignright;
        }
        &.alignleft{
            //core overwrite
            @extend %alignleft;
        }
        .wp-block-cover__inner-container{

        }
    }
    .wp-block-file{
        &.alignwide{
            text-align:center;
            & > a,
            .wp-block-file__button{
                font-size:1.5rem;
                padding:.81rem;
            }
        }
        &.alignfull{
            text-align:center;
            & > a,
            .wp-block-file__button{
                font-size:2rem;
                padding:1.43rem;
            }
        }
    }

}

/**
 * Case where it is necessary to overwrite the standard style
 * ========================================================================== */

.entry-content{

    ul.wp-block-gallery{
        padding-left:0;
        padding-right:0;
        display:flex;
        flex-wrap:wrap;
        max-height:none;
    }
    & > .wp-block-archives{
        width:calc(var(--thm_content_width) - var(--thm_content_gap, 24px) * 2);
        padding-left: var(--thm_content_gap, 24px);
        padding-right: var(--thm_content_gap, 24px);

    }
    div.wp-block-archives{
        overflow:auto;
        select{
            display:block;
            position: relative;
            width:auto;
            height:auto;
            margin-left:auto;
            margin-right:auto;
            margin-top:1.5rem;
            margin-bottom:.75rem;
            padding-top:.69rem;
            padding-bottom:.69rem;
        }
    }

    /**
     * Block archives
     * ========================================================================== */
    & > .sectionized-wp-block-archives > ul.wp-block-archives,
    & > ul.wp-block-archives{
        font-size:var(--thm_meta_data_font_size);
        font-family:var( --thm_meta_data_font_family);
        text-transform:var(--thm_meta_data_font_transform);
        display:flex;
        overflow-x:scroll;
        overflow-y:hidden;
        height:100px;
        padding:0 0 0 0;
        margin:1.5rem auto .75rem;
        -webkit-overflow-scrolling: touch;
        position:relative;
        &.alignleft{
            @extend %alignleft;
        }
        &.alignright{
            @extend %alignright;
        }

        &::-webkit-scrollbar {
            width: 150px;
            height:.5rem;
        }
        &::-webkit-scrollbar-thumb{
            background-color: #777;
            outline: 1px solid #777;
        }
        li:before{
            content:'';
            display:block;
            position:absolute;
            top:calc( 1rem + 2px );
            width:100%;
            z-index:-1;
        }
        li{
            flex: 0 0 auto;
            width:10rem;
            list-style-type:none;
            .emulsion-archive-date{
                display:inline-block;
                transform: translate(75px,25px);
            }
            .emulsion-archive-count{
                @include font_size(5);
                border-radius: 50%;
                padding: .2rem .4rem;
                white-space: pre;
                position: absolute;
                top: -.9rem
            }
            .emulsion-archive-count:empty{
                height:.4rem;
                transform: translate(0,.48rem);
            }
        }
    }
    & > .sectionized-wp-block-archives > ul.wp-block-archives{
        margin-top:0;
        margin-bottom:0;
    }
    /**
     * Blockquote
     * ========================================================================== */
    .wp-block-quote{

        &.is-style-large{
            margin:.75rem auto .75rem;
            padding-left:var( --thm_content_gap );
            padding-right:var( --thm_content_gap );
            @include font_size(2);
            cite{
                padding-left:0;
                padding-right:0;
                font-style:normal;
                font-weight:700;
                @include font_size(5);
            }
            p{
                font-style:normal;
            }
        }
        &.is-style-default{
        }
        p{
            text-align:left;
            width: -moz-fit-content;
            width:fit-content;
            margin-top:.75rem;
            margin-bottom:.75rem;
        }
        cite{
            @include font_size(5);
            margin-top:.75rem;
            margin-bottom:.75rem;
        }
    }
}


/**
 * Block Cover Image
 * ========================================================================== */
.wp-block-cover__inner-container{
    padding-top: var(--thm_content_gap);
    padding-bottom: var(--thm_content_gap);
    h2,h3,h4{
        max-width:100%;
    }
    p{
        text-align:left;
    }
    .wp-block-button{
        margin-top:0;
    }

}
.wp-block-cover {
    position: relative;
    background-size: cover;
    background-position: 50%;
    width:var(--thm_content_width);
    min-height:400px;
    margin-top: 0;
    margin-bottom:1.5rem;
    margin-left:auto;
    margin-right:auto;
    display: flex;
    justify-content:safe center;
    align-items:safe center;
    box-sizing:content-box;
    position:relative;
    &.has-parallax{
        background-attachment: fixed;
    }
    &.alignleft{
        height:calc( var(--thm_content_width) / 2 - 1rem);
        @extend %alignleft;
        background-position:center center;
        background-repeat:no-repeat;
        position:relative;
        background-size:60vw;

        @media screen and (max-width: 640px){
            // static break point
            background-position:center center !important;
            background-size:cover;
        }
        &.has-parallax{
            background-attachment: fixed;
        }
        .wp-block-cover-text{
            position:absolute;
            width:40vw;
            margin-top:0;
        }
        & + p{
            margin-top:0;
        }
    }
    &.alignright{
        height:calc( var(--thm_content_width) / 2 - 1rem );
        @extend %alignright;
        background-position:center center;
        background-repeat:no-repeat;
        position:relative;
        background-size:60vw;

        @media screen and (max-width: 640px){
            // static break point
            background-position:center center !important;
            background-size:cover;
        }


        &.has-parallax{
            background-attachment: fixed;
        }
        .wp-block-cover-text{
            position:absolute;
            margin:auto;
            width:40vw;
            margin-top:0;
        }
        & + p{
            margin-top:0;
        }
    }
    &.aligncenter{
        display:flex;
        position:relative;
    }
    .wp-block-cover-text{
        @include font_size(1);
        width: -moz-fit-content;
        width:fit-content;
        margin-top:0;
        flex:1 1 auto;
        font-size: 2em;
        line-height: var(--thm_common_line_height, 1.15 );
        max-width:100%;
        transform: translate(0,0);
        text-align: center;
    }
    .wp-block-cover__inner-container{
        z-index:2;
        position:relative;
        display:block;
        width:auto;

        max-width:100%;
        padding-left:var(--thm_content_gap);
        padding-right:var(--thm_content_gap);
        box-sizing:border-box;
        color: #f8f9f9;
        height:auto;
        height: -moz-fit-content;
        height:fit-content;
    }

}
.enable-alignfull{
    .wp-block-cover {
        &.alignfull{
            margin-left:calc( var(--thm_content_width) / 2 - 50vw);
            margin-right:calc( var(--thm_content_width) / 2 - 50vw);
            padding-left:calc( 50vw - var(--thm_content_width) / 2 );
            padding-right:calc( 50vw - var(--thm_content_width) / 2 );
            //width:100%;
            &:not([style]){
                //video background
                height:calc( 100vw * 0.5625 );
                margin-top:3rem;
                margin-bottom:1.5rem;
                video{
                    padding-left:0;
                    padding-right:0;
                    width:100vw;
                    height:calc(100vw * 0.5625 );
                }
            }
            /* p{
                 text-align:center;
             }*/
            &.has-left-content{
                p{
                    text-align:left;
                }
            }
            &.has-right-content{
                p{
                    text-align:right
                }
            }
        }
    }
    &.emulsion-has-sidebar{
        .wp-block-group{
            .wp-block-cover{
                &.alignfull{
                    margin-left:auto;
                    margin-right:auto;
                    padding-left:0;
                    padding-right:0;
                    width:100%;
                    .wp-block-cover__inner-container{

                    }
                }
            }
        }
    }
}
.grid .entry-content .wp-block-cover.alignfull{
    height:50vh;
    background-size:cover;
    background-position:center center;
    background-repeat:no-repeat;
    margin-left:0;
    margin-right:0;
    padding-left:0;
    padding-right:0;
    background-attachment:fixed;
    display:flex;
    align-items:center;
    justify-content: center;
}
.is-cropped .blocks-gallery-item img{
    display:block;
    width:100%;
    height:100%;
    -o-object-fit:cover;
    object-fit:cover;
}
/**
 * columns classes
 */
.columns-3,
.columns-4,
.columns-5,
.columns-6,
.columns-7,
.columns-8,
.columns-9 {
    display: flex;
    flex-wrap: wrap;
}
.columns-3 li,
.columns-4 li,
.columns-5 li,
.columns-6 li,
.columns-7 li,
.columns-8 li,
.columns-9 li {
    flex: 1 1 auto;
}
.columns-1 li {
    width: calc( 100% - 2px );
}
.columns-2 li {
    width: calc( 50% - 2px );
}
.columns-3 li {
    width: calc( 33.33333% - 2px );
}
.columns-4 li {
    width: calc(24.99% - 2px);
}
.columns-5 li {
    width: calc(19.99% - 2px);
}
.columns-6 li {
    width: calc(16.6% - 2px);
}
.columns-7 li {
    width: calc(14.2% - 2px);
}
.columns-8 li {
    width: calc(12.4% - 2px);
}
.columns-9 li {
    width: calc(11.1% - 2px);
}
/**
 * Blockquote lang CJK
 * ========================================================================== */
[lang="zh-HK"],
[lang="zh-TW"],
[lang="zh-CN"],
[lang="ko-KR"],
[lang="ja"]{
    .entry-content{
        .wp-block-quote{
            &.is-style-large{
                font-style:normal;
            }
            p{
                font-style:normal;
            }
            cite{
                font-style:normal;
            }
        }
    }
}
/**
 * Pullquote
 * ========================================================================== */
.entry-content{
    .sectionized-wp-block-pullquote{
        .wp-block-pullquote{
            &.is-style-solid-color{
                position:relative;
                blockquote{
                    overflow:hidden;
                }
            }
        }
    }
}
.wp-block-pullquote{
    position:relative;
    padding:0 0;
    text-align:left;
    margin-left:auto;
    margin-right:auto;
    max-width:calc( var(--thm_content_width) - 80px );
    width: -moz-fit-content;
    width:fit-content;
    cite{
        text-align:left;
        width: -moz-fit-content;
        width:fit-content;
        padding-left:var(--thm_content_gap);
        padding-right:var(--thm_content_gap);
        box-sizing:border-box;
        @include font_size(5);
    }
    p{
        margin-top:1.5rem;
        margin-bottom:.75rem;
        @include font_size(0);
        line-height:1.5;
        width:fit-content;
    }
    &.alignleft{
        @extend %alignleft;
        margin-top:calc( 1.5rem + 3px );//3px border width
        p{
            @include font_size(0);
            line-height:var(--thm_content_line_height);
        }

    }
    &.alignright{
        @extend %alignright;
        margin-top:calc( 1.5rem + 3px );
        p{
            @include font_size(0);
            line-height:var(--thm_content_line_height);
        }
    }

    blockquote{
        margin-top:0;
        margin-bottom:0;
        margin-left:auto;
        margin-right:auto;

        border-left:none;
        display:block;
        width:auto;
        p{
            padding-left:var(--thm_content_gap);
            padding-right:var(--thm_content_gap);
            text-align:left;
            line-height:1.5;
            width: -moz-fit-content;
            width:fit-content;
            margin-left:auto;
            margin-right:auto;
        }
        cite{
            line-height:1.5;
            text-align:left;
            width: -moz-fit-content;
            width:fit-content;
            padding-left:var(--thm_content_gap);
            padding-right:var(--thm_content_gap);
            margin-left:auto;
            margin-right:auto;
            display:block;
        }
    }
    &.alignfull{
        p{
            line-height:1.5;
            width: -moz-fit-content;
            width:fit-content;
            margin-left:auto;
            margin-right:auto;
        }
        cite{
            width: -moz-fit-content;
            width:fit-content;
            margin-left:auto;
            margin-right:auto;
            display:block;
        }
        blockquote{
            width:auto;
        }
    }
    &.alignwide{
        p{
            line-height:1.5;
            width: -moz-fit-content;
            width:fit-content;
        }
        cite{
            width: -moz-fit-content;
            width:fit-content;
            margin-left:auto;
            margin-right:auto;
            display:block;
        }
        blockquote{
        }
    }
    &.alignnone{
        p{
            margin-left:auto;
            margin-right:auto;
            width: -moz-fit-content;
            width:fit-content;
        }
    }

    &[class*="background-color"]:before{
        background: #fff;
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        z-index: -1;
    }
}
/**
 * Block audio
 * ========================================================================== */
.wp-block-audio{
    text-align:center;
}
/**
 * Block verse
 * ========================================================================== */
.wp-block-verse{
    margin:auto;
    &:before{
        content:'';
        float:none;
        display:table;
        clear:both;
        width:100%;
        height:1.5rem;//Substitution of margins immediately after float
    }
    &:after{
        content:'';
        float:none;
        display:table;
        clear:both;
        width:100%;
        height:1.5rem;//Substitution of margins immediately after float
    }
}
pre.wp-block-verse{
    background:transparent;
    white-space: pre-wrap;
    white-space: -moz-pre-wrap;
    white-space: -pre-wrap;
    white-space: -o-pre-wrap;
    word-wrap: break-word;
    br{
        line-height:3;
    }
}
/**
 * Block gallery
 * ========================================================================== */
.mce-content-body .blocks-gallery-item,
.entry-content .blocks-gallery-item{
    list-style:none;
    margin:1px;
    position:relative;
    flex:1 1 auto;
}
.mce-content-body .blocks-gallery-item figure,
.entry-content .blocks-gallery-item figure{
    margin:0;
    width:100%;
    height:100%;
}
.wp-block-gallery .blocks-gallery-image figcaption,
.wp-block-gallery .blocks-gallery-item figcaption {
    position: absolute;
    width: 100%;
    display:block;
    max-height: 100%;
    bottom: 0;
    overflow: auto;
    padding: 40px 10px 5px;
    color: #fff;
    text-align: center;
    font-size:16px;
    margin-left: auto;
    margin-right: auto;
    background:transparent;
    background: linear-gradient(0deg,rgba(0,0,0,.5),rgba(0,0,0,.2) 60%,transparent);
    text-shadow: 0 0 8px rgba(0,0,0,.7);
}
.wp-block-gallery .blocks-gallery-image figcaption,
.wp-block-gallery .blocks-gallery-item figcaption::-webkit-scrollbar{
    width: 0;
    height:.5em;
}
.wp-block-gallery .blocks-gallery-image figcaption,
.wp-block-gallery .blocks-gallery-item figcaption::-webkit-scrollbar-thumb{
    background-color: #333;
    outline: 1px solid #333;
}
.entry-content .alignwide img{
    margin-left:auto;
    margin-right:auto;
    padding-left:0;
    padding-right:0;
    width:100%;
}
.entry-content table.alignwide{
    margin-left:auto;
    margin-right:auto;
    padding-left:0;
    padding-right:0;
    width:calc( 100% - 48px );
}

.wp-block-gallery.alignright{
    @extend %alignright;
    line-height: var(--thm_common_line_height, 1.15);
    list-style-position: inside;
    padding: 0;
}
.wp-block-gallery.alignleft {
    @extend %alignleft;
    line-height: var(--thm_common_line_height, 1.15);
    list-style-position: inside;
    padding: 0;
}

/**
 * Paragraph
 * ========================================================================== */
.entry-content p.alignwide{
    padding-left:var( --thm_content_gap, 24px );
    padding-right:var( --thm_content_gap, 24px );
}
[lang="ja"] p.has-drop-cap:first-letter {
    float: left;
    font-size: 3em;
    line-height: .7;
    font-family: serif;
    font-weight: 600;
    margin: .2em .23em 0 0;
    text-transform: uppercase;
    font-style: normal;
}
.entry-content p.alignfull{
    max-width:none;
    clear:none;
}
/**
 * Table
 * ========================================================================== */
.emulsion-table-wrapper{
    padding-left:0;
    padding-right:0;
}
.enable-alignfull .emulsion-table-wrapper.alignwide{
    padding-left:0;
    padding-right:0;
    max-width:100%;
    .wp-block-table{
        margin-right:var(--thm_content_gap, 24px);
        margin-left:var(--thm_content_gap, 24px);
        width:calc(100% - 48px );
    }
}
.enable-alignfull .emulsion-table-wrapper.alignfull{
    width:var(--thm_main_width);
    position: relative;
    margin-left:auto;
    margin-right:auto;
    max-width:none;
    .wp-block-table{
        margin-right:var(--thm_content_gap, 24px);
        margin-left:var(--thm_content_gap, 24px);
        width:calc( 100% - 48px );
    }
}
.wp-block-table tbody{
    display:table-row-group;
}
.entry-content table{
    display:table;/* gutenberg table is block over written */
}
/**
 * Block media text
 * ========================================================================== */
.entry-content{
    .wp-block-media-text{
        align-items: center;
        display: grid;
        grid-template-areas: "media-text-media media-text-content";
        grid-template-columns: 50% 50%;
        grid-template-rows: auto;
        grid-template-rows: 2;
        .wp-block-media-text__media{
            width:100%;
            overflow:hidden;
            // max-width:none;
            position:relative;
            height:100%;
            img{
                position:absolute;
                top:50%;
                left:50%;
                transform: translate(-50%, -50%);
                width:100%;
                max-width:none;
                height:100%;
                object-fit:cover;
            }
            &:before{
                content:'';
                display:block;
                padding-bottom:56.25%;
                height:0;
            }
        }
        .wp-block-media-text__content{
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            padding:0;
            p{
                padding-left:var(--thm_content_gap);
                padding-right:var(--thm_content_gap);
            }
            p:last-child{
                margin-bottom:3rem;
            }
            h1,h2,h3,h4{
                width: -moz-fit-content;
                width:fit-content;
            }
        }
        &.has-media-on-the-right {
            grid-template-areas: "media-text-content media-text-media";
            grid-template-columns: 50% 50%;
        }
    }
}

/**
 * Block latest posts
 * ========================================================================== */
.emulsion-no-sidebar,
.emulsion-has-sidebar{
    .article-wrapper{
        article{
            .entry-content{
                .wp-block-latest-posts{
                    &.wp-block-latest-posts__list{
                        & > li{
                            .wp-block-latest-posts__post-full-content{
                                @extend %die-aligns;

                                .wp-block-cover{
                                    .wp-block-cover__inner-container{
                                        h2,h3,h4,p,li,td,th{
                                            color:#fff;
                                        }
                                    }
                                }
                            }
                            li{
                                display:list-item;
                                width:100%;
                            }
                            .wp-block-latest-posts__post-date{

                                display:var(--thm_post_display_date);
                            }
                            .wp-block-latest-posts__post-date:after{

                                content:'\A';
                                white-space: pre;
                            }
                        }

                    }
                    &.is-grid{
                        & > li{
                            .wp-block-latest-posts__post-full-content{
                                @extend %die-aligns;
                            }
                            li{
                                display:list-item;
                                width:100%;
                            }
                            .wp-block-latest-posts__post-date{

                                display:var(--thm_post_display_date);
                            }
                        }
                    }
                }
            }
        }
    }
}
.wp-block-latest-posts{
    font-size:var(--thm_meta_data_font_size);
    font-family:var( --thm_meta_data_font_family);
    text-transform:var(--thm_meta_data_font_transform);

    li{
        list-style:none;
        padding:.685rem;
        margin-bottom:calc( var( --thm_box_gap,3px ) * 2 );
        time,
        a{
            display:block;
            text-align:left;
            margin-left:auto;
            margin-right:auto;
            margin-top:1.5rem;
            margin-bottom:.75rem;
            width: -moz-fit-content;
            width:fit-content;

        }
        a{
            font-weight:700;
        }
        .wp-block-latest-posts____post-excerpt{
            display:block;
            text-align:left;
            margin-left:auto;
            margin-right:auto;
            margin-top:1.5rem;
            margin-bottom:.75rem;
            width: -moz-fit-content;
            width:fit-content;
            li{

                //plugins
                display:list-item;
                width:100%;
                padding-left:0;
                padding-right:0;
            }

        }

    }

    &.is-grid{
        padding-left:var( --thm_content_gap );
        padding-right:var( --thm_content_gap );
        float:none;
        display:flex;
        flex-wrap:wrap;
        &.alignleft{
            @extend %alignleft;
        }
        &.alignright{
            @extend %alignright;
        }

        li{
            flex:1 1 auto;
            margin:var(--thm_box_gap);

            a:first-child:last-child{
                margin-top:.75rem;
            }
            .wp-block-columns{
                flex-wrap:wrap;
            }

        }
    }
    &.alignleft{
        @extend %alignleft;
    }
    &.alignright{
        @extend %alignright;
    }

}

.enable-alignfull{
    .wp-block-latest-posts{
        &.alignwide{
            @extend %alignwide;
            padding-left:0;
            padding-right:0;
            .wp-block-latest-posts____post-excerpt{

            }
        }
    }
    &.emulsion-has-sidebar{
        .wp-block-latest-posts{
            &.alignfull{
                @extend %has-sidebar-alignfull;
                max-width:100%;
            }
        }
        .sectionized-wp-block-latest-posts{
            .wp-block-latest-posts{
                position:static;
            }
        }
    }
}
/**
 * Block categoris
 * ========================================================================== */
.entry-content{
    & > .wp-block-latest-comments{
        padding-left:var( --thm_content_gap );
        padding-right:var( --thm_content_gap );
    }
    .wp-block-latest-comments{
        & > li{//.wp-block-latest-comments__comment
               .wp-block-latest-comments__comment-avatar{
                   border-radius: 24px;
                   display: block;
                   float: left;
                   margin-right: 12px;
                   margin-left:0;
                   width: 40px;
                   height: 40px;
               }
               article{
                   .wp-block-latest-comments__comment-meta{
                       margin-top:0;
                       margin-bottom:0;
                       margin-left:0;
                       clear:none;
                   }
                   .wp-block-latest-comments__comment-excerpt{
                       margin-left:0;
                       display:none;
                   }
                   time{
                       display:none;
                   }
               }
        }
        &.has-avatars{
            & > li{
                article{
                    margin-left:53px;
                    width:calc(100% - 53px);
                }
            }
        }
        &.has-dates{
            & > li{
                article{
                    footer{
                        time{
                            display:block;
                        }
                    }
                }
            }
        }
        &.has-excerpts{
            & > li{
                article{
                    .wp-block-latest-comments__comment-excerpt{
                        display:block;
                    }
                }
            }
        }
    }
}
/**
 * Block categoris
 * ========================================================================== */
ul.wp-block-categories{
    padding-left:var( --thm_content_gap );
    padding-right:var( --thm_content_gap );
    font-size:var(--thm_meta_data_font_size);
    font-family:var( --thm_meta_data_font_family);
    text-transform:var(--thm_meta_data_font_transform);
    &.aligncenter,
    &.alignleft,
    &.alignright{
        max-height:19rem;
        overflow-y:scroll;
        overflow-x:hidden;
        &::-webkit-scrollbar {
            width: .5em;
            height:150px;
        }
        &::-webkit-scrollbar-thumb{
            background-color: #777;
            outline: 1px solid #777;
        }
        .aligncenter,
        ul{
            padding-left:0;
            padding-right:0;
            margin-top:0;
            margin-bottom:0;
        }
    }
    &.alignleft{
        @extend %alignleft;
    }
    &.alignright{
        @extend %alignright;
    }
    &.aligncenter{
        padding-top:0;
        padding-bottom:0;
    }
    li{
        list-style:none;
        padding:.685rem;
        margin-bottom:var( --thm_box_gap,3px );
    }
    &.wp-block-categories-list{
        &.alignfull,
        &.aligncenter{
            ul{
                position:relative;
                li{
                    &.cat-item a:after{
                        content:attr( data-title );
                        display:inline-block;
                        width:calc(100% - 17rem);
                        position:absolute;
                        left:15rem;
                        height:1.5rem;
                        white-space: nowrap;
                        overflow: hidden;
                        text-overflow: ellipsis;
                    }
                }
            }
        }
    }

    &.wp-block-categories-dropdown{
        overflow:visible;
        padding-left:var( --thm_content_gap );
        padding-right:var( --thm_content_gap );

        select{
            display:block;
            margin-left:auto;
            margin-right:auto;
        }
    }
}
.enable-alignfull{

}
.wp-block-categories-dropdown select{
    max-width:100%;
    display:block;
    position: relative;
    width:auto;
    height:auto;
    margin-left:auto;
    margin-right:auto;
    margin-top:1.5rem;
    margin-bottom:.75rem;
    padding-top:.69rem;
    padding-bottom:.69rem;
}
div.wp-block-categories.alignleft{
    //cire override
    margin-right:1rem;
}
div.wp-block-categories.alignright{
    //cire override
    margin-left:1rem;
}
/**
 * Block button
 * ========================================================================== */
.wp-block-button{
    width:var(--thm_content_width);
    margin-left:auto;
    margin-right:auto;
    padding-left:var(--thm_content_gap);
    padding-right:var(--thm_content_gap);
    display:block;
    margin-top:1.5rem;
    margin-bottom:.75rem;
    position:relative;
    .wp-block-button__link {
        border-radius: 1.5rem;
        cursor: pointer;
        display: inline-block;
        font-size:var( --thm_common_font_size, 16px );
        line-height:var( --thm_content_line_height,1.5 );
        text-align: center;
        text-decoration: none;
        text-overflow: ellipsis;
        word-break: keep-all;
        hyphens: none;
        overflow: hidden;
        white-space: nowrap;
        max-width:100%;
    }
    .is-style-squared .wp-block-button__link {
        border-radius: 0;
    }
    &.alignleft{
        clear:none;
        float:left;
        margin-right:0;
        display:inline-block;
        width:auto;
        width: -moz-fit-content;
        width:fit-content;
    }
    &.alignright{
        clear:none;
        float:right;
        margin-left:0;
        display:inline-block;
        width:auto;
        width: -moz-fit-content;
        width:fit-content;
    }
    &.aligncenter{
        clear:both;
        float:none;
        margin-right:auto;
        margin-left:auto;
        width:auto;
        width: -moz-fit-content;
        width:fit-content;
    }
}
/**
 *  Block file
 * ========================================================================== */
.entry-content{
    .wp-block-file{
        overflow:visible;
        margin-top:1.5em;
        margin-bottom:1.5em;
        padding-left:1em;
        padding-right:1em;
        &.alignleft{
            & > a,
            .wp-block-file__button{
                margin-right:.75rem;
                margin-left:0;
            }
        }
        &.alignright{
        }
    }
}
.entry-content .wp-block-file a,
.wp-block-file .wp-block-file__button{
    border-radius: 0;
    opacity:1;
    font-size:1rem;
    display:inline-block;
    padding:.75rem;
    margin-top:1.5em;
    margin-bottom:.75em;
}
a.wp-block-file__button[href$=".jpg"]:after{
    content:'  ( jpg )';
}
a.wp-block-file__button[href$=".jpeg"]:after{
    content:'  ( jpeg )';
}
a.wp-block-file__button[href$=".png"]:after{
    content:'  ( png )';
}
a.wp-block-file__button[href$=".gif"]:after{
    content:'  (  gif  )';
}
a.wp-block-file__button[href$=".ico"]:after{
    content:'  (  ico  )';
}
a.wp-block-file__button[href$=".pdf"]:after{
    content:'  (  pdf  )';
}
a.wp-block-file__button[href$=".doc"]:after{
    content:'  (  doc  )';
}
a.wp-block-file__button[href$=".docx "]:after{
    content:'  (  docx  )';
}
a.wp-block-file__button[href$=".ppt"]:after{
    content:'  (  ppt  )';
}
a.wp-block-file__button[href$=" .pptx"]:after{
    content:'  (  pptx  )';
}
a.wp-block-file__button[href$=" .pps"]:after{
    content:'  (  pps  )';
}
a.wp-block-file__button[href$=" .ppsx"]:after{
    content:'  (  ppsx  )';
}
a.wp-block-file__button[href$=".odt"]:after{
    content:'  (  odt  )';
}
a.wp-block-file__button[href$=".xls"]:after{
    content:'  (  xls  )';
}
a.wp-block-file__button[href$=".xlsx"]:after{
    content:'  (  xlsx  )';
}
a.wp-block-file__button[href$=".psd"]:after{
    content:'  (  psd  )';
}
a.wp-block-file__button[href$=".mp3"]:after{
    content:'  (  mp3  )';
}
a.wp-block-file__button[href$=".m4a"]:after{
    content:'  (  mp4a  )';
}
a.wp-block-file__button[href$=".ogg"]:after{
    content:'  (  ogg  )';
}
a.wp-block-file__button[href$=".wav"]:after{
    content:'  (  wav  )';
}
a.wp-block-file__button[href$=".mp4"]:after{
    content:'  (  mp4  )';
}
a.wp-block-file__button[href$=".m4v "]:after{
    content:'  (  m4v  )';
}
a.wp-block-file__button[href$=".mov"]:after{
    content:'  (  mov  )';
}
a.wp-block-file__button[href$=".wmv"]:after{
    content:'  (  wmv  )';
}
a.wp-block-file__button[href$=".avi"]:after{
    content:'  (  avi  )';
}
a.wp-block-file__button[href$=".mpg"]:after{
    content:'  (  mpg  )';
}
a.wp-block-file__button[href$=".ogv"]:after{
    content:'  (  ogv  )';
}
a.wp-block-file__button[href$=".3gp"]:after{
    content:'  (  3gp  )';
}
a.wp-block-file__button[href$=".3g2"]:after{
    content:'  (  3g2  )';
}
/**
 * Block sub head
 * ========================================================================== */
.entry-content p.wp-block-subhead{
    width: calc(  var(--thm_content_width) + var(--thm_align_offset));
    margin-left: auto;
    margin-right:auto;
    left:0;
    padding:var(--thm_content_gap, 24px);
    max-width:100%;
}
[lang="ja"] .entry-content p.wp-block-subhead{
    font-style: normal;
}
/**
 *
 */
h2,h3,h4{
    &.has-text-align-left {
        text-align: left;
    }
    &.has-text-align-center {
        text-align: center;
    }
    &.has-text-align-left {
        text-align: right;
    }
}
.has-text-align-left {
    text-align: left;
}
/**
 * wp-block-separator is-style-wide
 * ========================================================================== */
hr{
    &.wp-block-separator{
        @include clearfix;
        &.is-style-default{
            width:100px;
        }
        &.is-style-wide{
            margin:3rem auto;
            width:100%;
        }
        &.is-style-dots{
            font-size:2rem;
            position:relative;
            line-height:1rem;
            text-align:center;
            max-width:100%;
            &:before{
                content:'\2026';
                display:block;
                padding-left:0;
                position:absolute;
                left:0;
                right:0;
                top:0;
                bottom:0;
                margin:auto;
                height:100%;
                letter-spacing:normal;
            }
        }
    }
}
/**
 * Block column
 * ========================================================================== */
@for $i from 2 through 6 {
    .wp-block-columns.has-#{$i}-columns .wp-block-column{
        width: calc( 100% / #{$i} - var( --thm_box_gap, 3px ) * 2);
        margin: var( --thm_box_gap, 3px );
        // border:1px solid rgba( 188, 188, 188, .5);
    }
}
.wp-block-columns{
    @extend %block;
}

.entry-content .wp-block-columns{
    margin-left:auto;
    margin-right:auto;
    margin-top:3rem;
    margin-bottom:3rem;
    display:flex;
    // flex-wrap:wrap;
    .wp-block-column{
        flex: 1 1 auto;
        min-width:180px;
        padding-right:0;
        padding-left:0;
        .shortcode-wrapper{
            padding-left:0;
            padding-right:0;
        }
        .wp-block-image{
            margin-top:0;
            margin-bottom:0;
        }
        .wp-block-archives{
            display: block;
            height: auto;
            position: relative;
            margin-top:calc( 1rem - 6px );
            margin-bottom:0;
            li{
                list-style:none;
                //      border:1px solid #ccc;
                margin-right:calc( var(--thm_box_gap) * 2 );
                margin-left:calc( var(--thm_box_gap) * 2 );
                width:initial;
                flex:initial;
                display:list-item;
                padding:.67rem;
                box-sizing:border-box;
                &:before{
                    display:none;
                }
                a{
                    display:inline-block;
                    transform:none;
                }
            }
        }
        .wp-block-latest-comments{
            @extend .wp-block-archives;
            margin-top:1rem;
            li{
                margin-right:calc( var(--thm_box_gap) * 2 );
                margin-left:calc( var(--thm_box_gap) * 2 );
                margin-bottom:var(--thm_box_gap);
            }
        }
        .wp-block-latest-posts{
            padding-left:0;
            padding-right:0;
            margin-top:1rem;
            li{
                margin-right:calc( var(--thm_box_gap) * 2 );
                margin-left:calc( var(--thm_box_gap) * 2 );

                .wp-block-latest-posts____post-excerpt{

                }
                .wp-block-latest-posts__post-full-content{

                }
            }
        }

        [class|="wp-block"]{

            &.alignfull{
                margin-left:0;
                margin-right:0;
                padding-left:0;
                padding-right:0;
                max-width:100%;
                position:static;
            }

        }
        .wp-block-cover{
            &.alignfull{
                position:relative;
            }

        }
    }
}
.entry-content > .sectionized-wp-block-columns > .wp-block-columns{
    /**
     * Page Layout
     */

    display:flex;
    margin-left:auto;
    margin-right:auto;
    width:100%;
    padding-left:var(--thm_content_gap);
    padding-right:var(--thm_content_gap);

    .wp-block-column{

        // min-width:150px;

        &.sidebar{
            .wp-block-latest-comments{
                li{
                    padding:0;
                }
                .wp-block-latest-comments__comment-excerpt{
                    margin-left:-48px;
                    p{
                        padding:0;
                    }
                }
            }

        }
        &.main{
            // min-width:400px
        }
    }
}
.has-sidebar .sectionized-wp-block-columns > .wp-block-columns{
    &.alignfull{
        @extend %has-sidebar-alignfull;
    }
    &.alignwide{
        @extend %alignwide;
    }
}
.no-sidebar .sectionized-wp-block-columns > .wp-block-columns{
    &.alignfull{
        @extend %no-sidebar-alignfull;
    }
    &.alignwide{
        @extend %alignwide;
    }
}
/**
 * Block image
 * ========================================================================== */

.emulsion-has-sidebar,
.emulsion-no-sidebar{
    .wp-block-column{
        .wp-block-image{
            position:relative;
        }
    }
    .wp-block-image{
        margin-top:1.5rem;
        margin-bottom:.75rem;
        margin-left:auto;
        margin-right:auto;
        position:static;
        // width:var( --thm_content_width, 720px );
        //デリケートな変更
        // fit-contentだと、floatしない
        // width: -moz-fit-content;
        //width:fit-content;
        img{
            display:block;
            margin-left:auto;
            margin-right:auto;
        }
        &.alignfull{
            width:100%;
        }
        &figure{
            &.alignleft{
                @extend %alignleft;
            }
            &.alignright{
                @extend %alignright;
            }
            &.aligncenter{
                width:var( --thm_content_width, 720px );
                clear:both;
                img{
                    max-width:100%;
                    height:auto;
                }
            }
            figcaption{
                padding-left:var(--thm_content_gap, 24px);
                padding-right:var(--thm_content_gap, 24px);
                text-align:left;
            }
            &.is-resized{
                max-width:fit-content;
                max-width: -moz-fit-content;
                width: -moz-fit-content;
                width:fit-content;
                overflow:visible;//edge
                display:flex;
                flex-direction: column;
                padding:0;
                box-sizing:border-box;
                max-width:100%;
                img{
                    margin-left:auto;
                    margin-right:auto;
                    flex:1 1 auto;
                }
                figcaption{
                    flex:1 1 auto;
                    width: -moz-fit-content;
                    width:fit-content;
                }
            }
        }
        &.is-resized{
            //fallback html structure complex alignleft alignright aligncenter
            max-width:fit-content;
            max-width: -moz-fit-content;
            width: -moz-fit-content;
            width:fit-content;
            overflow:visible;//edge
            display:flex;
            flex-direction: column;
            padding:0;
            box-sizing:border-box;
            max-width:100%;
            img{
                margin-left:auto;
                margin-right:auto;
                flex:1 1 auto;
            }
            figcaption{
                flex:1 1 auto;
                width: -moz-fit-content;
                width:fit-content;
                img{
                    display:inline;
                    margin-left:.5rem;
                    margin-right:.5rem;
                }
            }
        }
        &.alignleft{
            @extend %alignleft;
            margin-top:0;
            margin-bottom:0;
            figure{
                margin-top:0;
            }
        }
        &.alignright{
            @extend %alignright;
            margin-top:0;
            margin-bottom:0;
            figure{
                margin-top:0;
            }
        }
        figcaption{
            // external alignwide alignfull
            padding-left:var(--thm_content_gap, 24px);
            padding-right:var(--thm_content_gap, 24px);
            img{
                display:inline;
                margin-left:.5rem;
                margin-right:.5rem;
            }
        }
        &.alignfull{
            margin-left:0;
            margin-right:0;
        }
        @supports (-ms-ime-align: auto) {
            // edge
            &.is-resized{
                max-width:100%;
                display:table;
                table-layout:fixed;
                width:auto;
                flex-direction: column;
                padding:10px;
                box-sizing:border-box;
                img{
                    margin-left:auto;
                    margin-right:auto;
                }
                figcaption{
                    display:table-caption;
                }
            }
        }
        @media screen and (-ms-high-contrast: active),(-ms-high-contrast: none) {
            // ie
            max-width:100%;
            display:table;
            table-layout:fixed;
            width:auto;
            caption-side: bottom;
            flex-direction: column;
            padding:10px;
            box-sizing:border-box;
            img{
                margin-left:auto;
                margin-right:auto;
            }
            figcaption{
                display:table-caption;
            }
            &.is-resized{
                max-width:100%;
                display:table;
                table-layout:fixed;
                width:auto;
                flex-direction: column;
                padding:10px;
                box-sizing:border-box;
                img{
                    margin-left:auto;
                    margin-right:auto;
                }
                figcaption{
                    display:table-caption;
                }
            }
        }
    }
}
.entry-content .wp-block-image.is-resized > figcaption,
.entry-content div.wp-block-image > figure > figcaption{
    //overwrite gutenberg style
    display:block;
}

/**
 * Block code
 * ========================================================================== */
.wp-block-code {
    @extend %block;
    padding: 0 var(--thm_content_gap);
    margin: auto auto;
    -moz-tab-size: 4;
    -o-tab-size: 4;
    tab-size: 4;


}
.entry-content > .wp-block-code{
    margin: 1.5rem auto .75rem;
    &.alignleft{
        @extend %alignleft;
    }
    &.alignright{
        @extend %alignright;
    }
}
/**
 * Block RSS
 * ========================================================================== */
ul.wp-block-rss{

    font-size:var(--thm_meta_data_font_size);
    //font-family:var( --thm_meta_data_font_family);
    text-transform:var(--thm_meta_data_font_transform);

    &.alignleft{
        @extend %alignleft;
    }
    &.alignright{
        @extend %alignright;
    }

    &.is-grid{
        padding-left:var(--thm_content_gap);
        padding-right:var(--thm_content_gap);
        padding:.685rem;
        box-sizing:border-box;
        .wp-block-rss__item{
            margin:var(--thm_box_gap);
            display:flex;
            justify-content: center;
            align-items: center;
            flex-wrap:wrap;
            flex-direction:column;
        }
        .wp-block-rss__item-title{
            flex:1 1 auto;
            text-align:left;
            width: -moz-fit-content;
            width:fit-content;
            align-self: flex-start;
            margin-left:auto;
            margin-right:auto;
            display:block;
            font-weight:700;

        }
        .wp-block-rss__item-excerpt{
            flex:1 1 auto;
            margin-top:1.5em;
            align-self: flex-end;
        }

    }

    li.wp-block-rss__item{
        list-style-type:decimal;

    }
    .wp-block-rss__item-title{
        text-align:left;
    }

}
/**
 *
 * ========================================================================== */
.entry-content{
    .wp-block-search{
        &.alignleft{
            @extend %alignleft;
        }
        &.alignright{
            @extend %alignright;
        }
        &.aligncenter{
            float:none;
            clear:both;
        }
    }

    .wp-block-search{
        text-align:center;
        box-sizing:border-box;
        display:flex;
        flex-direction:row;
        flex-wrap:nowrap;
        align-items: center;
        justify-content: center;
        padding:0;
        max-width:100%;
        height:48px;
        padding-left:var(--thm_content_gap);
        padding-right:var(--thm_content_gap);
        .search,
        .wp-block-search__input{
            flex:1 1 auto;
            min-width:0;
            height:48px;
            margin:0;

        }

        .wp-block-search__button{
            flex:0 0 48px;
            width:48px;
            height:48px;
            margin:0;
            border-left:none;
            overflow:hidden;
            padding:0;
            color:rgba(0,0,0,0);
            &:hover{
                cursor:pointer;             
            }
            &:before{
                content:' ';
                position:absolute;

                background-size:16px 16px;
                background-position:16px 0;
                background-repeat:no-repeat;
                display:block;
                width:48px;
                height:48px;
            }
        }
        .wp-block-search__label{
            width:1px;
            z-index:-1;
        }

    }
}
/**
 *
 * ========================================================================== */
.wp-block-tag-cloud{
    @extend %block;
    padding:.75rem var(--thm_content_gap);
    margin:var(--thm_content_gap) auto;
    a{
        vertical-align:middle;
    }
    & > br{
        /* add br element loop page */
        display:none;
    }
    &.alignleft{
        @extend %alignleft;
    }
    &.alignright{
        @extend %alignright;
    }
    &.aligncenter{
        float:none;
        clear:both;
    }
    &.alignwide{

    }
    &.alignfull{

    }
}
/**
 *
 * ========================================================================== */

.wp-block-group{
    @extend %block;
    @include clearfix;
    overflow:hidden;
    margin-top:0;
    margin-bottom:0;
    padding-left:0;
    padding-right:0;
    clear:both;
    float:none;
}
/**
 *
 * ========================================================================== */
.entry-content > .wp-block-calendar{

}
.wp-block-calendar{
    @extend %block;
    margin-left:auto;
    margin-right:auto;
    .emulsion-table-wrapper{
        margin-top:1.5rem;
        margin-bottom:.75rem;

    }
    &.alignleft{
        @extend %alignleft;
        /* clear:left;
         width:calc(50% - 1rem - var(--thm_content_gap));
         margin-right:1rem;
         margin-left:var(--thm_content_gap);*/
    }
    &.alignright{
        @extend %alignright;
        /*clear:right;
        width:calc(50% - 1rem - var(--thm_content_gap));
        margin-left:1rem;
        margin-right:var(--thm_content_gap);*/
    }
    &.aligncenter{
        float:none;
        clear:both;
    }
    table{
        caption{
            margin-bottom:.75rem;
        }
        tr{
            td{
                padding:0;
                line-height:3;
                a{
                    display:block;
                    width:100%;
                    height:100%;
                    border-bottom:3px solid;
                }
            }
        }
        thead{
            display:table-header-group;
        }
        tbody{
            display:table-row-group;
        }
        tfoot{
            display:table-footer-group;
            td{
                a{
                    border-bottom:none;
                }
            }
        }
        #prev{
            padding-top:.75rem;
        }
    }
}

/**
 *
 * ========================================================================== */

.wp-block-spacer{
    float:none;
    clear:both;
    overflow:hidden;
}
.wp-block-cover.has-parallax {
    background-attachment:fixed
}
.has-background-dim{
    position:relative;
}
.has-background-dim:before {
    content:"";
    position:absolute;
    top:0;
    left:0;
    bottom:0;
    right:0;
    background-color:rgba(0,0,0,.5);
    z-index:-1;
}
.has-background-dim-10:before {
    background-color:rgba(0,0,0,.1)
}
.has-background-dim-20:before {
    background-color:rgba(0,0,0,.2)
}
.has-background-dim-30:before {
    background-color:rgba(0,0,0,.3)
}
.has-background-dim-40{
    color:#fff;
}
.has-background-dim-40:before {
    background-color:rgba(0,0,0,.4)
}
.has-background-dim-50{
    color:#fff;
}
.has-background-dim-50:before {
    background-color:rgba(0,0,0,.5);
}
.has-background-dim-60{
    color:#fff;
}
.has-background-dim-60:before {
    background-color:rgba(0,0,0,.6)
}
.has-background-dim-70{
    color:#fff;
}
.has-background-dim-70:before {
    background-color:rgba(0,0,0,.7)
}
.has-background-dim-80{
    color:#fff;
}
.has-background-dim-80:before {
    background-color:rgba(0,0,0,.8)
}
.has-background-dim-90{
    color:#fff;
}
.has-background-dim-90:before {
    background-color:rgba(0,0,0,.9)
}
.has-background-dim-100{
    color:#fff;
}
.has-background-dim-100:before {
    background-color:#000
}
.wp-block-cover.components-placeholder {
    height:inherit
}

/**
 * Oembed Old style ( not using gutenberg )
 * ========================================================================== */

.format-video object{
    /**
     * Youtube Insert object at Press This
     */
    display:block;
    margin:auto;
    text-align:center;
}
embed[src^="http://www.youtube.com/"],
embed[src^="http://v.wordpress.com/"],
embed[src^="//v.wordpress.com/"],
a[href^="https://www.flickr.com/"] img,
iframe[src^="https://embed-ssl.ted.com/"]{
    margin:auto;
    display:block;
    max-width:100%;
    max-height:100%;
    min-width:160px;
}
.wp-block-embed__wrapper.rd-mixcloud{
    padding-bottom: 36.25%;
}
.wp-block-embed__wrapper .issuuembed{
    clear:both;
    max-height:100%;
}
.wp-embedded-content,
.wp-block-embed__wrapper iframe {
    border:none;
    overflow:hidden;
}
.rd-reverbnation{
    width:100%;
    max-width:484px;
    margin:auto;
}
.rd-reverbnation > div{
    height:0;
    padding-bottom:100%;
    overflow:hidden;
}
.rd-reverbnation > div > iframe{
    min-height:484px;
}
.rd-screencast{
    text-align:center;
}
.rd-screencast > div{
    display:inline-block;
    text-align:left;
}
.textwidget  .rd-speakerdeck,
.entry-content .rd-speakerdeck{
    max-width:652px;
}
.rd-ratio-075{
    width:100%;
    max-width:100%;
    margin:0;
}
.textwidget .rd-ratio-075 > div,
.entry-content .rd-ratio-075 > div{
    height:0;
    padding-bottom:75%;
    overflow:hidden;
}
.rd-ratio-075 > div > iframe{
    min-height:550px;
}
.textwidget .rd-slideshare,
.entry-content .rd-slideshare{
    text-align:center;
}
.textwidget .rd-slideshare > div,
.entry-content .rd-slideshare > div{
    height:0;
    padding-bottom:78%;
}
#container .textwidget .rd-slideshare iframe,
#container .entry-content .rd-slideshare iframe{
    width:100%;
    width: calc(100% - 2px);
    border:none!important;
}
.wp-block-embed__wrapper.rd-slideshare {
    padding-bottom: 78%;
}
.alignleft.rd-thumbnail > .wp-block-embed__wrapper{
    margin-right:1em;
}
//wp-block-group.has-background overflows before
.has-background:not(.wp-block-group):not(.wp-block-cover):before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: #fff;
    left: 0;
    top: 0;
    z-index: -1;
}
.wp-block-table{
    &.has-background:before {
        content: '';
        width: calc( 100% - var(--thm_content_gap) * 2 );
        background: #fff;
        left: var(--thm_content_gap);
        top: 0;
        z-index: -1;
    }

}

/**
 * fallback for plugins block
 */

.entry-content{

    & > div[id]{
        width:var(--thm_content_width);
        margin-left:auto;
        margin-right:auto;
        margin-top:3rem;
        margin-bottom:3rem;
    }
    & > .shortcode-wrapper{
        width:var(--thm_content_width);
        margin-left:auto;
        margin-right:auto;
        margin-top:3rem;
        margin-bottom:3rem;

        &.wrap-caption{
            margin-top:0;
            margin-bottom:0;
            padding:0;
        }
    }
}
body.is-dark{
    .entry-content{
        & > .shortcode-wrapper{
            &.wrap-caption{
                margin-top:0;
                margin-bottom:0;
                padding:0;
            }
        }
    }
}
div.amp-block-latest-stories{
    margin-left:auto;
    margin-right:auto;
    overflow-x:auto;
    display:flex;
    flex-wrap:wrap;
    .latest-stories__slide{
        margin-left:var(--thm_box_gap);
        margin-right:var(--thm_box_gap);
        max-width:calc(100% - var(--thm_box_gap) * 2 );
        width:calc(50% - var(--thm_box_gap) * 2 );
    }
    .latest-stories__slide:first-child{
        margin-left:0;
    }
}
/**
 * blocktype.js relate css
 */
.emulsion-has-sidebar.enable-alignfull .entry-content > .wp-block-cover.alignfull, .emulsion-has-sidebar.enable-alignfull [class|="sectionized"],
.emulsion-no-sidebar.enable-alignfull .entry-content > .wp-block-cover.alignfull[style] .wp-block-cover__inner-container,
.emulsion-no-sidebar.enable-alignfull .entry-content > .alignfull:not(.wp-block-cover),
.emulsion-has-sidebar.enable-alignfull .entry-content > .alignfull:not(.wp-block-cover){
    display:none;
}
.emulsion-has-sidebar.enable-alignfull.noscript .entry-content > .wp-block-cover.alignfull, .emulsion-has-sidebar.enable-alignfull [class|="sectionized"],
.emulsion-no-sidebar.enable-alignfull.noscript .entry-content > .wp-block-cover.alignfull[style] .wp-block-cover__inner-container,
.emulsion-no-sidebar.enable-alignfull.noscript .entry-content > .alignfull:not(.wp-block-cover),
.emulsion-has-sidebar.enable-alignfull.noscript .entry-content > .alignfull:not(.wp-block-cover){
    position:static;
    display:flex;
    max-width:100%;
}

