/* General Query
--------------------*/
@media screen {
    /* for js dynamically added flex box */
    .flexPad.block,
    .flexPad.block:before,
    .flexPad.block:after {
        margin: 0 !important;;
        height: 0 !important;;
        padding: 0 !important;
        border: 0 !important;
    }

    /* for centered flex boxes, ignore all pseudo spacer */
    [class*="flex-col"].boxcentered:after,
    [class*="flex-col"].boxcentered:before,
    .boxcentered .flexPad.block,
    .boxcentered .flexPad.block:before,
    .boxcentered .flexPad.block:after {
        display: none !important;
        flex-grow: unset !important;;
    }

    .boxcentered > .block, .boxcentered > .block {
        flex-grow: unset !important;
    }


    /* These variables need to be here, not within css rule below */
    [class*="flex-col"] {
        --columns: 1;
        --gap: 0px;
        column-gap: var(--gap);  
    }


    /* class on multicol wrapper, don't apply class on article, coz article may have other element */
    [class*="flex-col"]:not(.content-element-group):not(.flex),
    [class*="flex-col"]:is(.content-element-group) > .inside_ce {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;
        align-content: flex-start;
        justify-content: space-between;
        height: 100%;
        max-width: 100%;
    }

    [class*="flex-col"]:not(.content-element-group) > .block,
    [class*="flex-col"]:is(.content-element-group) > .inside_ce > .block {
        flex-grow: 1;
        width: 100%;
        word-break: break-word;
    }

    [class*="flex-col"]:not(.flex):after,
    [class*="flex-col"]:not(.flex):before {
        flex-grow: 1;
        content: "";
        display: block;
        height: 0;
        order: 1; /* default order is 0, so 1 should be enough to pull to the end */
    }

    [class*="flex-col"]:not(.content-element-group) > .block,
    [class*="flex-col"]:not(.content-element-group) > .like-block,
    [class*="flex-col"]:not(.content-element-group):after,
    [class*="flex-col"]:not(.content-element-group):before,
    [class*="flex-col"]:is(.content-element-group) > .inside_ce > .block,
    [class*="flex-col"]:is(.content-element-group) > .inside_ce > .like-block,
    [class*="flex-col"]:is(.content-element-group) > .inside_ce:after,
    [class*="flex-col"]:is(.content-element-group) > .inside_ce:before {
        width: calc((100% / var(--columns)) - var(--gap) + (var(--gap) / var(--columns)));
        max-width: calc((100% / var(--columns)) - var(--gap) + (var(--gap) / var(--columns)));
    }


    /* Autowidth */
    [class*="flex-col"].autowidth > .block {
        width: auto !important;
        min-width: auto !important;
        max-width: 100% !important;
    }

}

/* Mobile-landscape (and larger) lansacape */
@media only screen and (min-width: 480px) {
}


/* Tablet-landscape (and larger) for width 992px */
@media only screen and (min-width: 992px) {
    [class*="flex-col"]:not(.content-element-group) > .block,
    [class*="flex-col"]:is(.content-element-group) > .inside_ce > .block {
        word-break: normal;
    }



    .flex-end {
        align-items: flex-end;
        align-self: flex-end;
    }

    .shrink-width {
        display: contents;
    }    
}

/* min-width:1100 */
@media only screen and (min-width:1100px) {
}
/* General ends
--------------------*/


/* flex-col2 Query
--------------------*/
@media only screen and (min-width: 480px) {
    /* 2 column */
}

/* min-width:768px Tablet-portrait (and larger) */
@media only screen and (min-width: 768px) {
    .flex-col2 {
        --columns: 2;
    }
}
/* flex-col2 ends
--------------------*/


/* flex-col3 Query
--------------------*/
@media only screen and (min-width: 480px) {
}

/* min-width:650px Tablet-portrait (and larger) */
@media only screen and (min-width: 650px) {
    /* 3 column */
    .flex-col3 {
        --columns: 3;
    }
}
/* flex-col3 ends
--------------------*/


/* flex-col4 Query
--------------------*/
@media only screen and (min-width: 480px) {
    /* 4 column */
    .flex-col4 {
        --columns: 2;
    }
}

/* min-width:768px Tablet-portrait (and larger) */
@media only screen and (min-width: 768px) {
    /* 4 column medium like 2 col*/
    .flex-col4 {
        --columns: 2;
    }
}


/* Tablet-landscape (and larger) for width 992px */
@media only screen and (min-width: 992px) {
    /* 4 column */
    .flex-col4 {
        --columns: 4;
    }
}
/* flex-col4 ends
--------------------*/


/* flex-col5 Query
--------------------*/
@media only screen and (min-width: 480px) {
    /* 5 column like 3 col */
    .flex-col5 {
        --columns: 3;
    }
}

/* min-width:768px Tablet-portrait (and larger) */
@media only screen and (min-width: 768px) {
    /* 5 column like 4 col */
    .flex-col5 {
        --columns: 4;
    }
}

/* Tablet-landscape (and larger) for width 992px */
@media only screen and (min-width: 992px) {
    /* 5 column */
    .flex-col5 {
        --columns: 5;
    }
}
/* flex-col5 ends
--------------------*/



/* flex-col6 Query
--------------------*/
@media only screen and (min-width: 480px) {
    /* 6 column small is like 2 col*/
    .flex-col6 {
        --columns: 2;
    }
}

/* min-width:768px Tablet-portrait (and larger) */
@media only screen and (min-width: 768px) {
    /* 6 column medium is like 3 col*/
    .flex-col6 {
        --columns: 3;
    }
}

/* Tablet-landscape (and larger) for width 992px */
@media only screen and (min-width: 992px) {
    /* 6 column */
    .flex-col6 {
        --columns: 6;
    }
}
/* flex-col6 ends
--------------------*/


/* GAPS Query
--------------------*/
@media screen {
    .gap1,
    .gap1 .inside_ce {
        --gap: 0.5rem;
    }

    .gap2,
    .gap2 .inside_ce {
        --gap: 1rem;
    }

    .gap3,
    .gap3 .inside_ce {
        --gap: 1.25rem;
    }
}

/* min-width:768px Tablet-portrait (and larger) */
@media only screen and (min-width: 768px) {
    .gap1,
    .gap1 .inside_ce {
        --gap: 0.75rem;
    }

    .gap2,
    .gap2 .inside_ce {
        --gap: 1.5rem;
    }

    .gap3,
    .gap3 .inside_ce {
        --gap: 2rem;
    }
        
}


/* Tablet-landscape (and larger) for width 992px */
@media only screen and (min-width: 992px) {
}

/* GAPS ends
--------------------*/