@import 'scss-@';
@import 'css-custom-prop';
@import 'core';
@import 'fonts';
@import 'elements';
@import 'article';
//@import 'block';
@import 'accessibility.scss';
@import 'comments';
//@import 'border';
@import 'site-header';
///////////////////////////////////////////////////////////////////////////////
/**
 * minimam color setting
 */
body{

    color:var(--thm_general_text_color);
    a{
        color:var(--thm_general_link_color);
        &:hover{
            color:var(--thm_general_link_hover_color);
        }
    }
    .show-post-image {
        color: var(--thm_white_color,#fff);
        border-color: var(--thm_white_color,#fff);
        a{
            color:var(--thm_cloud_color,#ecf0f1);
            &:hover{
                color:var(--thm_white_color,#fff);
            }
        }
    }
}
[amp]{

    // pure fse

    .emulsion{
        .wp-block-query-loop{
            width:100%;
            padding:0;
            margin:0;
            li{
                .wp-block-post-date{
                    @extend %block;
                }
                &:before{
                    display:none;
                }
            }
        }
    }
    .emulsion-prepend-page-wrapper{
        display:none;
    }
    .fse-posted-on{
        td{
            white-space:pre;

        }
        .wp-block-post-author{
            .wp-block-post-author__avatar{

                width:50px;
            }
            .wp-block-post-author__content{
                display:inline-block;
                width:150px;
                .wp-block-post-author__name{
                    width:auto;
                    display:inline-block;
                    vertical-align:middle;
                }
            }
        }

    }
}

:root{

    line-height:1.5;
    h1,h2,h3,h4,h5,h6{
        line-height:1.15;
    }
    .has-link-color{
        --wp--preset--color--alert: rgba(231,76,60,1);
        --wp--preset--color--notice: rgba(163,140,8,1);
        --wp--preset--color--info: rgba(22,160,133,1);
        --wp--preset--color--cool: rgba(52,152,219,1);
    }


}

//fallback
h1,h2,h3,h4,h5,h6{

    font-weight:700;
    width:var(--thm_content_width, 720px);
    max-width:100%;
    padding-left:var(--thm_content_gap, 24px);
    padding-right:var(--thm_content_gap, 24px);
    box-sizing: border-box;
    margin:1.5rem auto .75rem;
}
p:not(.site-description){
    width:var(--thm_content_width, 720px);
    max-width:100%;
    padding-left:var(--thm_content_gap, 24px);
    padding-right:var(--thm_content_gap, 24px);
    box-sizing: border-box;
    margin:1.5rem auto .75rem;
}
.site-description{
    width:auto;
}
.wp-block-embed__wrapper{
    background:rgba(188,188,188,.2);
}
form,
pre,
fieldset,
address,
ul,
dl,
ol,
table,
figure{
    width:var(--thm_content_width, 720px);
    max-width:100%;
    margin:1.5rem auto .75rem;
}
.layout{
    figcaption{
        width:inherit;
        text-align:center;

    }
    figcaption{
        margin-left:auto;
        margin-right:auto;
    }
    .alignright{
        figcaption{

        }
    }
}
.emulsion .wp-block-group,
.emulsion [class$="inner-container"]{
    padding-left:0;
    padding-right:0;
}

address{
    text-align:center;
}

.search-result-0,
.not-found,
article > div{

    & > div{
        width:var(--thm_content_width, 720px);
        max-width:100%;
        //exception

    }

    & > [class|="wp-block"]{
        width:var(--thm_content_width, 720px);
        max-width:100%;
        overflow:hidden;
        margin-top: 1.5rem;
        margin-bottom: 0.75rem;
        padding-left:var(--thm_content_gap, 24px);
        padding-right:var(--thm_content_gap, 24px);
    }
    & > .wp-block-media-text{
        padding-left:0;
        padding-right:0;
        &.alignfull{
            padding-left:0;
            padding-right:0;
        }
        p{
            width:auto;
        }
    }
}
article header {
    //justify-content: flex-start;
}
.archive-title,
.taxonomy-description{
    width:-moz-fit-content;
    width:fit-content;
    margin-left:auto;
    margin-right:auto;


    padding-left:var(--thm_content_gap, 24px);
    padding-right:var(--thm_content_gap, 24px);
}
.taxonomy-description{
    width: var(--thm_content_width, 720px);
    max-width: 100%;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    padding-left: var(--thm_content_gap, 24px);
    padding-right: var(--thm_content_gap, 24px);
    box-sizing: border-box;
}

textarea#comment,
form > p,
cite,
label[for="comment"],
.comment-reply-title{
    padding-left:var(--thm_content_gap, 24px);
    padding-right:var(--thm_content_gap, 24px);
}

.comments .form-submit [type="submit"],
.wp-block-latest-posts__post-excerpt > a,// read more link
.layout a.skin-button,
.layout span.skin-button{
    @include clearfix;
    clear:both;
    float:none;
    overflow:hidden;
    display:inline-block;
    text-align:center;// edge
    width:140px;//edge
    width: -moz-fit-content;
    width:fit-content;
    padding:0 1rem;
    line-height:calc(var(--thm_common_font_size, 16px) * 3 - 2px);
    margin-top:1.5rem;
    margin-bottom:.75rem;
    margin-left:var(--thm_content_gap, 24px);
    margin-right:var(--thm_content_gap, 24px);
    color:var(--thm_header_text_color);
    background: var(--thm_header_bg_color);
    border-color:var(--thm_common_border, rgba(188,188,188,.5));
    border-style:var(--thm_common_border_style);
    border-width:var(--thm_common_border_width);
}
@media screen and ( max-width : 419px ) {
    // static break point
    .comment-form .comment-form input[name="author"],
    .comment-respond .comment-form input[name="author"],
    .comment-form .comment-form input[type="url"],
    .comment-respond .comment-form input[type="url"],
    .comment-form .comment-form input[type="email"],
    .comment-respond .comment-form input[type="email"],
    .comment-form .comment-form input[type="author"],
    .comment-respond .comment-form input[type="author"],
    .comment-form .comment-form input[type="comment"],
    .comment-respond .comment-form input[type="comment"] {
        width: 100%;
        max-width: 100%;
        margin-left: 0;
        margin-right:auto;
    }

    ol.wp-list-comments,
    .comment-wrapper .comments{
        padding-left:3px;
        padding-right:3px;

        ul.children{
            padding-left:1rem;
        }
    }

    .comment-form .comment-form textarea,
    .comment-respond .comment-form textarea{
        width:100%;
        max-width:100%;
        margin-left:0;
    }
    .comment-form .comment-form input[type="submit"],
    .comment-respond .comment-form input[type="submit"] {
        margin-left: 0;

    }
}



p.badge,
.badge{
    position: relative;
    top: 0;
    border: 1px solid rgba(127,127,127,.4);
    box-sizing: border-box;
    width:fit-content;
    display:inline-block;
    padding-left:var(--thm_content_gap, 24px);
    padding-right:var(--thm_content_gap, 24px);
    vertical-align:middle;

    &:before{
        content: '';
        position:relative;
        display: inline-block;
        padding-top: calc(50% + var(--thm_content_gap, 24px));
        padding-bottom:  calc(50% + var(--thm_content_gap, 24px));
        height: 0;
        width: 1px;
        vertical-align:middle;
    }

}
/* layout */
body{
    .alignleft,.alignright{
        &.wp-block-cover{
            max-width:100%;
        }
        @media screen and ( max-width : 640px ) {
            // static break point
            [class|="wp-block"]{
                width:100%;
                max-width:100%;
                margin-left:0;
                margin-right:0;
            }
        }
    }
    [class|="wp-block"].aligncenter,
    .aligncenter{

        width:-moz-fit-content;
        width:fit-content;
        box-sizing:border-box;
        clear:both;
        float:none;
        max-width:calc( var(--thm_content_width, 720px) - var(--thm_align_offset) );
        margin:1.5rem auto .75rem;

        @media screen and ( max-width : 640px ) {
            // static break point
            width:100%;
            max-width:100%;
            margin-left:0;
            margin-right:0;
        }
    }
    [class|="wp-block"].alignleft,
    .alignleft{
        clear:left;
        float:left;
        width:calc(50% - 2rem);
        margin-right:2rem;
        margin-left:0;
        max-width:100%;
        &.is-resized{
            width:auto;

        }
    }
    [class|="wp-block"].alignright,
    .alignright{
        clear:right;
        float:right;
        width:calc(50% - 2rem);
        margin-left:2rem;
        margin-right:0;
        max-width:100%;
    }
    [class|="wp-block"].alignwide,
    .alignwide{
        width:calc( var(--thm_content_width, 720px) + var(--thm_align_offset) );
        position: relative;
        left:0;
        margin-left:auto;
        margin-right:auto;
        max-width:100%
    }
    [class|="wp-block"].alignfull,
    .alignfull{
        width:100vw;
        position: relative;
        left:calc( 50% - 50vw);
        margin-left:auto;
        margin-right:auto;
        max-width:100%;
        padding-left:var(--thm_content_gap, 24px);
        padding-right:var(--thm_content_gap, 24px);

    }
}
div.wp-block-image{
    display:inline;
}
div.wp-block-image.is-style-rounded{

    figure.aligncenter{
        text-align:center;
    }
}
.is-singular{
    article{
        .entry-content{
            margin-top:var(--thm_content_margin_top);
        }
    }
}

/* minimam style site-header */

.header-layer{
    background:var(--thm_header_bg_color);
    color:var(--thm_header_text_color);
    .header-text {

        .site-title{
            font-size: 24px;
            line-height: 1.15;
            font-weight: bold;
            margin-top:0;
            margin-bottom:0;
            padding-top: var(--thm_content_gap, 24px);
            padding-right:var(--thm_content_gap, 24px);
            padding-left:var(--thm_content_gap, 24px);
            width:auto;
            max-width:100%;
        }
        .site-description{
            margin-top:0;
            margin-bottom:0;
            padding-bottom:.75rem;
            width:auto;
            max-width:100%;

        }
    }
    &.amp-singular-has-header-image{
        position:absolute;
        background:transparent;
        color:#fff;
        z-index:2;
        a{
            color:#fff;
        }
    }

}
.site-title.has-custom-logo + .site-description{
    display:none;
}
body > header.header-image-active.template-part-header-custom{
    width:100vw;
    max-height: var(--thm_header_media_max_height);
    overflow:hidden;
    position:relative;
    amp-img{
        object-fit:cover;
        // width: 100vw;
        // height: calc(100vw * 0.6645199063);
        // max-height: var(--thm_header_media_max_height);
        z-index: 1;
    }
    .custom-logo-wrap{


    }

    .header-text {
        height: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        position: absolute;
        z-index:3;
        top: 0;
        left: 0;
        right: 0;
        margin: auto;
        .site-title{
            font-size: 48px;
            line-height: 1.15;
            text-align: center;
            font-weight: normal;
        }
        .site-description{
            text-align:center;
        }
    }
    *{
        color: var(--thm_white_color);
        border-color: var(--thm_white_color);
    }
}
.layout-grid{
    header ~ .layout{
        article header{
            background:var(--thm_header_bg_color);
            color:var(--thm_header_text_color);

            a{
                color:var(--thm_header_link_color);
            }
            .emulsion-comment-count{
                display:none;
            }
        }
    }
}
.is-singular{
    article:not(.has-post-thumbnail) header{
        background:var(--thm_header_bg_color);
        color:var(--thm_header_text_color);
        a{
            color:var(--thm_header_link_color);
        }
    }
}
div.page-title-block,
.emulsion-header-has-title div.page-title-block{
    min-height:25vh;
    display: -webkit-box;
    -webkit-box-pack: center;
    -webkit-box-align: center;
    -webkit-box-sizing:border-box;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    -ms-flex-pack: center;
    justify-content: center;
    -ms-flex-direction:column;
    flex-direction:column;
    height:100%;
    box-sizing:border-box;
    margin-left:calc(var(--thm_content_gap, 24px) * -1);
    margin-right:calc(var(--thm_content_gap, 24px) * -1);

    background:var(--thm_header_bg_color);
    color:var(--thm_header_text_color);
    a{
        color:var(--thm_header_link_color);
    }
}
main > .grid,
main > .stream{
    display:flex;
    flex-wrap:wrap;
    margin:1.5rem auto 1.5rem;
    .template-part-content-stream{
        flex:1 1 auto;
        width:var(--thm_content_width, 720px);
        max-width:100%;
        margin:var(--thm_box_gap, 3px);
        .posted-on,
        .entry-meta{
            display:none;
        }
    }
    .template-part-content{
        flex:1 1 auto;
        width:var(--thm_content_width, 720px);
        max-width:100%;
        margin:var(--thm_box_gap, 3px);
    }
}
.grid,
.stream{
    article{
        .content-col{
            .entry-title{
                font-size:24px;
                padding-left: var(--thm_content_gap, 24px);
                padding-right: var(--thm_content_gap, 24px);
                .trancate-heading{
                    &[data-rows="2"]{
                        height:calc(24px * var(--thm_common_line_height) * 2);
                    }
                    &[data-rows="3"]{
                        height:calc(24px * var(--thm_common_line_height) * 3);
                    }
                    &[data-rows="4"]{
                        height:calc(24px * var(--thm_common_line_height) * 4);
                    }
                    &[data-rows="5"]{
                        height:calc(24px * var(--thm_common_line_height) * 5);
                    }
                    &[data-rows="6"]{
                        height:calc(24px * var(--thm_common_line_height) * 6);
                    }
                }
            }

        }
        .entry-content,
        .content{
            [data-rows="2"]{
                height:calc(var(--thm_meta_data_font_size) * var(--thm_content_line_height, 1.5) * 2);
            }
            [data-rows="3"]{
                height:calc(var(--thm_meta_data_font_size) * var(--thm_content_line_height, 1.5) * 3);
            }
            [data-rows="4"]{
                height:calc(var(--thm_meta_data_font_size) * var(--thm_content_line_height, 1.5) * 4);
            }
            [data-rows="5"]{
                height:calc(var(--thm_meta_data_font_size) * var(--thm_content_line_height, 1.5) * 5);
            }
            [data-rows="6"]{
                height:calc(var(--thm_meta_data_font_size) * var(--thm_content_line_height, 1.5) * 6);
            }
        }
    }
}

.archive,
.home{
    article{
        .content-excerpt{
            .alignfull{
                max-width:100%;
            }
        }
        &.has-post-thumbnail{
            .content-excerpt{
                display:none;
            }
        }

    }
}
/* minimam style color */

.header-layer{

    color:var(--thm_header_text_color);
    background: var(--thm_header_bg_color);

    &.header-is-dark,
    &.has-header-image,
    &.has-header-video{
        color:var(--thm_white_color);
        a{
            color:var(--thm_white_color);
        }
    }
}
article .has-background:not(.has-text-color) *:not(.has-text-color){
    color:var(--thm_black_color);
}
article .has-black-background-color:not(.has-text-color) *:not(.has-text-color) {
    color:var(--thm_white_color);
}

#main{
    .wp-block-button .wp-block-button__link:not(.has-text-color){
        color:var(--thm_white_color);
    }
    article .has-background.has-midnight-gradient-background,
    article .has-background.has-cool-to-warm-spectrum-gradient-background,
    article .has-background.has-luminous-vivid-orange-to-vivid-red-gradient-background,
    article .has-background.has-vivid-cyan-blue-to-vivid-purple-gradient-background,
    article .has-background.has-midnight-gradient-background *:not(.has-text-color),
        article .has-background.has-cool-to-warm-spectrum-gradient-background *:not(.has-text-color),
        article .has-background.has-luminous-vivid-orange-to-vivid-red-gradient-background *:not(.has-text-color),
        article .has-background.has-vivid-cyan-blue-to-vivid-purple-gradient-background *:not(.has-text-color){
        color:var(--thm_white_color, #ffffff);
    }
    article .has-background.has-white-background-color,
    article .has-background.has-electric-grass-gradient-background,
    article .has-background.has-luminous-dusk-gradient-background,
    article .has-background.has-blush-bordeaux-gradient-background,
    article .has-background.has-blush-light-purple-gradient-background,
    article .has-background.has-very-light-gray-to-cyan-bluish-gray-gradient-background,
    article .has-background.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background,
    article .has-background.has-light-green-cyan-to-vivid-green-cyan-gradient-background,
    article .has-background.has-pale-ocean-gradient-background *:not(.has-text-color),
        article .has-background.has-white-background-color *:not(.has-text-color),
        article .has-background.has-electric-grass-gradient-background *:not(.has-text-color),
        article .has-background.has-luminous-dusk-gradient-background *:not(.has-text-color),
        article .has-background.has-blush-bordeaux-gradient-background *:not(.has-text-color),
        article .has-background.has-blush-light-purple-gradient-background *:not(.has-text-color),
        article .has-background.has-very-light-gray-to-cyan-bluish-gray-gradient-background *:not(.has-text-color),
        article .has-background.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background *:not(.has-text-color),
        article .has-background.has-light-green-cyan-to-vivid-green-cyan-gradient-background *:not(.has-text-color),
        article .has-background.has-pale-ocean-gradient-background *:not(.has-text-color){
        color:var(--thm_black_color, #333333);
    }
}
.wp-block-search .wp-block-search__button{

    background:var(--thm_header_bg_color);
    color:var(--thm_header_text_color);

    svg{
        fill:var(--thm_header_text_color);
    }
}
.custom-background{

    background:var(--thm_background_color);
    color:var(--thm_general_text_color);

    a{
        color:var(--thm_general_link_color);
        .text{
            color:var(--thm_general_link_color);
            background:transparent;
        }
    }
    .wp-block-calendar table {
        th{
            color:var(--thm_black_color);
            background: #ddd;
        }
        *{
            color:var(--thm_general_text_color);
        }
        a{
            color:var(--thm_general_link_color);
            &:hover{
                color:var(--thm_general_text_color);
            }
        }
    }
}
.comment-wrapper{
    color:var(--thm_comments_color);
    background:var(--thm_comments_bg);

    a{
        color:var(--thm_comments_link_color);
        &:hover{
            color:var(--thm_comments_color);
        }
    }
}
:root:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) body.noscript.enable-alignfull .wp-block-group.has-background:not([class*="gradient-background"]),
:root:not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_):not(#_) body.noscript.enable-alignfull .wp-block-pullquote.has-background:not([class*="gradient-background"]),
.has-background{
    background:var(--thm_unknown-bg);
    color:var(--thm_black_color);
    a{
        color:var(--thm_black_color);
    }
}

/* border */

input,
table th,
table td{

    border-color:var(--thm_common_border, rgba(188,188,188,.5));
    border-style:var(--thm_common_border_style);
    border-width:var(--thm_common_border_width);
}

/* footer */

.footer-layer{
    .footer-widget-area{
        ul.footer-widget-area-lists{
            width:var(--thm_main_width);

            padding-right:var(--thm_content_gap, 24px);
            padding-left:var(--thm_content_gap, 24px);
            .widget{
                ul{
                    padding-right:var(--thm_content_gap, 24px);
                    padding-left:var(--thm_content_gap, 24px);
                }
            }
        }
    }
}
/* widget */
.post-navigation .nav-links .nav-next a .title,
.post-navigation .nav-links .nav-previous a .title{
    margin:auto;
}
/**
 * Hide elements that don't make sense for theme-dependent block patterns
 */

.emulsion-modal-title,  /* old version */
.modal-open-link,       /* old version */
.emulsion-dependency{   /* @since 1.8.1 */
    display:none;
}
body .wp-block-group.alignfull:first-of-type{
    margin-top:0;
}
.wp-block-group .wp-block-group__inner-container{
    overflow:hidden;
}

#document .counter.badge:before{
    padding-top:0;
    padding-bottom:0;
}
#document .counter.badge {
    padding: 0;
    margin: 0;
    text-align: center;
    min-width: 1rem;
    height: 1rem;
    font-size: 11px;
    line-height: 1.5;
}
.badge:not(.has-image-badge).circle {
    border-radius: 9999px;
}

/**
 * Extend block group
 * ========================================================================== */

[amp] body{

    .layout,// no fse amp
    .wp-site-blocks{ // AMP + FSE
                     .wp-block-group{
                         &.grid{
                             & > .wp-block-group__inner-container{

                                 & > .grid-child,
                                 & > .wp-block, // editor class
                                 & > [class|="wp-block"]{

                                     *{
                                         max-width:100%;
                                     }

                                 }

                                 figure.wp-block-image{
                                     margin:0;
                                     padding:0;
                                     amp-img {
                                         display:block;
                                         max-width: 100%;
                                         width: 100%;
                                         height: 0;
                                         object-fit: cover;
                                         padding-bottom: 56.25%;
                                     }
                                 }
                             }
                         }
                     }

    }
}
[amp]{
    //CSS to not affect fse
    .wp-block-group.grid{
        .size1of3,
        .size1of3,
        .size1of4,
        .size1of2,
        .size1of5,
        .size2of3,
        .size2of5,
        .size3of4,
        .size3of5,
        .size4of5 {
            width: auto;
        }
    }
}
//OW
.wp-block-column[data-amp-original-style*=flex-basis] {
    flex-grow: 1;
}
.wp-block-image{
    .alignright,
    .alignleft{
        amp-img{
            display:block;
            margin:auto;
        }
       
    }
}
