/* -------------------------------------------------------------------------
 * SweetMeet Local Places - Front-End Directory Filters
 * ---------------------------------------------------------------------- */

.sm-local-places-filter {
    margin: 0 0 24px;
    padding: 18px 20px;
    border: 1px solid rgba(200, 169, 106, 0.45);
    border-radius: 12px;
    background: #fff;
}

.sm-local-places-filter__best-for {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    flex-wrap: wrap;
}

.sm-local-places-filter__label {
    padding-top: 7px;
    font-weight: 600;
    white-space: nowrap;
}

.sm-local-places-filter__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    flex: 1 1 600px;
}

.sm-local-places-filter__chip,
.sm-local-places-filter__reset,
.sm-local-place__tag--filter {
    appearance: none;
    -webkit-appearance: none;
    font: inherit;
    cursor: pointer;
}

.sm-local-places-filter__chip {
    padding: 7px 13px;
    border: 1px solid #C8A96A;
    border-radius: 999px;
    background: #fff;
    color: #222;
    line-height: 1.25;
    transition: background-color .16s ease, color .16s ease, border-color .16s ease;
}

.sm-local-places-filter__chip:hover,
.sm-local-places-filter__chip:focus-visible,
.sm-local-places-filter__chip.is-active {
    background: #C8A96A;
    color: #000;
}

.sm-local-places-filter__chip:focus-visible,
.sm-local-places-filter__reset:focus-visible,
.sm-local-place__tag--filter:focus-visible,
.sm-local-places-filter__field select:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.sm-local-places-filter__toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e6e6e6;
}

.sm-local-places-filter__selects {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
}

.sm-local-places-filter__field {
    display: grid;
    gap: 5px;
    margin: 0;
}

.sm-local-places-filter__field > span {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.sm-local-places-filter__field select {
    min-width: 180px;
    min-height: 40px;
    padding: 8px 34px 8px 11px;
    border: 1px solid #d8d8d8;
    border-radius: 7px;
    background: #fff;
    color: #222;
    font: inherit;
}

.sm-local-places-filter__reset {
    min-height: 40px;
    padding: 8px 12px;
    border: 0;
    background: transparent;
    color: #8a6a2d;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.sm-local-places-filter__reset:hover {
    color: #000;
}

.sm-local-places-filter__count {
    margin-left: auto;
    padding-bottom: 8px;
    color: #666;
    font-size: 13px;
    white-space: nowrap;
}

.sm-local-places-filter__empty {
    margin-top: 16px;
    padding: 14px 16px;
    border-radius: 8px;
    background: #f5f5f5;
    color: #555;
}

.sm-local-place[hidden] {
    display: none !important;
}

/* Existing Best For badges become optional filter controls when filters=1. */
.sm-local-place__tag--filter {
    margin: 0;
    font-family: inherit;
}

.sm-local-place__tag--filter:hover,
.sm-local-place__tag--filter:focus-visible {
    background: #C8A96A;
    color: #000;
}

@media (max-width: 767px) {

    .sm-local-places-filter {
        padding: 15px;
    }

    .sm-local-places-filter__best-for {
        display: block;
    }

    .sm-local-places-filter__label {
        display: block;
        padding: 0 0 9px;
    }

    .sm-local-places-filter__toolbar,
    .sm-local-places-filter__selects {
        align-items: stretch;
    }

    .sm-local-places-filter__selects,
    .sm-local-places-filter__field {
        width: 100%;
    }

    .sm-local-places-filter__field select {
        width: 100%;
        min-width: 0;
    }

    .sm-local-places-filter__reset {
        text-align: left;
        padding-left: 0;
    }

    .sm-local-places-filter__count {
        width: 100%;
        margin-left: 0;
        padding-bottom: 0;
    }
}
