/* ==========================================================================
   Location Grid Section
   ========================================================================== */

.location-grid__wrapper {
    align-items: start;
    display: grid;
    gap: 0 var(--gutter);
    grid-template-columns: 1fr;
}

.location-grid__wrapper .filterbox__results {
    grid-column: 1 / -1;
}

/* Filterbox form
   ========================================================================== */

.location-grid__wrapper .filterbox__form {
    display: flex;
    flex-wrap: wrap;
    margin-bottom: 30px;
    width: 100%;
    z-index: 2;
}

.location-grid__wrapper .filterbox__form.modal {
    background: #193153;
    color: #fff;
    flex-flow: column nowrap;
    inset: 0;
    margin: 0;
    overflow: auto;
    padding: 15px 15px 120px;
    position: fixed;
    z-index: 100;
    -webkit-overflow-scrolling: touch;
}

.location-grid__wrapper .filterbox__title {
    border: 0;
    clip-path: circle(0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

.location-grid__wrapper .filterbox__form.modal .filterbox__title {
    border: initial;
    clip-path: none;
    color: #fff;
    display: block;
    height: auto;
    margin: 0 0 30px;
    overflow: initial;
    padding: 0;
    position: static;
    width: calc(100% - 30px);
}

/* Search bar
   ========================================================================== */

.location-grid__wrapper .filterbox__searchbar {
    border: 0;
    grid-column: 1 / -1;
    margin: 0;
    position: relative;
}

.location-grid__wrapper .filterbox__form.modal .filterbox__searchbar {
    margin-bottom: 30px;
}

.location-grid__wrapper .filterbox__searchbar-wrapper {
    background: #fff;
    border: 1px solid #8e8e8e;
    display: flex;
    padding: 0;
    position: relative;
}

.location-grid__wrapper .filterbox__searchbar-input {
    border: 0;
    font-size: inherit;
    line-height: inherit;
    padding: 3px 9px 3px 3.5ch;
    width: 100%;
}

.location-grid__wrapper .filterbox__search-btn {
    appearance: none;
    background: transparent;
    color: #424242;
    display: grid;
    font-size: inherit;
    height: 100%;
    left: 0;
    line-height: inherit;
    place-items: center;
    position: absolute;
    top: 0;
    width: 3.5ch;
    border: 0;
    cursor: pointer;
}

.location-grid__wrapper .filterbox__search-label {
    border: 0;
    clip-path: circle(0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/* Filter box (desktop)
   ========================================================================== */

.location-grid__wrapper .filterbox__box {
    display: none;
}

.location-grid__wrapper .filterbox__form.modal .filterbox__box {
    display: flex;
    flex-direction: column;
}

/* Category filter (pills)
   ========================================================================== */

.location-grid__wrapper .filterbox__filter-group {
    border: 0;
    display: none;
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
}

.location-grid__wrapper .filterbox__form.modal .filterbox__filter-group {
    display: block;
    margin-bottom: 15px;
}

.location-grid__wrapper .filterbox__filter-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.location-grid__wrapper .filterbox__filter-item {
    cursor: pointer;
    position: relative;
}

.location-grid__wrapper .filterbox__filter-checkbox {
    outline-offset: 1px;
}

.location-grid__wrapper .filterbox__filter-text {
    align-items: center;
    background: var(--color-red, #ec2058);
    border: 1px solid var(--color-red, #ec2058);
    border-radius: 60px;
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    font-size: 16px;
    font-weight: 400;
    gap: 6px;
    line-height: 22px;
    padding: 6px 16px;
    transition: var(--reduced-motion, 0.2s) ease;
}

.location-grid__wrapper .filterbox__filter-text:hover {
    background: var(--color-red-dark, #d72153);
    border-color: var(--color-red-dark, #d72153);
}

.location-grid__wrapper .filterbox__filter-checkbox:checked + .filterbox__filter-text {
    background: var(--color-red-dark, #d72153);
    border-color: var(--color-red-dark, #d72153);
}

.location-grid__wrapper .filterbox__filter-checkbox:checked + .filterbox__filter-text::after {
    content: "\00d7";
    font-size: 18px;
    line-height: 1;
}

/* Submit / reset (mobile modal)
   ========================================================================== */

.location-grid__wrapper .filterbox__submit-wrapper {
    align-items: center;
    background: linear-gradient(180deg, #19315300, #193153 15px);
    bottom: 0;
    display: none;
    gap: 15px;
    justify-content: space-between;
    left: 0;
    padding: 30px 15px 15px;
    position: fixed;
    width: 100%;
    z-index: 1;
}

.location-grid__wrapper .filterbox__form.modal .filterbox__submit-wrapper {
    display: flex;
}

.location-grid__wrapper .filterbox__reset {
    color: currentColor;
    font-weight: 700;
    text-decoration: underline;
    background: transparent;
    border: 0;
    cursor: pointer;
}

/* Mobile overlay trigger
   ========================================================================== */

.location-grid__wrapper .filterbox__mobile-overlay-trigger-link {
    align-self: center;
    display: inline-flex;
    margin-right: 15px;
    padding: 9px 24px;
}

.location-grid__wrapper .filterbox__form.modal .filterbox__mobile-overlay-trigger-link {
    display: none;
}

/* Sort
   ========================================================================== */

.location-grid__wrapper .filterbox__sort-wrapper {
    background: #fff;
    border: 1px solid #8e8e8e;
    display: flex;
    max-width: 180px;
    position: relative;
    z-index: 1;
}

.location-grid__wrapper .filterbox__sort-select {
    appearance: none;
    border: 0;
    padding: 8px 36px 8px 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    font-size: 18px;
    cursor: pointer;
}

.location-grid__wrapper .filterbox__sort-select:focus {
    outline-offset: 2px;
}

.location-grid__wrapper .filterbox__sort-select-icon {
    display: grid;
    font-size: 16px;
    inset: 0 0 0 auto;
    padding: 0 8px;
    place-items: center;
    pointer-events: none;
    position: absolute;
}

.location-grid__wrapper .filterbox__sort-label {
    color: #424242;
    font-weight: 700;
    font-size: 18px;
    width: 1px;
    border: 0;
    clip-path: circle(0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
}

.location-grid__wrapper .filterbox__sort-wrapper--mimic {
    display: none;
}

.location-grid__wrapper .filterbox__sort-label--clone {
    color: #424242;
    font-weight: 700;
    font-size: 18px;
    margin: 0 8px 0 auto;
}

.location-grid__wrapper .filterbox__sort-wrapper--clone {
    display: inline-flex;
}

/* Results
   ========================================================================== */

.location-grid__wrapper .filterbox__results-header {
    align-items: center;
    display: flex;
    margin-bottom: 30px;
}

.location-grid__wrapper .result-count {
    color: #193153;
    font-size: var(--h4-fs);
    font-weight: 700;
    letter-spacing: 0;
    line-height: var(--h4-lh);
    margin: 0 auto 0 0;
    padding: 0;
}

/* Tile grid
   ========================================================================== */

.location-grid__wrapper .list__overview {
    display: grid;
    gap: var(--grid-gutter);
    grid-template-columns: repeat(var(--tiles-per-row), minmax(0, 1fr));
    margin-bottom: 30px;
    padding: 0;
    list-style: none;
}

.location-grid__wrapper .tiles__wrapper {
    display: flex;
    flex-direction: column;
    gap: 15px;
    overflow: clip;
    position: relative;
    width: 100%;
}

.location-grid__wrapper .tiles__img {
    aspect-ratio: 16 / 9;
    min-height: 150px;
    order: -1;
}

.location-grid__wrapper .tiles__tile {
    background: #193153;
}

.location-grid__wrapper .tiles--txt {
    margin-block: 0;
    margin-inline: 20px;
}

.location-grid__wrapper .link-overlay:first-child + .tiles--txt,
.location-grid__wrapper .tiles--txt:first-child {
    margin-top: 20px;
}

.location-grid__wrapper .tiles--txt:last-child {
    margin-bottom: 20px;
}

.location-grid__wrapper .tiles__title {
    align-items: center;
    color: #fff;
    display: flex;
    font-size: var(--h4-fs);
    font-weight: 700;
    letter-spacing: 0;
    line-height: var(--h4-lh);
    max-height: calc(var(--h4-lh) * 3);
    min-height: calc(var(--h4-lh) * 1);
    overflow: hidden;
    position: relative;
    text-align: left;
    margin-top: 15px;
}

.location-grid__wrapper .tiles__title-txt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    max-height: 100%;
}

.location-grid__wrapper .location-description__wrapper {
    display: flex;
    flex-direction: row;
    gap: 8px;
    color: #fff;
    font-size: 18px;
    word-break: break-all;
}

.location-grid__wrapper .location-description__wrapper:last-child {
    margin-bottom: 30px;
}

.location-grid__wrapper .img__wrapper {
    background: #eee;
    display: block;
    position: relative;
}

.location-grid__wrapper .img__main {
    height: 100%;
    inset: 0;
    object-fit: cover;
    object-position: center center;
    position: absolute;
    width: 100%;
}

.location-grid__wrapper .link-overlay {
    inset: 0;
    outline-offset: -2px;
    position: absolute;
    width: 100%;
    z-index: 1;
}

/* No results
   ========================================================================== */

.location-grid__no-results {
    padding: 30px 0;
    color: #424242;
}

/* Pagination
   ========================================================================== */

.location-grid__wrapper .pager {
    display: flex;
    gap: 4px;
    justify-content: center;
    list-style: none;
    margin: 30px 0;
    padding: 0;
}

.location-grid__wrapper .pager__item {
    display: inline-block;
    list-style: none;
    margin: 0;
    padding: 0;
}

.location-grid__wrapper .pager__text {
    align-items: center;
    border-radius: 50%;
    color: #193153;
    display: flex;
    height: 30px;
    justify-content: center;
    line-height: 30px;
    text-decoration: none;
    transition: var(--reduced-motion, 0.2s);
    width: 30px;
}

.location-grid__wrapper span.pager__text {
    background-color: transparent;
    color: #424242;
}

.location-grid__wrapper .pager__item--current > .pager__text,
.location-grid__wrapper a.pager__text:hover {
    background-color: #193153;
    color: #fff;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* >= 500px */
@media screen and (width >= 500px) {
    .location-grid__wrapper .odp-list-container {
        --tiles-per-row: 2;
    }

    .location-grid__wrapper .filterbox__sort-label {
        align-self: center;
        border: initial;
        clip-path: none;
        height: auto;
        margin: 0 8px 0 auto;
        overflow: initial;
        padding: initial;
        position: static;
        width: auto;
    }

    .location-grid__wrapper .filterbox__sort-wrapper {
        max-width: inherit;
    }

    .location-grid__wrapper .tiles__img {
        order: -1;
    }
}

/* >= 768px */
@media screen and (width >= 768px) {
    .location-grid__wrapper .odp-list-container {
        --tiles-per-row: 3;
    }

    .location-grid__wrapper .filterbox__box--top {
        background: #193153;
        display: grid;
        gap: 15px 30px;
        grid-template: auto / repeat(2, minmax(30%, auto));
        margin-bottom: 30px;
        padding: 30px;
        width: 100%;
    }

    .location-grid__wrapper .filterbox__filter-group {
        display: block;
        grid-column: 1 / -1;
    }

    .location-grid__wrapper .filterbox__mobile-overlay-trigger-link {
        display: none;
    }

    .location-grid__wrapper .filterbox__submit {
        display: none;
    }

    .location-grid__wrapper .filterbox__box--top .filterbox__search-label {
        border: 0;
        clip-path: circle(0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }

    .location-grid__wrapper .filterbox__box--top .filterbox__searchbar-wrapper {
        font-size: var(--h4-fs);
        line-height: var(--h4-lh);
    }

    .location-grid__wrapper .filterbox__sort-label,
    .location-grid__wrapper .filterbox__sort-label--clone,
    .location-grid__wrapper .filterbox__sort-select {
        font-size: 21px;
    }

    .location-grid__wrapper .tiles__tile {
        border-bottom-right-radius: 20px;
    }

    .location-grid__wrapper .tiles__title {
        margin-top: 36px;
    }

    .location-grid__wrapper .tiles--txt:not(.description__head) {
        font-size: 21px;
    }
}

/* <= 499px: horizontal card layout */
@media screen and (width <= 499px) {
    .location-grid__wrapper .tiles__tile {
        background: #193153;
        border-bottom: 1px solid #424242;
        gap: 8px;
        min-height: 100%;
    }

    .location-grid__wrapper .tiles--txt {
        margin-left: 115px;
    }

    .location-grid__wrapper .tiles__img {
        aspect-ratio: auto;
        height: 100%;
        inset: 0 auto auto 0;
        min-height: 0;
        position: absolute;
        width: 100px;
    }

    .location-grid__wrapper .tiles__title {
        max-height: none;
        min-height: auto;
    }

    .location-grid__wrapper .tiles__title-txt {
        display: inline-block;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .location-grid__wrapper .item-address__zipcode {
        display: none;
    }
}

/* >= 1080px */
@media screen and (width >= 1080px) {
    .location-grid__wrapper .tiles--txt {
        margin-inline: 36px;
    }

    .location-grid__wrapper .link-overlay:first-child + .tiles--txt,
    .location-grid__wrapper .tiles--txt:first-child {
        margin-top: 36px;
    }

    .location-grid__wrapper .tiles--txt:last-child {
        margin-bottom: 36px;
    }
}
