#listing_section {
    padding: 2.5rem 0;
}

.rec_v2_back_bar {
    background-color: var(--light);
    width: 100%;
    border-top: .0625rem solid var(--light_gray);
}

.rec_v2_back_bar .container {
    padding-top: 1rem;
    padding-bottom: 1.75rem;
}

.rec_v2_back_bar .rec_v2_back {
    display: inline-flex;
    align-items: center;
    margin-bottom: 1rem;
    color: var(--menu_gray);
    font-weight: 600;
    text-decoration: none;
}

.rec_v2_back_bar .rec_v2_back svg {
    flex: none;
    width: 1rem;
    height: 1rem;
    fill: currentColor;
}

.rec_v2_back_bar .rec_v2_back:hover {
    color: var(--dark_gray);
    text-decoration: underline;
}

#franchise_header.rec_v2_header {
    border:0;
}

.rec_v2_back_bar h1 {
    margin: 0 0 .5rem;
    color: var(--dark);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    line-height: 1.2;
}

.rec_v2_back_bar p {
    margin: 0;
    max-width: 48rem;
    color: var(--dark_gray);
    line-height: 1.5;
}

#listing_title > * {
    margin-bottom: 1rem;
}

#listing_title select {
    max-width: 16rem;
}

.show_more {
    display: flex;
    width:100%;
    transition: background-color .2s;
    padding: .5rem;
    line-height: 1;
    color: var(--dark);
    cursor: pointer;
    border-radius: .25rem;
}

.show_more span:before {
    content: 'Show';
}

.show_more span:before {
    content: 'Show';
}

#franchises:has(input[type=checkbox]:checked) .show_more span:before {
    content: 'Hide';
}
    
.show_more img {
    height: 1rem;
    width: 1rem;
    margin-right: .5rem;
    transition: background-color .2s;
}

#franchises:has(input[type=checkbox]:checked) .show_more img {
    transform: rotate(90deg);
}

.show_more:hover {
    background-color: var(--light_gray);
}
    
.show_more + input {
    display: none;
}

#franchises .copy {
    padding: 1.5rem 0 1rem;
}

#franchises:has(input[type=checkbox]:not(:checked)) .show_more {
    margin-bottom: 1.5rem;
}
    
.show_more + input[type=checkbox]:not(:checked) ~ .copy{
    display: none;
}

strong.h2 {
    font-weight: 800;
    line-height: 1.2;
}

strong.h2:before {
    color: var(--link_blue);
    content: attr(data-before);
}

strong.h2:after {
    content: attr(data-after);
    color: var(--dark);
    margin-left: .375rem;
}

#franchises h1 {
    margin-bottom: 1rem;
}

#franchise_filter_modal button[type="submit"]:not([data-count="1"]):after, #listing_title h2:not([data-count="1"]):after {
    content: 's';
}

#franchise_filter_modal button[data-count="0"] {
    background-color: var(--light_gray) !important;
    cursor: default !important;
}

.filter_overlay:before {
    right: auto;
    left: .5rem;
}

p.intro_paragraph {
    margin-bottom: 1.5rem
}

#franchises .copy img {
    border-radius: 1.5rem;
}

#sorting, .compare_by {
    color: var(--dark);
    display: flex;
    flex-direction: row;
    align-items: center;
}

#sorting label, .compare_by > span {    
    display: block;
    text-wrap: nowrap;
    margin: auto .5rem auto 0;
    position: relative;
    padding: 0;
    inset: auto;
    text-transform: none;
    font-weight: 600;
    font-size: 1rem;
}
        
#show_filter {
    display: none;
}

.reset {
    display: inline-block;
    margin: 0 0 0 1rem;
    color: var(--link_blue);
    cursor: pointer;
}

#franchise_header {
    position: sticky;
    top: 4rem;
    padding: 1rem 0;
}

#franchise_header .container {
    display: flex;
    flex-direction: column-reverse;
}

#header_franchise_filter {
    display: flex;
    padding-bottom: 1.5rem;
}

.span_wrapper span {
    border: .0625rem solid var(--blue);
    border-radius: .5rem;
    width: 100%;
    padding: .75rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMTIgOWMuNTUyIDAgMSAuNDQ5IDEgMXMtLjQ0OCAxLTEgMS0xLS40NDktMS0xIC40NDgtMSAxLTF6bTAtMmMtMS42NTcgMC0zIDEuMzQzLTMgM3MxLjM0MyAzIDMgMyAzLTEuMzQzIDMtMy0xLjM0My0zLTMtM3ptLTkgNGMtMS42NTcgMC0zIDEuMzQzLTMgM3MxLjM0MyAzIDMgMyAzLTEuMzQzIDMtMy0xLjM0My0zLTMtM3ptMTggMGMtMS42NTcgMC0zIDEuMzQzLTMgM3MxLjM0MyAzIDMgMyAzLTEuMzQzIDMtMy0xLjM0My0zLTMtM3ptLTktNmMuMzQzIDAgLjY3Ny4wMzUgMSAuMTAxdi0zLjEwMWMwLS41NTItLjQ0Ny0xLTEtMXMtMSAuNDQ4LTEgMXYzLjEwMWMuMzIzLS4wNjYuNjU3LS4xMDEgMS0uMTAxem05IDRjLjM0MyAwIC42NzcuMDM1IDEgLjEwMXYtNy4xMDFjMC0uNTUyLS40NDctMS0xLTFzLTEgLjQ0OC0xIDF2Ny4xMDFjLjMyMy0uMDY2LjY1Ny0uMTAxIDEtLjEwMXptMCAxMGMtLjM0MyAwLS42NzctLjAzNS0xLS4xMDF2My4xMDFjMCAuNTUyLjQ0NyAxIDEgMXMxLS40NDggMS0xdi0zLjEwMWMtLjMyMy4wNjYtLjY1Ny4xMDEtMSAuMTAxem0tMTgtMTBjLjM0MyAwIC42NzcuMDM1IDEgLjEwMXYtNy4xMDFjMC0uNTUyLS40NDctMS0xLTFzLTEgLjQ0OC0xIDF2Ny4xMDFjLjMyMy0uMDY2LjY1Ny0uMTAxIDEtLjEwMXptOSA2Yy0uMzQzIDAtLjY3Ny0uMDM1LTEtLjEwMXY3LjEwMWMwIC41NTIuNDQ3IDEgMSAxczEtLjQ0OCAxLTF2LTcuMTAxYy0uMzIzLjA2Ni0uNjU3LjEwMS0xIC4xMDF6bS05IDRjLS4zNDMgMC0uNjc3LS4wMzUtMS0uMTAxdjMuMTAxYzAgLjU1Mi40NDcgMSAxIDFzMS0uNDQ4IDEtMXYtMy4xMDFjLS4zMjMuMDY2LS42NTcuMTAxLTEgLjEwMXoiLz48L3N2Zz4=) 1rem 50% no-repeat #fff;
    background-size: 1.5rem;
    padding-left: .85rem;
    transition: all .1s ease;
    text-transform: none;
    word-wrap: normal;
    color: var(--dark);
    display: inline-flex;
    text-indent: 2.5rem;
}

#mobile_filter {
    padding: 1rem;
    position: sticky;
    top: 4rem;
    background-color: #FFF;
    z-index: 3;
}

#mobile_filter span:before {
    content: 'Revise Filter Results';
}

#franchise_filter_modal {
    transition: all .5s ease;
    position: fixed;
    background: #FFF;
    top: 0;
    bottom: 0;
    right: -30rem;
    width: 30rem;
    z-index: 100;
    max-width: calc(100vw - 2.5rem);
    border-radius: 1rem 0 0 1rem;
}

#franchise_filter_modal.show {
    right: 0 !important;
    box-shadow: 0 0.5rem 2rem -0.5rem rgb(28 75 102 / 60%);
}

#franchise_filter_modal .guts{
    margin: 0;
    padding: 1.5rem .5rem 1.5rem 1.5rem;
    max-height: 100%;
    width: 100%;
}

#franchise_filter_modal .guts .content{
    overflow-y: auto;
    padding-right: 1rem;
}

#franchise_filter_modal .guts .content{
    -ms-overflow-style: none;  /* Internet Explorer 10+ */
    scrollbar-width: none;  /* Firefox */
}

#franchise_filter_modal .guts .content::-webkit-scrollbar { 
    display: none;  /* Safari and Chrome */
}

#button_grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* SLIDERS */
.slider-container {
    width: 100%;
    position: relative;
    margin: 1rem 0 1.5rem;
}

  .slider-track {
    position: absolute;
    inset: 50% 0 auto;
    transform: translateY(-50%);
    z-index: 1;
    background: var(--light_gray);
    height: .5rem;
    border-radius: 1rem;
    border: none;
    position: relative;
  }

  .slider-range {
    position: absolute;
    border-radius: .25rem;
    background: var(--light_blue);
    height: .625rem;
    top: calc(50% - .3125rem);
    transform: translateY(-50%);
    z-index: 2;
  }

  input[type=range] {
    position: absolute;
    width: 100%;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
    background: none;
    z-index: 3;
  }

  input[type=range]::-webkit-slider-thumb {
    pointer-events: auto;
    -webkit-appearance: none;
    background: var(--link_blue);
    cursor: pointer;
    font-weight: normal;
    outline: none;
    width: 1.5rem;
    height: 1.5rem;
    border-radius: 50%;
    border: none;
    box-sizing: border-box;
    box-shadow: none;
    margin-top:-1.25rem;
  }
  input[type=range].hide_slide{
    display: none;
  }

  input[type=range]::-moz-range-thumb {
    pointer-events: auto;
    height: 16px;
    width: 16px;
    border-radius: 50%;
    background: #2196F3;
    cursor: pointer;
  }

  .value-display {
    margin-top: 10px;
    font-family: sans-serif;
  }

  .value-inputs {
    display: flex;
    gap: 10px;
    margin-top: 5px;
  }

  .value-inputs input[type="number"] {
    width: 100px;
  }

@media (max-width: 768px){
    h2:has(label.show_filter ~ #show_filter:checked) ~ #franchise_filter{
        display: block;
        padding: 1.5rem 0 2rem;
        border-bottom:.0625rem solid var(--light_gray);
        margin-bottom: 2rem;
    }

    h1.h2, strong.h2 {
        max-width: 60%;
    }

    #franchise_header {
        top: 8.5rem;
        background-color: #FFF;
        z-index: 3;
    }

    .slider-container {
        width: calc(100% - 1rem);
        margin-left: .5rem;
        margin-right: .5rem;
    }

    .select_wrapper + .range_wrapper {
        padding-top: 1rem;
    }

    button[type="submit"]{
        padding: .75em 1.5em;
    }

    .range_wrapper label input {
        margin-top: 0;
        padding-top: 0.25rem;
    }
}

@media (min-width: 769px){

    #franchise_header {
        border-top: .0625rem solid var(--light_gray);
        border-bottom: .0625rem solid var(--light);
        padding-top: 2rem;
        background-color: #FFF;
        z-index: 3;
    }

    #header_franchise_filter .select_wrapper{
        min-width: 15rem;
        margin-right: 1rem;
        margin-bottom: 0;
    }

    .span_wrapper {
        min-width: 13.5rem;
        margin-right: 1rem;
        margin-bottom: 0;
    }

    #header_franchise_filter .select_wrapper:has(#sort_by) {
        min-width: 17rem;
    }

    .filter_overlay:before {
        right: 30.5rem;
        left: auto;
    }

    .range_wrapper label {
        display: flex;
        justify-content: space-between;
        align-items: center;
        line-height: 1;
        margin-bottom: .5rem;
    }
    
    #listing_title {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
}

@media (min-width: 481px) and (max-width: 768px) {
    .listings {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 1024px){
    #header_franchise_filter {
        display: none;
    }
}

@media (min-width: 1025px) {
    #mobile_filter {
        display: none;
    }
    #listing_title > * {
        margin-bottom: 0;
    }

    .input_wrapper, .select_wrapper, .textarea_wrapper {
        margin-bottom: 1.5rem;
    }
}