.vendr-listing {
    container-type: inline-size;
    color: var(--vendr-text, inherit);
}
@font-face { font-family: Inter; src: url('./Inter-Regular.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: Inter; src: url('./Inter-Bold.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: Poppins; src: url('./Poppins-Bold.ttf') format('truetype'); font-weight: 700; font-display: swap; }

.vendr-listing__toolbar,
.vendr-listing__filters {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--wp--style--block-gap, 1rem);
}

.vendr-listing__toolbar {
    justify-content: space-between;
    margin-bottom: var(--wp--style--block-gap, 2rem);
}
.vendr-listing__mobile-filter,
.vendr-listing__filter-backdrop,
.vendr-listing__filter-apply { display: none; }

.vendr-listing__filter { position: relative; }
:where(.vendr-listing__filter select, .vendr-listing__filter-trigger) {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 2.75rem;
    padding: .5rem 1rem;
    font: inherit;
    color: var(--vendr-text, inherit);
    background: var(--vendr-surface, transparent);
    border-radius: var(--vendr-control-radius, 0);
    cursor: pointer;
}
.vendr-listing__chevron { display: block; width: .55rem; height: .55rem; margin-top: -.3rem; border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
.vendr-listing__filter-menu {
    position: absolute;
    z-index: 20;
    top: calc(100% + .5rem);
    left: 0;
    width: max(100%, 15rem);
    max-height: 16rem;
    overflow-y: auto;
    border: 1px solid var(--vendr-control-border, var(--vendr-border, color-mix(in srgb, currentColor 25%, transparent)));
    border-radius: var(--vendr-control-radius, var(--vendr-radius, 0));
    background: var(--vendr-control-bg, var(--vendr-surface, Canvas));
    color: var(--vendr-control-text, var(--vendr-text, inherit));
}
.vendr-listing__filter-option {
    display: flex;
    align-items: center;
    gap: .75rem;
    width: 100%;
    min-height: 2.75rem;
    padding: .5em 1em;
    border: 0;
    border-bottom: 1px solid var(--vendr-border, color-mix(in srgb, currentColor 15%, transparent));
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.vendr-listing__filter-option:last-child { border-bottom: 0; }
.vendr-listing__filter-option:hover,
.vendr-listing__filter-option:focus-visible { background: color-mix(in srgb, currentColor 7%, transparent); }
.vendr-listing__option-icon { display: grid; flex: none; place-items: center; width: 1.5rem; height: 1.5rem; border: 1px solid currentColor; border-radius: 50%; font-size: 1rem; line-height: 1; }
.vendr-listing__filter-option[aria-selected="true"] .vendr-listing__option-icon { background: currentColor; color: var(--vendr-control-bg, var(--vendr-surface, Canvas)); }

.vendr-listing__results { min-width: 0; }

.vendr-listing__no-results { margin-top: 1.5rem; }
.vendr-listing__visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.vendr-listing__grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: var(--vendr-card-gap, var(--wp--style--block-gap, 1.5rem));
}

:where(.vendr-listing__card) {
    position: relative;
    min-width: 0;
    overflow: hidden;
    background: var(--vendr-card-bg, var(--vendr-card-surface, transparent));
    border-width: var(--vendr-card-border-width, 0);
    border-style: var(--vendr-card-border-style, solid);
    border-color: var(--vendr-card-border, var(--vendr-border, currentColor));
    border-radius: var(--vendr-card-radius, var(--vendr-radius, 0));
}

.vendr-listing__link::after {
    content: '';
    position: absolute;
    inset: 0;
}

.vendr-listing__link:focus-visible,
.vendr-listing__page:focus-visible,
.vendr-listing__filter-trigger:focus-visible,
.vendr-listing__filter-option:focus-visible,
.vendr-listing__filter select:focus-visible {
    outline: 3px solid currentColor;
    outline-offset: 3px;
}

:where(.vendr-listing__image-frame) {
    display: block;
    overflow: hidden;
    aspect-ratio: 4 / 3;
}
.vendr-listing__image {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.vendr-listing__content { padding: var(--vendr-content-padding, 0); }
.vendr-listing__intro { margin-block-start: var(--wp--style--block-gap, 1rem); }
.vendr-listing__address { overflow-wrap: anywhere; }
.vendr-listing__stale { padding: .8rem 1rem; border-left: 4px solid #ff0000; background: #fff4f4; }
.vendr-listing__view-switch { display: inline-flex; gap: .25rem; padding: .2rem; border: 1px solid #dedede; border-radius: .6rem; }
.vendr-listing__view-switch button { min-height: 2.5rem; padding: .35rem .9rem; border: 0; border-radius: .45rem; background: transparent; color: #222; font: inherit; cursor: pointer; }
.vendr-listing__view-switch button[aria-pressed="true"] { background: #ff0000; color: #fff; }
.vendr-listing__map-shell { position: relative; min-height: 540px; border: 1px solid #ddd; border-radius: 12px; overflow: hidden; background: #f6f6f6; }
.vendr-listing__map-shell:fullscreen { border: 0; border-radius: 0; }
.vendr-listing__map { width: 100%; height: min(70vh, 650px); min-height: 540px; }
.vendr-listing__map-shell:fullscreen .vendr-listing__map { height: 100vh; }
.vendr-listing__map-fullscreen { position: absolute; top: 1rem; right: 1rem; z-index: 2; padding: .6rem .9rem; border: 1px solid #ccc; border-radius: .5rem; background: #fff; cursor: pointer; }
.vendr-listing__map-status { position: absolute; bottom: 1rem; left: 1rem; max-width: min(28rem, calc(100% - 2rem)); padding: .6rem 1rem; background: #fff; border-radius: .4rem; }
.vendr-listing__map-status:empty { display: none; }
.vendr-listing__map-card { position: absolute; z-index: 3; left: 1rem; bottom: 1rem; width: min(360px, calc(100% - 2rem)); max-height: calc(100% - 2rem); overflow-y: auto; box-shadow: 0 12px 40px rgba(0,0,0,.2); }
.vendr-listing__map-card .vendr-listing__card { margin: 0; }
.vendr-listing__map-card .vendr-listing__image-frame { aspect-ratio: 16 / 9; }
.vendr-listing__map-close { position: absolute; z-index: 4; top: .5rem; right: .5rem; width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: #fff; font-size: 1.5rem; cursor: pointer; }
.vendr-listing__view-switch button:focus-visible, .vendr-listing__map-close:focus-visible, .vendr-listing__map-fullscreen:focus-visible { outline: 3px solid #ff0000; outline-offset: 2px; }

.vendr-listing__details { overflow-wrap: anywhere; }
.vendr-listing__details > span { display: block; }
.vendr-listing__tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: var(--wp--style--block-gap, 1rem); pointer-events: none; }
:where(.vendr-listing__tags span) {
    max-width: 100%;
    overflow-wrap: anywhere;
    background: var(--vendr-tag-bg, var(--vendr-accent, transparent));
    color: var(--vendr-tag-text, var(--vendr-button-text, inherit));
    border-radius: var(--vendr-radius, 0);
    padding: .25em .5em;
}

.vendr-listing__pagination { margin-top: calc(2 * var(--wp--style--block-gap, 2rem)); }
.vendr-listing__pagination ol { display: flex; justify-content: center; gap: .75rem; margin: 0; padding: 0; list-style: none !important; }
.vendr-listing__pagination li { display: block; margin: 0; padding: 0; list-style: none !important; }
.vendr-listing__pagination li::marker { content: none; }
:where(.vendr-listing__page, .vendr-listing__page-spacer) { display: grid; place-items: center; min-width: 3rem; min-height: 3rem; padding: .5rem; font: inherit; }
:where(.vendr-listing__page[aria-current="page"]) { font-weight: inherit; color: var(--vendr-accent, inherit); }

.vendr-listing [hidden] {
    display: none !important;
}

@container (min-width: 680px) {
    .vendr-listing__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@container (min-width: 1080px) {
    .vendr-listing__grid { grid-template-columns: repeat(var(--vendr-columns, 3), minmax(0, 1fr)); }
}

@media (max-width: 600px) {
    .vendr-listing__toolbar { display: flex; }
    .vendr-listing__view-switch { margin-left: auto; }
    .vendr-listing__map, .vendr-listing__map-shell { min-height: 70vh; }
    :where(.vendr-listing__mobile-filter) {
        display: flex;
        align-items: center;
        justify-content: center;
        gap: .5rem;
        width: 100%;
        min-height: 2.75rem;
        font: inherit;
        cursor: pointer;
    }
    .vendr-listing__filter-backdrop:not([hidden]) {
        display: block;
        position: fixed;
        z-index: 9998;
        inset: 0;
        width: 100%;
        border: 0;
        background: rgba(0, 0, 0, .36);
        cursor: pointer;
    }
    .vendr-listing__filters { display: none; }
    .vendr-listing--filters-open .vendr-listing__filters {
        display: flex;
        position: fixed;
        z-index: 9999;
        right: 0;
        bottom: 0;
        left: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
        padding: 20px 20px max(48px, env(safe-area-inset-bottom));
        max-height: 100dvh;
        overflow-y: auto;
        border-radius: var(--vendr-control-radius, var(--vendr-radius, 0)) var(--vendr-control-radius, var(--vendr-radius, 0)) 0 0;
        background: var(--vendr-control-bg, var(--vendr-surface, Canvas));
        color: var(--vendr-control-text, var(--vendr-text, inherit));
        text-align: left;
    }
    .vendr-listing__filter-heading { margin-bottom: .5rem; font-weight: 600; }
    .vendr-listing__filter select,
    .vendr-listing__filter-trigger { width: 100%; }
    .vendr-listing__filter-menu { position: relative; top: .5rem; width: 100%; }
    :where(.vendr-listing__filter-apply) {
        display: block;
        width: 100%;
        min-height: 44px;
        margin-top: .5rem;
        font: inherit;
        cursor: pointer;
    }
}
