/*-------------------------------style desktop filters-------------------------------*/
/*------------setting to position sticky sidebar------------------*/
.ast-desktop .sidebar-main {
    position: sticky;
    top: 220px; 
}

/*-----styling outside form wrapper -----------------------------*/
.outside-form-wrapper{
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

/*----styling wrapper-1 in form------------------*/
.inside-form-wrapper-1{
    grid-template-columns: repeat(3, minmax(250px, 1fr));
    display: grid;
    gap: 1rem;
    max-height: 70vh;
    overflow-y: auto;
}

/*-------styling checkbox-select wrapping element------------------*/
.inside-form-wrapper-1 .select-element-wrapper{
    display: flex;
    overflow-y: auto;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid gold;
    padding: 5px;
}

/*------styling labels containing checkbox and text------------------*/
.select-element-wrapper label{
    display: flex;
    justify-content: space-between;
}

/*-----styling p elements  centering text------------------*/
.select-element-wrapper p{
    padding: 0;
    text-align: center;
}

/*-------styling opening filter window button wrapper centering button------------------*/
.button-filter-wrapper{
    display: flex;
    justify-content: center;
}

/*-----styling filter form not opened------------------*/
#checkbox-form-filter{
    display: flex;
    flex-direction: column;
    gap: 1rem;
    border: 1px solid rgb(0, 132, 255);
    padding: 2rem;
    visibility: hidden;
    interpolate-size: allow-keywords;
    opacity: 0;
    max-height: 0;
    transition: all 250ms ease-in-out;
    overflow: hidden;
}

/*---------styling filter form when opened------------------*/
#checkbox-form-filter.opened{
    visibility: visible;
    opacity: 1;
    max-height: fit-content;
    transition: all 250ms ease-in-out;
}

/*-----------style open filter button with pressed style------------------*/

.outside-form-wrapper button.filter-button-opener, .filter-button-element-wrapper-1 input[type=submit] {
    width: max(25ch, 200px);
    min-width: fit-content;
    background: gold;
    border-radius: 5px;
    padding: 5px 12px;
    margin: 5px auto;
    outline: 2px solid #b89b00;
    color: #000;
    border: none;
    cursor: pointer;
    box-shadow:
        1px 3px 1px 1px #b89b00,   /* bottom edge */
        0 6px 10px rgba(0,0,0,0.25);
    transition: outline 250ms ease, box-shadow 250ms ease, transform 250ms;
}

.outside-form-wrapper button.filter-button-opener:active, .filter-button-element-wrapper-1 input[type=submit]:active {
    /* width: max(25ch, 200px); */
    transform: translate3d(0, 1px, 0);
    box-shadow:
        1px 2px 1px 1px #b89b00,   /* bottom edge */
        0 6px 10px rgba(0,0,0,0.25);
        transform-style: preserve-3d;
}

/*------------------------------dtyling submit input to center------------------------------*/
.filter-button-element-wrapper-1{
    display: flex;
    justify-content: center;
}

/*************style scroll bar******* */

/* Chrome, Safari, Edge */
.inside-form-wrapper-1::-webkit-scrollbar, .select-element-wrapper::-webkit-scrollbar {
    width: 6px; /* thin scrollbar */
}

.inside-form-wrapper-1::-webkit-scrollbar-track, .select-element-wrapper::-webkit-scrollbar-track {
    background: #f1f1f1; /* light track */
    border-radius: 6px;
}

.inside-form-wrapper-1::-webkit-scrollbar-thumb, .select-element-wrapper::-webkit-scrollbar-thumb {
    background-color: #52accc; /* your blue accent */
    border-radius: 6px;
}

/* Firefox */
.inside-form-wrapper-1, .select-element-wrapper {
    scrollbar-width: thin;          /* makes it thinner */
    scrollbar-color: #52accc #f1f1f1; /* thumb color + track color */
}

/*-------------------------------style last items alone in case-------------------------------*/
.inside-form-wrapper-1 > *:last-child:nth-child(odd) {
    grid-column: 1 / -1;
    justify-self: center;
}

/*-------------------------------style mobile filters-------------------------------*/

@media screen and (max-width: 921px) {

    /*-----styling outside form wrapper -----------------------------*/
    .outside-form-wrapper{
        display: flex;
        flex-direction: column;
        max-height: 80vh;
    }

    /*-------decreasing padding in form-------------------*/
    #checkbox-form-filter{
        padding: 1rem;
    }

    /*------styling checkbox-select wrapping element------------------*/
    .inside-form-wrapper-1{
        grid-template-columns: repeat(auto-fit, minmax(50vw, 1fr));
        display: grid;
        gap: 1rem;
        max-height: 80vh;
        overflow-y: auto;
    }
    /*-------styling checkbox-select wrapping element------------------*/
    .inside-form-wrapper-1 .select-element-wrapper{
        display: flex;
        min-height: 30vh;
        overflow-y: auto;
        flex-direction: column;
        gap: 1rem;
        border: 1px solid gold;
        padding: 5px;
    }

}

