/*
	* CSS for Filter Page
	*
	* @package      ourbestbites_filter
	* @author       Lindsay Humes
	* @since        1.0.0
	* @license      GPL-2.0+
*/

/*--------------------------------------------------------------
# Filter Header
--------------------------------------------------------------*/
.filter-header {
    margin: var(--wp--custom--layout--block-gap) 0;
}

.filter-wrap {
    max-width: 1200px;
    margin: 0 auto;
    width: calc(100% - 20px);
    position: relative;
}

.filter-wrap:after {
    content: '';
    display: block;
    width: 100%;
    height: 18px;
    background: url(../svg/accent-lines-2.svg) repeat center;
    margin-top: var(--wp--custom--layout--block-gap-small);
}

.filter-title {
    margin: 0 0 10px;
    position: relative;
}

.filter-title:after {
    content: '';
    display: block;
    width: 100%;
    height: 5px;
    background: url(../svg/accent-dots.svg) repeat left;
    margin-top: var(--wp--custom--layout--block-gap-small)
}

.filter-description {
    line-height: 1.4;
    font-size: 1rem;
}

/*--------------------------------------------------------------
# Page Layout
--------------------------------------------------------------*/
.index-wrap {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    max-width: 1200px;
    width: calc(100% - 20px);
    margin: 0 auto 30px;
}

.filter {
    width: 200px;
    margin-right: 30px;
}

.results {
    width: 100%;
}

.results .archive-content {
    width: 100%;
    margin-inline: auto;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 20px;
    row-gap: 20px;
}

/*--------------------------------------------------------------
# Accordion Feature
--------------------------------------------------------------*/
.filter-group {
    margin: 0 auto 10px;
}

.accordion-button {
    background: var(--wp--preset--color--blue-light);
    border-radius: var(--wp--custom--border-radius--small);
    padding: var(--wp--custom--layout--block-gap-small);
    display: flex;
    width: 100%;
    cursor: pointer;
    position: relative;
    align-items: center;
    justify-content: space-between;
    margin: 0;
    font-size: .9rem;
    line-height: 1.1;
    font-weight: 700;
}

.accordion-button.accordion-button-selected {
    border-radius: var(--wp--custom--border-radius--small) var(--wp--custom--border-radius--small) 0 0;
}

.accordion-button svg {
    width: 15px;
    height: 15px;
}

.accordion-content {
    padding: 10px;
    background: var(--wp--preset--color--blue-lightest);
    border-radius: 0 0 var(--wp--custom--border-radius--small) var(--wp--custom--border-radius--small);
    margin: 0;
    display: block;
}

.accordion-content li {
    list-style: none;
    margin: 0;
    padding: 0 0 5px;
    line-height: 1.2;
}

.accordion-content li:last-child {
    padding: 0;
}

.accordion-content li input[type="checkbox"] {
    margin-right: 3px;
}

.accordion-selected span {
    display: block;
    margin: 10px 0 0;
    padding: 0;
    font-style: italic;
    font-size: .9rem;
    line-height: 1.1;
}

input.filter-reset {
    width: 100%;
    border: 0;
    background: var(--wp--preset--color--blue);
    color: var(--wp--preset--color--white);
}

.no-filter-results {
    text-align: center;
    margin: 30px auto;
    color: red;
}

/*--------------------------------------------------------------
# Filter Excerpts
--------------------------------------------------------------*/
.post-filter {
    -webkit-box-shadow: var(--wp--custom--box-shadow--1);
    -moz-box-shadow: var(--wp--custom--box-shadow--1);
    box-shadow: var(--wp--custom--box-shadow--1);
    background: var(--wp--preset--color--white);
    border-radius: var(--wp--custom--border-radius--medium);
}

.post-summary__image img {
    border-radius: var(--wp--custom--border-radius--medium) var(--wp--custom--border-radius--medium) 0 0;
}

.post-filter-content {
    padding: var(--wp--custom--layout--block-gap-small);
}

.post-filter-content h3 {
    margin: 0;
    font-size: var(--wp--preset--font-size--small);
    line-height: var(--wp--custom--line-height--small);
}

/*--------------------------------------------------------------
# Responsive Features
--------------------------------------------------------------*/
@media (max-width: 768px) {
    .results .archive-content {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .index-wrap {
        display: block;
    }

    .filter {
        width: 100%;
        margin-right: 0;
        margin-bottom: 20px;
    }

    .filter-fields {
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: space-between;
    }

    .filter-group {
        width: calc(1 / 2 * 100% - 10px);
        margin: 0 5px 5px 0;
    }

    .filter-group:nth-child(2n) {
        margin: 0 0 5px 0;
    }
}

@media (max-width: 500px) {
    .results .archive-content {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}