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

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

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

.results {
    width: 100%;
}

.results .archive-content {
    width: 100%;
}

/*--------------------------------------------------------------
# Accordion Feature
--------------------------------------------------------------*/
.accordion-button {
    display: flex;
    cursor: pointer;
    position: relative;
    width: 100%;
    background: #FDEDF0;
    margin: 3px auto;
    padding: 10px;
    justify-content: space-between;
    align-items: center;
    border-radius: 5px;
}

.accordion-button-selected {
    margin: 0 auto;
    border-radius: 5px 5px 0 0;
}

.accordion-content {
    padding: 10px;
    margin: 0;
    border: 1px solid #FDEDF0;
}

.accordion-content li {
    list-style: none;
    margin: 0;
    padding: 0 0 10px;
}

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

.accordion-selected span {
    display: block;
    margin: 0 auto 10px;
    padding: 10px 5px;
}

input.filter-reset {
    width: 100%;
}

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


/*--------------------------------------------------------------
Mobile
--------------------------------------------------------------*/
@media screen and (max-width: 640px) {
    .index-wrap {
        display: block;
    }

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

    #filter {
        display: flex;
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .filter-fields {
        display: flex;
        justify-content: flex-start;
        flex-wrap: wrap;
        width: 100%;
    }

    .filter-group {
        width: calc(1 / 3 * 100% - 5px);
        position: relative;
        margin-right: 5px;
    }

    .filter-group:last-child {
        margin-right: 0;
    }

    .accordion-content {
        background: #FFFFFF;
        width: 100%;
        position: absolute;
        z-index: 11;
        top: 30px;
        padding: 10px;
    }

    input.filter-reset {
        max-width: fit-content;
        margin: 0;
    }

    .archive-content {
        justify-content: start;
    }
}


@media screen and (max-width: 600px) {
    .filter-group {
        width: calc(1 / 2 * 100% - 3px);
        position: relative;
        margin-right: 5px;
    }

    .filter-group:nth-child(2n) {
        margin-right: 0;
    }
    .filter-group:last-child {
        width: 100%;
    }
}

