:root {
    --yf-discovery-ink: #111827;
    --yf-discovery-muted: #667085;
    --yf-discovery-line: rgba(17, 24, 39, 0.09);
    --yf-discovery-orange: #f15a27;
    --yf-discovery-orange-dark: #c93e0c;
}

.yf-autocomplete-menu.ui-autocomplete {
    z-index: 10050 !important;
    max-width: calc(100vw - 24px);
    max-height: 300px;
    overflow-y: auto;
    padding: 5px;
    border: 1px solid var(--yf-discovery-line);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(17, 24, 39, 0.16);
}

.yf-autocomplete-menu .ui-menu-item {
    margin: 0;
    min-height: 0;
}

.yf-autocomplete-menu .ui-menu-item-wrapper {
    padding: 0;
    border: 0 !important;
    border-radius: 9px;
    background: transparent !important;
    color: inherit !important;
}

/* jQuery UI's .ui-menu .ui-menu-item-wrapper sets display:block, so the row
   selector has to carry the menu class to stay a flex row. */
.yf-autocomplete-menu .yf-autocomplete-item {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 44px;
    padding: 8px 12px;
    border-radius: 9px;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

/* The wrapper rule above forces a transparent background to defeat jQuery
   UI's own theming, so the selected row has to state its own !important. */
.yf-autocomplete-menu .ui-state-active .yf-autocomplete-item,
.yf-autocomplete-menu .yf-autocomplete-item.ui-state-active,
.yf-autocomplete-menu .yf-autocomplete-item:hover {
    background: #ffede3 !important;
    box-shadow: inset 3px 0 0 var(--yf-discovery-orange);
}

.yf-autocomplete-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: rgba(241, 90, 39, 0.1);
    color: var(--yf-discovery-orange-dark);
    font-size: 0.8rem;
}

.yf-autocomplete-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 1px;
}

.yf-autocomplete-label {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--yf-discovery-ink);
    font-size: 0.95rem;
    /* Plain weight keeps the highlighted match, not the whole row, prominent. */
    font-weight: 500;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yf-autocomplete-label mark {
    padding: 0;
    background: transparent;
    color: var(--yf-discovery-orange-dark);
    font-weight: 600;
}

.yf-autocomplete-meta {
    display: block;
    min-width: 0;
    overflow: hidden;
    color: var(--yf-discovery-muted);
    font-size: 0.8rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yf-autocomplete-meta mark {
    padding: 0;
    background: transparent;
    color: inherit;
    font-weight: 600;
}

.discovery-listing-kicker {
    display: inline-flex;
    margin-bottom: 5px;
    color: var(--yf-discovery-orange-dark);
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.discovery-inline-search {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) auto;
    align-items: end;
    gap: 14px;
    margin-bottom: 16px;
    padding: 16px 18px;
    border: 1px solid var(--yf-discovery-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(17, 24, 39, 0.05);
}

.discovery-inline-search-field,
.discovery-inline-search-actions {
    min-width: 0;
}

.discovery-inline-search-label-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin: 0 2px 6px;
}

.discovery-inline-search-label-row label {
    margin: 0;
    color: #374151;
    font-size: 0.8rem;
    font-weight: 600;
}

.discovery-inline-search-label-row span {
    overflow: hidden;
    color: var(--yf-discovery-muted);
    font-size: 0.7rem;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.discovery-inline-search-input {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    min-height: 50px;
    gap: 10px;
    padding: 0 14px;
    border: 1px solid var(--yf-discovery-line);
    border-radius: 9px;
    background: #f8fafb;
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.discovery-inline-search-input:focus-within {
    border-color: rgba(241, 90, 39, 0.45);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(241, 90, 39, 0.08);
}

.discovery-inline-search-input i {
    color: var(--yf-discovery-orange);
}

.discovery-inline-search-input input {
    width: 100%;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--yf-discovery-ink);
    outline: 0;
}

.discovery-inline-search-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.discovery-inline-search-submit,
.discovery-inline-search-reset {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    gap: 7px;
    padding: 0 15px;
    border-radius: 9px;
    font-weight: 600;
}

.discovery-inline-search-reset {
    border: 1px solid var(--yf-discovery-line);
    background: #fff;
    color: #4b5563;
}

.discovery-inline-search-submit {
    background: var(--yf-discovery-orange);
    color: #fff;
}

.discovery-inline-search-submit:hover,
.discovery-inline-search-submit:focus {
    background: var(--yf-discovery-orange-dark);
    color: #fff;
}

.discovery-inline-search-actions .discovery-listing-filter-button {
    min-height: 50px;
    padding: 0 15px;
    border-radius: 9px;
}

.discovery-listing-page {
    background: #eef1f2 !important;
}

#site-wrapper .discovery-listing-page > .discovery-listing-container {
    max-width: var(--yf-page-max-width, 1560px);
    padding-top: 10px;
    padding-bottom: 52px;
}

.no-map-grid #site-wrapper .discovery-listing-page > .discovery-listing-container {
    padding-top: 92px;
}

.discovery-listing-container > .breadcrumb {
    margin-bottom: 8px;
    padding-top: 8px !important;
    padding-bottom: 8px !important;
}

.discovery-listing-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 18px;
    padding: 20px 24px;
    border: 1px solid rgba(241, 90, 39, 0.11);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 6px 18px rgba(17, 24, 39, 0.05);
}

.discovery-listing-hero h1 {
    margin: 0 0 5px;
    color: var(--yf-discovery-ink);
    font-size: clamp(1.55rem, 3vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.035em;
    line-height: 1.08;
}

.discovery-listing-hero p {
    margin: 0;
    color: var(--yf-discovery-muted);
    font-size: 0.94rem;
}

.discovery-listing-hero > div {
    flex: 1 1 420px;
    min-width: 0;
}

.discovery-listing-hero .discovery-programme-notice {
    flex: 0 1 400px;
    align-items: start;
    width: auto;
    max-width: 440px;
    margin: 0;
    padding: 14px 16px;
    border-radius: 16px;
    box-shadow: none;
}

.discovery-listing-hero .discovery-programme-notice p {
    color: #344054;
}

/* Align the icon with the label rather than floating mid-card. */
.discovery-listing-hero .discovery-programme-notice-icon {
    margin-top: 1px;
}

.discovery-listing-filter-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    gap: 8px;
    padding: 0 18px;
    border: 1px solid rgba(17, 24, 39, 0.13);
    border-radius: 999px;
    background: #fff;
    color: #374151;
    font-weight: 600;
}

.discovery-listing-filter-button:hover,
.discovery-listing-filter-button:focus,
.discovery-listing-filter-button[aria-expanded="true"] {
    border-color: rgba(241, 90, 39, 0.38);
    background: #fff8f4;
    color: var(--yf-discovery-orange-dark);
}

.discovery-inline-filter {
    margin-bottom: 16px;
}

.discovery-inline-filter-body {
    padding: 18px 20px;
    border: 1px solid var(--yf-discovery-line);
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 5px 16px rgba(17, 24, 39, 0.05);
}

.discovery-inline-filter-body .card-header {
    padding: 0 0 14px !important;
}

.discovery-inline-filter-body .card-title {
    color: var(--yf-discovery-ink);
    font-size: 1rem;
    font-weight: 600;
}

.discovery-inline-filter-body #filter-tags-card-body {
    padding: 0;
}

.discovery-inline-filter-body #product-service-filter-tags-group {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
    margin-bottom: 0;
}

.discovery-inline-filter-body .custom-parent-tag-checkbox {
    padding: 11px 12px 11px 38px;
    border: 1px solid var(--yf-discovery-line);
    border-radius: 8px;
    background: #fafbfc;
    font-weight: 600;
}

.discovery-inline-filter-body .panel-collapse {
    grid-column: 1 / -1;
}

.discovery-inline-filter-body #product-service-filter-tags-group .panel-body {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    margin: 0;
    padding: 2px 10px 4px;
}

/* Shared category controls for Home and all discovery listing pages. */
.discovery-inline-filter-body .custom-control,
.home-filter-panel .custom-control {
    position: relative;
    min-height: 0;
    padding-left: 0;
}

.discovery-inline-filter-body .custom-control-input,
.home-filter-panel .custom-control-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.discovery-inline-filter-body .custom-control-label,
.home-filter-panel .custom-control-label {
    position: relative;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    gap: 10px;
    margin: 0;
    padding: 7px 11px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #4b5563;
    cursor: pointer;
    font-size: 0.86rem;
    line-height: 1.35;
    transition: border-color 0.16s ease, background-color 0.16s ease, color 0.16s ease;
}

.discovery-inline-filter-body .custom-control-label::before,
.discovery-inline-filter-body .custom-control-label::after,
.home-filter-panel .custom-control-label::before,
.home-filter-panel .custom-control-label::after {
    display: none !important;
    content: none !important;
}

.discovery-filter-checkmark {
    position: relative;
    display: inline-flex;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    border: 1.5px solid #b6bec8;
    border-radius: 6px;
    background: #fff;
    box-shadow: none;
    transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

.discovery-filter-checkmark::after {
    position: absolute;
    top: 50%;
    left: 4px;
    width: 10px;
    height: 6px;
    border-bottom: 2px solid #fff;
    border-left: 2px solid #fff;
    content: '';
    opacity: 0;
    transform: translateY(-65%) rotate(-45deg);
}

.discovery-inline-filter-body .custom-control-input:checked + .custom-control-label,
.home-filter-panel .custom-control-input:checked + .custom-control-label {
    border-color: rgba(241, 90, 39, 0.18);
    background: #fff6f1;
    color: var(--yf-discovery-orange-dark);
}

.discovery-inline-filter-body .custom-control-input:checked + .custom-control-label .discovery-filter-checkmark,
.home-filter-panel .custom-control-input:checked + .custom-control-label .discovery-filter-checkmark {
    border-color: var(--yf-discovery-orange);
    background: var(--yf-discovery-orange);
}

.discovery-inline-filter-body .custom-control-input:checked + .custom-control-label .discovery-filter-checkmark::after,
.home-filter-panel .custom-control-input:checked + .custom-control-label .discovery-filter-checkmark::after {
    opacity: 1;
}

.discovery-inline-filter-body .custom-control-input:indeterminate + .custom-control-label .discovery-filter-checkmark,
.home-filter-panel .custom-control-input:indeterminate + .custom-control-label .discovery-filter-checkmark {
    border-color: var(--yf-discovery-orange);
    background: var(--yf-discovery-orange);
}

.discovery-inline-filter-body .custom-control-input:indeterminate + .custom-control-label .discovery-filter-checkmark::after,
.home-filter-panel .custom-control-input:indeterminate + .custom-control-label .discovery-filter-checkmark::after {
    top: 50%;
    left: 4px;
    width: 11px;
    height: 0;
    border: 0;
    border-top: 2px solid #fff;
    opacity: 1;
    transform: translateY(-50%);
}

.discovery-inline-filter-body .custom-control-input:focus + .custom-control-label .discovery-filter-checkmark,
.home-filter-panel .custom-control-input:focus + .custom-control-label .discovery-filter-checkmark {
    box-shadow: 0 0 0 4px rgba(241, 90, 39, 0.14);
}

.discovery-inline-filter-body .custom-parent-tag-checkbox,
.home-filter-panel .custom-parent-tag-checkbox {
    grid-column: 1 / -1;
    justify-self: start;
    padding: 0;
    border: 0;
    background: transparent;
}

.discovery-inline-filter-body .custom-parent-tag-checkbox .custom-control-label,
.home-filter-panel .custom-parent-tag-checkbox .custom-control-label {
    min-height: 44px;
    padding: 9px 13px;
    border-color: var(--yf-discovery-line);
    background: #f8fafb;
    color: #303946;
    font-weight: 600;
}

.discovery-inline-filter-body .panel-body .custom-control-label:hover,
.home-filter-panel .panel-body .custom-control-label:hover {
    border-color: rgba(241, 90, 39, 0.2);
    background: #fffaf7;
}

.discovery-listing-page #shop-container {
    align-items: flex-start;
}

.discovery-results-layout {
    display: grid;
    grid-template-columns: minmax(260px, 320px) minmax(0, 1fr);
    align-items: start;
    gap: 16px;
    width: 100%;
}

.discovery-results-layout-wide {
    grid-template-columns: minmax(0, 1fr);
}

.discovery-listing-page #index-shops-display {
    position: relative;
    min-width: 0;
    padding: 0 !important;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

.discovery-listing-page #shop-display-result-summary {
    padding-right: 0;
    padding-left: 0;
}

.discovery-result-toolbar {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    min-height: 62px;
    gap: 16px;
    margin-bottom: 16px;
    padding: 10px 14px;
    border: 1px solid var(--yf-discovery-line);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.9);
}

.discovery-result-count-primary {
    display: flex;
    align-items: baseline;
    flex-wrap: wrap;
    gap: 4px;
    color: #374151;
    font-size: 0.95rem;
    font-weight: 600;
}

.discovery-result-count-primary strong {
    margin-right: 3px;
    color: var(--yf-discovery-ink);
    font-size: 1.25rem;
}

.home-result-summary .discovery-result-toolbar {
    justify-content: flex-end;
    min-height: 0;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
}

.discovery-results-panel.is-searching::after {
    position: absolute;
    z-index: 4;
    top: 26px;
    right: 26px;
    width: 26px;
    height: 26px;
    border: 3px solid rgba(241, 90, 39, 0.2);
    border-top-color: var(--yf-discovery-orange);
    border-radius: 50%;
    content: "";
    animation: yf-search-spin 0.7s linear infinite;
}

.discovery-results-panel.is-searching #masonry-container {
    opacity: 0.45;
    transition: opacity 0.18s ease;
}

.yf-search-status {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #fff4f1;
    color: #9b2c0c;
    font-weight: 600;
}

@keyframes yf-search-spin {
    to { transform: rotate(360deg); }
}

.discovery-programme-notice {
    --notice-accent: #d04b1c;
    --notice-background: #fff4ed;
    --notice-border: rgba(208, 75, 28, 0.16);
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    margin-bottom: 14px;
    padding: 12px 14px;
    border: 1px solid var(--notice-border);
    border-radius: 12px;
    background: var(--notice-background);
    color: #344054;
}

.discovery-programme-notice-meals {
    --notice-accent: #9a6200;
    --notice-background: #fff8e8;
    --notice-border: rgba(154, 98, 0, 0.17);
}

.discovery-programme-notice-voucher {
    --notice-accent: #c93e0c;
    --notice-background: #fff2ec;
    --notice-border: rgba(201, 62, 12, 0.16);
}

.discovery-programme-notice-rebate,
.discovery-programme-notice-community {
    --notice-accent: #275d9a;
    --notice-background: #eef6ff;
    --notice-border: rgba(39, 93, 154, 0.16);
}

.discovery-programme-notice-health {
    --notice-accent: #bd3d69;
    --notice-background: #fff1f5;
    --notice-border: rgba(189, 61, 105, 0.16);
}

.discovery-programme-notice-green {
    --notice-accent: #24764d;
    --notice-background: #edf9f2;
    --notice-border: rgba(36, 118, 77, 0.17);
}

.discovery-programme-notice-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.78);
    color: var(--notice-accent);
    font-size: 1rem;
    box-shadow: inset 0 0 0 1px var(--notice-border);
}

.discovery-programme-notice-copy {
    min-width: 0;
}

.discovery-programme-notice-label {
    display: block;
    margin-bottom: 3px;
    color: var(--notice-accent);
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    line-height: 1.2;
    text-transform: uppercase;
}

.discovery-programme-notice p {
    margin: 0;
    font-size: 0.86rem;
    line-height: 1.4;
}

.discovery-programme-notice-title {
    color: #172033;
    font-size: 0.94rem !important;
    font-weight: 600;
    letter-spacing: -0.01em;
    line-height: 1.3 !important;
}

.discovery-programme-notice-text {
    margin-top: 2px !important;
    color: #5a6472;
}

.discovery-programme-notice strong {
    color: #172033;
    font-weight: 600;
}

.discovery-listing-page .masonry-card {
    border-radius: 16px !important;
}

/*
 * Opt-in four-column grid for listings with many results, matching the home
 * page. Programme pages default to the three-column `.masonry-card` width in
 * home/css/custom.css; add `discovery-cols-4` to #wrapper-content to widen.
 * Below 1200px the shared breakpoints keep the narrower counts, because a
 * fourth column there leaves too little room for the card image.
 */
@media screen and (min-width: 1200px) {
    .discovery-listing-page.discovery-cols-4 .masonry-card {
        width: calc(25% - 20px);
    }
}

/* Shared card structure used by home, programme and community listings. */
.discovery-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #fff;
}

.discovery-card-media {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fff8ed, #eaeef2);
}

.discovery-card-media > a,
.discovery-card-media picture {
    display: block;
    width: 100%;
}

.discovery-card-image {
    display: block;
    width: 100%;
    height: auto;
    transition: transform 0.25s ease;
}

.discovery-card:hover .discovery-card-image {
    transform: scale(1.015);
}

.discovery-card-type {
    position: absolute;
    bottom: 12px;
    left: 12px;
    display: inline-flex;
    align-items: center;
    max-width: calc(100% - 24px);
    min-height: 30px;
    gap: 7px;
    padding: 5px 10px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.55);
    border-radius: 999px;
    background: rgba(17, 24, 39, 0.82);
    color: #fff;
    font-size: 0.71rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    line-height: 1.1;
    text-overflow: ellipsis;
    text-transform: uppercase;
    white-space: nowrap;
    backdrop-filter: blur(12px);
}

.discovery-card-type-event {
    background: rgba(201, 62, 12, 0.9);
}

/* MICHELIN Bib Gourmand sticker.
 *
 * Top-right, so it never collides with the shop-type badge at bottom-left. Light
 * rather than dark on purpose: it is a recognition, not a category, and the
 * contrast against the dark type badge is what makes six recognised stalls
 * findable at a glance in a grid of a thousand. */
.discovery-card-michelin {
    position: absolute;
    top: 12px;
    right: 12px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    max-width: calc(100% - 24px);
    min-height: 30px;
    padding: 5px 10px 5px 7px;
    border: 1px solid rgba(255, 255, 255, 0.85);
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 2px 10px rgba(17, 24, 39, 0.18);
    color: #16213e;
    backdrop-filter: blur(12px);
}

.discovery-card-michelin img {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    object-fit: cover;
}

.discovery-card-michelin-text {
    display: flex;
    flex-direction: column;
    line-height: 1.05;
}

.discovery-card-michelin-text strong {
    font-size: 0.66rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.discovery-card-michelin-text small {
    font-size: 0.62rem;
    font-weight: 600;
    /* Bib Gourmand red, from the guide's own mark. */
    color: #a4243d;
    letter-spacing: 0.01em;
}

/* Narrow phones: the two-line label crowds the image, so keep the logo and drop
 * the wordmark to a single line. The title attribute still explains it, and the
 * detail page carries the full card. */
@media (max-width: 420px) {
    .discovery-card-michelin {
        gap: 5px;
        padding: 4px 8px 4px 6px;
    }

    .discovery-card-michelin-text strong {
        font-size: 0.6rem;
    }

    .discovery-card-michelin-text small {
        display: none;
    }
}

.discovery-card-body {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    padding: 18px;
}

.discovery-card-title {
    display: inline-block;
    margin-bottom: 14px;
    color: var(--yf-discovery-ink);
    font-size: 1.08rem;
    font-weight: 600;
    letter-spacing: -0.015em;
    line-height: 1.4;
}

.discovery-card-title:hover,
.discovery-card-title:focus {
    color: var(--yf-discovery-orange-dark);
    text-decoration: none;
}

.discovery-card-meta {
    display: grid;
    gap: 9px;
}

.discovery-card-meta-row {
    display: grid;
    grid-template-columns: 18px minmax(0, 1fr);
    align-items: start;
    gap: 8px;
    color: var(--yf-discovery-muted);
    font-size: 0.83rem;
    line-height: 1.45;
}

.discovery-card-meta-row i {
    margin-top: 2px;
    color: #7a828d;
}

.discovery-card-meta-row a {
    color: var(--yf-discovery-muted);
}

.discovery-card-meta-row-primary {
    color: #303946;
    font-weight: 600;
}

.discovery-card-status-open,
.discovery-card-status-open i {
    color: #087443;
}

.discovery-card-status-closed,
.discovery-card-status-closed i,
.discovery-card-status-closed a {
    color: #c2352b;
}

.discovery-card-tags,
.discovery-card-programmes {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: auto;
    padding-top: 16px;
}

.discovery-card-tags span,
.discovery-card-programmes span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    gap: 5px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #4b5563;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.2;
}

.discovery-card-programmes span {
    background: #fff5e8;
    color: #9a3b15;
}

@media (max-width: 767.98px) {
    .discovery-programme-notice {
        grid-template-columns: 40px minmax(0, 1fr);
        gap: 10px;
        padding: 12px;
    }

    .discovery-programme-notice-icon {
        width: 38px;
        height: 38px;
        border-radius: 10px;
    }

    .discovery-listing-hero {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px;
    }

    .discovery-listing-hero > div,
    .discovery-listing-hero .discovery-programme-notice {
        flex-basis: auto;
        width: 100%;
        max-width: none;
    }

    .discovery-inline-search {
        grid-template-columns: minmax(0, 1fr);
        padding: 16px;
    }

    .discovery-inline-search-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .discovery-inline-search-submit {
        grid-column: 1 / -1;
    }

    .discovery-inline-filter-body {
        padding: 16px;
    }

    .discovery-inline-filter-body #product-service-filter-tags-group {
        grid-template-columns: 1fr;
    }

    .discovery-result-toolbar {
        align-items: flex-start;
        gap: 10px;
    }

    .home-result-summary .discovery-result-toolbar {
        justify-content: flex-start;
    }

    .discovery-results-layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .discovery-listing-page #index-shops-display {
        padding: 0 !important;
    }

    .no-map-grid #site-wrapper .discovery-listing-page > .discovery-listing-container {
        padding-top: 82px;
    }
}

@media (min-width: 768px) and (max-width: 991.98px) {
    .discovery-listing-hero {
        align-items: flex-start;
        flex-direction: column;
    }

    .discovery-listing-hero > div,
    .discovery-listing-hero .discovery-programme-notice {
        flex-basis: auto;
        width: 100%;
        max-width: none;
    }

    .discovery-inline-search {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .discovery-inline-search-actions {
        grid-column: 1 / -1;
    }

    .discovery-results-layout {
        grid-template-columns: minmax(210px, 250px) minmax(0, 1fr);
        gap: 16px;
    }
}

@media (min-width: 992px) and (max-width: 1199.98px) {
    .discovery-inline-search {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }

    .discovery-inline-search-actions {
        grid-column: 1 / -1;
    }
}

@media (prefers-reduced-motion: reduce) {
    .discovery-inline-search-input {
        transition: none;
    }
}

/* ---------------------------------------------------------------------------
   On-demand map activation

   Google bills Maps JavaScript per map load, so the map surface starts as a
   static placeholder and only becomes live when the visitor presses "Show map".
   The states are driven by data-map-state on #google-map-container, set by
   search-handler.js: idle -> loading -> active (or error).
   --------------------------------------------------------------------------- */
#google-map-container {
    position: relative;
}

.map-activate {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    z-index: 2;
    background:
        repeating-linear-gradient(45deg, rgba(0, 0, 0, .022) 0 12px, transparent 12px 24px),
        #eef1f4;
}

/* Once the map is live the placeholder must not intercept map interaction. */
#google-map-container[data-map-state="active"] .map-activate {
    display: none;
}

.map-activate-inner {
    max-width: 32rem;
}

.map-activate-icon {
    font-size: 2rem;
    color: #6b7681;
    margin-bottom: .75rem;
    display: block;
}

.map-activate-title {
    font-size: 1.0625rem;
    font-weight: 600;
    color: #2f3941;
    margin-bottom: .25rem;
}

.map-activate-text {
    font-size: .9375rem;
    color: #5a646e;
    margin-bottom: 1rem;
}

.map-activate-button {
    /* Senior-friendly target: stays above the 44px minimum. */
    min-height: 46px;
    padding: .625rem 1.5rem;
    font-weight: 600;
    color: #fff;
    background-color: #f15a27;
    border: 1px solid #f15a27;
    border-radius: 4px;
}

.map-activate-button:hover,
.map-activate-button:focus {
    background-color: #d84d1d;
    border-color: #d84d1d;
    color: #fff;
}

.map-activate-button:focus-visible {
    outline: 3px solid #1b6ac9;
    outline-offset: 2px;
}

#google-map-container[data-map-state="loading"] .map-activate-button {
    opacity: .65;
    pointer-events: none;
}

#google-map-container[data-map-state="loading"] .map-activate-button::after {
    content: " \2026";
}

/* The error line only appears when the load actually failed. */
.map-activate-error {
    display: none;
    margin: .875rem 0 0;
    font-size: .9375rem;
    color: #8a2f13;
}

#google-map-container[data-map-state="error"] .map-activate-error {
    display: block;
}

#google-map-container[data-map-state="error"] .map-activate-button {
    display: none;
}
