/* Vendor directory: the category tile grid on /services, the type-ahead, and the /event-vendors results page.
   Tokens come from public-site.css (--ps-*); no new colours. Scoped under .vd-* so no other page is affected. */

/* ── 18 category tiles ─────────────────────────────────────────────────────────────────────────
   Desktop: all 18 at once (9 columns x 2 rows on wide screens, 6 x 3 on medium) so nothing is hidden.
   Phone: a two-row strip that scrolls sideways, so 18 tiles cost two rows of height, not nine. */
.vd-tiles { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: 12px; margin: 0; padding: 0; list-style: none; }
.vd-tile { display: flex; flex-direction: column; gap: 6px; min-width: 0; height: 100%; padding: 8px 8px 10px; border: 1px solid var(--ps-line); border-radius: 16px; background: var(--ps-card); color: var(--ps-ink); text-decoration: none; text-align: left; cursor: pointer; font: inherit; }
.vd-tile:hover { border-color: var(--ps-saffron); }
.vd-tile:focus-visible { outline: 3px solid var(--ps-saffron); outline-offset: 2px; }
.vd-tile[aria-expanded="true"] { border-color: var(--ps-saffron); box-shadow: inset 0 0 0 1px var(--ps-saffron); background: var(--ps-saffron-soft); }
.vd-tile img { display: block; width: 100%; aspect-ratio: 3 / 2; height: auto; border-radius: 10px; background: var(--ps-saffron-soft); object-fit: cover; }
.vd-tile strong { font-size: 13px; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; min-height: 2.5em; }
.vd-tile small { font-size: 12px; color: var(--ps-muted); }
.vd-tile.is-empty img { opacity: .7; }
@media (max-width: 1199px) { .vd-tiles { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .vd-tiles { grid-template-columns: none; grid-auto-flow: column; grid-template-rows: repeat(2, auto); grid-auto-columns: 132px; overflow-x: auto; scroll-snap-type: x proximity; padding-bottom: 8px; margin-inline: calc(var(--ps-gutter) * -1); padding-inline: var(--ps-gutter); scroll-padding-inline: var(--ps-gutter); }
  .vd-tiles > li { scroll-snap-align: start; }
}

/* ── Service types for the chosen tile ─────────────────────────────────────────────────────── */
.vd-panel { margin-top: 14px; padding: 16px; border: 1px solid var(--ps-saffron); border-radius: 18px; background: var(--ps-saffron-soft); }
.vd-panel[hidden] { display: none; }
.vd-panel h3 { margin: 0 0 4px; font-size: 18px; }
.vd-panel p { margin: 0 0 12px; color: var(--ps-ink-2, #39424F); font-size: 14px; }
.vd-types { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.vd-type { display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border: 1px solid var(--ps-line-strong); border-radius: 999px; background: #fff; color: var(--ps-ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.vd-type:hover { border-color: var(--ps-saffron); }

/* ── Type-ahead ────────────────────────────────────────────────────────────────────────────── */
.vd-suggest-wrap { position: relative; min-width: 0; }
.vd-suggest { position: absolute; z-index: 30; left: 0; right: 0; top: calc(100% + 6px); margin: 0; padding: 6px; list-style: none; background: #fff; color: var(--ps-ink); border: 1px solid var(--ps-line-strong); border-radius: 16px; box-shadow: 0 18px 40px -20px rgba(20,24,33,.35); max-height: 340px; overflow-y: auto; }
.vd-suggest[hidden] { display: none; }
.vd-suggest a { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border-radius: 10px; color: var(--ps-ink); text-decoration: none; }
.vd-suggest a:hover, .vd-suggest a[aria-selected="true"] { background: var(--ps-saffron-soft); }
.vd-suggest small { color: var(--ps-muted); font-size: 12px; }
.vd-kind { font-size: 11px; text-transform: uppercase; letter-spacing: .05em; color: var(--ps-saffron-ink); font-weight: 700; }

/* ── Results page ──────────────────────────────────────────────────────────────────────────── */
.vd-crumbs { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; font-size: 14px; }
.vd-crumbs li + li::before { content: "/"; margin-right: 6px; color: var(--ps-muted); }
.vd-crumbs a { color: inherit; }
.vd-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.vd-filters { border: 1px solid var(--ps-line); border-radius: 18px; background: #fff; padding: 16px; position: sticky; top: 16px; }
.vd-filters h2 { font-size: 16px; margin: 0 0 12px; }
.vd-filters label, .vd-filters legend { font-size: 13px; font-weight: 600; }
.vd-filters select, .vd-filters input[type=search] { width: 100%; min-height: 40px; border: 1px solid var(--ps-line-strong); border-radius: 10px; padding: 0 10px; font: inherit; background: #fff; }
.vd-filters fieldset { border: 0; padding: 0; margin: 0 0 14px; min-width: 0; }
.vd-filters details { margin: 0 0 8px; border-top: 1px solid var(--ps-line); padding-top: 8px; }
.vd-filters summary { cursor: pointer; font-size: 13px; font-weight: 600; }
.vd-check { display: flex; gap: 8px; align-items: center; padding: 4px 0; font-weight: 400 !important; font-size: 14px !important; }
.vd-check input { width: 18px; height: 18px; flex: 0 0 18px; }
.vd-check small { margin-left: auto; color: var(--ps-muted); }
.vd-applied { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 16px; padding: 0; list-style: none; }
.vd-applied a { display: inline-flex; gap: 6px; align-items: center; min-height: 36px; padding: 0 12px; border: 1px solid var(--ps-saffron); border-radius: 999px; background: var(--ps-saffron-soft); color: var(--ps-saffron-ink); text-decoration: none; font-size: 14px; font-weight: 600; }
.vd-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--ps-space-4, 32px) 20px; }
@media (max-width: 600px) { .vd-results { row-gap: var(--ps-space-3, 24px); } }
.vd-card { display: flex; flex-direction: column; min-width: 0; border: 1px solid var(--ps-line); border-radius: 20px; background: #fff; overflow: hidden; }
.vd-card h3 { margin: 0; font-size: 19px; line-height: 1.25; }
.vd-card h3 a { color: inherit; text-decoration: none; }
.vd-card h3 a:hover { text-decoration: underline; }
/* Every photo is the same 3:2 frame, whatever its own shape, so the grid reads evenly. */
.vd-media { position: relative; display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--ps-line); }
.vd-media .vd-cover { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: cover; display: block; }
.vd-ribbon { position: absolute; top: 12px; left: 12px; padding: 3px 10px; border-radius: 999px; background: #fff; color: var(--ps-ink); font-size: 12px; font-weight: 700; border: 1px solid var(--ps-ink); }
.vd-ribbon.is-signature { background: var(--ps-ink); color: #fff; }
.vd-body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 6px; flex: 1 1 auto; }
.vd-cat { margin: 0; font-size: 13px; color: var(--ps-muted); }
.vd-card .vd-short { margin: 0; font-size: 14px; color: var(--ps-ink-2, #39424F); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.vd-card .vd-headline { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.vd-facts { display: grid; gap: 4px; margin: 4px 0 0; padding: 10px 0 0; border-top: 1px solid var(--ps-line); font-size: 13px; }
.vd-facts > div { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 8px; }
.vd-facts dt { color: var(--ps-muted); font-weight: 600; }
.vd-facts dd { margin: 0; color: var(--ps-ink); }
/* The buttons always sit on one row at the bottom of the card, three equal columns, so every card lines up. */
.vd-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding: 12px 18px 18px; margin-top: auto; }
.vd-actions .ps-btn { width: 100%; padding: 0 8px; white-space: nowrap; }
@media (max-width: 480px) { .vd-actions { grid-template-columns: 1fr; } }
.vd-card .vd-headline { color: var(--ps-ink-2, #39424F); font-size: 14px; margin: 0; }
.vd-badges { display: flex; flex-wrap: wrap; gap: 6px; }
.vd-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--ps-saffron-soft); color: var(--ps-saffron-ink); font-size: 12px; font-weight: 700; }
.vd-badge.is-premium { background: var(--ps-saffron); color: #fff; }
.vd-meta { font-size: 13px; color: var(--ps-muted); }
.vd-sub { display: flex; flex-wrap: wrap; gap: 6px; }
.vd-sub span { font-size: 12px; border: 1px solid var(--ps-line); border-radius: 999px; padding: 2px 9px; color: var(--ps-ink-2, #39424F); }
.vd-pages { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; align-items: center; }
.vd-filter-toggle { display: none; }
@media (max-width: 960px) {
  .vd-layout { grid-template-columns: minmax(0, 1fr); }
  .vd-filters { position: static; }
  .vd-results { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .vd-tile, .vd-type { transition: none; } }

/* Results as a list, or a list with a map beside it (js/vendor-map.js). Pins are numbered like the cards and coloured by plan. */
.vd-viewbar { display: flex; gap: 8px; margin: 0 0 12px; }
.vd-viewbar [aria-pressed="true"] { background: var(--ps-ink); color: #fff; border-color: var(--ps-ink); }
.vd-resultswrap.is-map { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.vd-map-wrap { position: sticky; top: 90px; }
.vd-map { height: 540px; border-radius: 14px; border: 1px solid var(--ps-line); background: #E4ECE8; overflow: hidden; }
@media (max-width: 900px) { .vd-resultswrap.is-map { grid-template-columns: 1fr; } .vd-map-wrap { position: static; order: -1; } .vd-map { height: 360px; } }
.vd-pin span { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 15px 15px 15px 2px; color: #fff; font: 700 12px system-ui, sans-serif; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .3); background: #39424F; }
.vd-pin-featured span { background: #BE185D; }
.vd-pin-signature span { background: #9D174D; }

/* Signature and Featured cards: the display serif for the business name (Basic stays in the plain sans). */
.vd-tier-signature h3, .vd-tier-featured h3 { font-family: var(--ps-display, "Fraunces", Georgia, serif); letter-spacing: -.005em; }
.vd-tier-signature h3 { font-size: 22px; font-weight: 600; }
.vd-tier-featured h3 { font-size: 21px; font-weight: 500; }
.vd-tier-signature .vd-headline { font-family: var(--ps-display, "Fraunces", Georgia, serif); font-style: italic; font-weight: 400; color: var(--ps-ink-2, #39424F); }

/* Premium tiers: a gold line around the card. Signature is richer (cream tint, shadow, star), Featured is the lighter version. The tier word stays on the badge, so colour is never the only cue. */
.vd-tier-signature { border: 1.5px solid var(--ps-premium-line, #C9A24A); background: var(--ps-premium-tint, #FBF7EC); box-shadow: 0 8px 22px rgba(201, 162, 74, .20); }
.vd-tier-featured { border: 1px solid var(--ps-premium-line, #C9A24A); }
.vd-card .vd-ribbon { background: #fff; color: var(--ps-premium-ink, #8A6A1F); border: 1px solid var(--ps-premium-line, #C9A24A); }
.vd-card .vd-ribbon.is-signature { background: var(--ps-premium-tint, #FBF7EC); color: var(--ps-premium-ink, #8A6A1F); border-color: var(--ps-premium-line, #C9A24A); }
.vd-card .vd-ribbon.is-signature::before { content: "\2605\00a0"; }
.vd-tier-signature .vd-facts { border-top-color: rgba(201, 162, 74, .45); }

/* Few categories (a young city): wider tiles that fill the row and say what is inside, instead of nine narrow columns with most of them empty. */
.vd-tiles-few { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 16px; }
.vd-tiles-few .vd-tile strong { font-size: 16px; min-height: 0; -webkit-line-clamp: 3; }
.vd-tiles-few .vd-tile .vd-tile-desc { font-size: 13px; color: var(--ps-ink2, #39424F); line-height: 1.4; }
.vd-tiles-few .vd-tile .vd-tile-types { font-size: 12px; color: var(--ps-muted); line-height: 1.4; }
@media (max-width: 767px) { .vd-tiles.vd-tiles-few { grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); grid-auto-flow: row; grid-template-rows: none; grid-auto-columns: auto; overflow-x: visible; } }

/* Verified business: a small shield tick beside the name instead of a separate badge line. */
.vd-verified { display: inline-flex; vertical-align: -2px; margin-left: 6px; color: var(--ps-green, #0F766E); }

/* Directory result cards use the same compact card as /services: smaller name, 16:9 photo. */
.vd-results .vd-card h3 { font-size: 17px; }
.vd-results .vd-media { aspect-ratio: 16 / 9; }

.vd-card.is-procurement .vd-media .vd-cover { object-fit: contain; }

.vd-card.is-procurement .vd-media { aspect-ratio: auto; }
.vd-card.is-procurement .vd-media .vd-cover { position: static; width: 100%; height: auto; }
.vd-card .vd-photo.is-illustrative .vd-media{aspect-ratio:3/2}
.vd-card .vd-photo.is-illustrative .vd-media .vd-cover{position:absolute;width:100%;height:100%;object-fit:cover;object-position:center}

/* Shared directory search presentation: category scope is in the heading, never repeated as a picker. */
.vd-layout{display:block}.vd-filters{position:static;display:flex;align-items:flex-end;flex-wrap:wrap;gap:16px;margin-bottom:24px;padding:16px 0;border-width:1px 0;border-radius:0}.vd-filters>fieldset{flex:1;min-width:140px;margin:0}.vd-filters select{min-height:44px}.vd-filter-actions{display:flex;gap:8px;flex-wrap:wrap}.vd-more-filters{position:relative;border:0!important;margin:0!important;padding:0!important}.vd-more-filters>summary{min-height:44px;display:flex;align-items:center;padding:0 16px;border:1px solid var(--ps-line);border-radius:12px}.vd-more-filters>div{padding:16px;border:1px solid var(--ps-line);border-radius:12px;margin-top:8px;max-width:360px}.vd-results{grid-template-columns:repeat(3,minmax(0,1fr));column-gap:24px}.vd-resultswrap.is-map .vd-results{grid-template-columns:repeat(2,minmax(0,1fr))}.vd-directory-search{grid-template-columns:minmax(120px,.6fr) minmax(0,2fr) auto;max-width:none}.vd-category-browse h2{font-size:clamp(22px,2vw,28px);margin:0 0 16px}.vd-category-browse ul{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:0 24px;list-style:none;margin:0;padding:0}.vd-category-browse li{min-width:0}.vd-category-browse a{display:block;padding:4px 0;min-height:32px;line-height:1.5;text-underline-offset:3px}.vd-category-browse a[aria-current=page]{font-weight:700}
@media(max-width:900px){.vd-results{grid-template-columns:repeat(2,minmax(0,1fr))}.vd-category-browse ul{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:600px){.vd-results,.vd-resultswrap.is-map .vd-results{grid-template-columns:minmax(0,1fr)}.vd-filters>fieldset{flex-basis:calc(50% - 8px);min-width:0}.vd-directory-search{grid-template-columns:minmax(0,1fr)}.vd-category-browse ul{grid-template-columns:minmax(0,1fr)}.vd-category-browse a{min-height:32px;padding:4px 0}.vd-more-filters{width:100%}}

/* Category links sit close under the results: one standard gap, not two full section paddings. */
.ps-section:has(+ .vd-category-browse) { padding-bottom: 24px; }
.ps-section.vd-category-browse { padding-block: 32px; }

/* List and map: one column of cards, and the map takes the rest of the width and most of the screen height. */
@media (min-width: 901px) {
  .vd-resultswrap.is-map { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
  .vd-resultswrap.is-map .vd-results { grid-template-columns: minmax(0, 1fr); }
  .vd-resultswrap.is-map .vd-map { height: calc(100vh - 150px); min-height: 540px; }
}
