/* V29 · «Buscar y descubrir»: the directory heading (search, shortcuts, city stations), the suggestions panel, search
   notices, the reason line on cards, closest results and honest empty states. Tokens from the theme (lbe-core.css). */

/* ---------- Heading: search ---------- */
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd { position: relative; margin-top: clamp(22px, 3vw, 34px); max-width: 860px; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-label { display: block; margin: 0 0 12px; color: #fff; font: 700 clamp(1.15rem, 1rem + .5vw, 1.4rem)/1.2 var(--f-display); letter-spacing: -.02em; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-bar { position: relative; display: flex; align-items: center; gap: 6px; min-height: 60px; padding: 6px 6px 6px 16px; border-radius: var(--r-m); background: var(--c-white); box-shadow: var(--e-3); transition: box-shadow var(--dur-2) var(--ease-out); }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-bar:focus-within { box-shadow: 0 0 0 3px var(--c-gold), var(--e-3); }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-icon { flex: 0 0 auto; color: var(--c-teal); }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd input[type="search"] { flex: 1 1 auto; min-width: 0; min-height: 48px; margin: 0; padding: 0 6px; border: 0; border-radius: 8px; background: transparent; color: var(--c-ink); font: 500 1.0625rem/1.3 var(--f-text); box-shadow: none; scroll-margin-top: 96px; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd input[type="search"]:focus { outline: 0; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd input[type="search"]::placeholder { color: var(--c-text-3); opacity: 1; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd input[type="search"]::-webkit-search-cancel-button { cursor: pointer; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-submit { flex: 0 0 auto; min-height: 48px; padding: 0 22px; border: 0; border-radius: 8px; background: var(--c-teal); color: #fff; font: 700 1rem/1 var(--f-text); cursor: pointer; transition: background-color var(--dur-2) ease; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-submit:hover { background: var(--c-teal-700); }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-submit:focus-visible { outline: 3px solid var(--c-ink); outline-offset: 2px; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-hint { margin: 12px 0 0; color: var(--c-on-deep-2); font-size: var(--t-small); line-height: 1.5; text-align: left !important; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-near { margin-left: 4px; padding: 6px 2px; border: 0; background: none; color: var(--c-gold-200); font: 700 var(--t-small)/1.2 var(--f-text); text-decoration: underline; text-decoration-color: var(--c-gold); text-underline-offset: 4px; cursor: pointer; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-near:hover { color: #fff; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-near-status { margin: 10px 0 0; color: var(--c-gold-200); font-size: var(--t-small); }

/* ---------- Heading: «¿Qué necesita encontrar hoy?» shortcuts ---------- */
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-shortcuts { display: block; margin-top: 20px; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-shortcuts-title { margin: 0 0 10px; color: var(--c-on-deep-2); font-size: var(--t-small); font-weight: 650; text-align: left !important; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-shortcuts ul { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-shortcuts a { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 6px 12px 6px 10px; border: 1px solid rgba(255, 255, 255, .22); border-radius: var(--r-pill); color: #fff; font: 650 .9375rem/1.2 var(--f-text); text-decoration: none; transition: background-color var(--dur-2) ease, border-color var(--dur-2) ease; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-shortcuts a svg { flex: 0 0 auto; color: var(--c-gold); }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-count { color: var(--c-gold-200); font-size: .8125rem; font-variant-numeric: tabular-nums; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-shortcuts a:hover { border-color: var(--c-gold); background: rgba(255, 255, 255, .07); }
body .lbe-directory-page.site-main .lbe-sd-hero :focus-visible { outline: 3px solid var(--c-gold); outline-offset: 3px; }

/* ---------- Heading: cities as stations on the gold route, with their other names ---------- */
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-dir21-cities ul { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-dir21-cities ul::before { display: none; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-dir21-cities li { position: relative; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-dir21-cities li + li::before { content: ""; position: absolute; z-index: 0; top: 26px; left: -50%; width: 100%; height: 2px; background: var(--c-gold); }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-dir21-cities li:last-child::before { background: linear-gradient(90deg, var(--c-gold), rgba(235, 173, 23, .35)); }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-dir21-cities a { gap: 4px; padding-bottom: 20px; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-dir21-dot { margin-bottom: 6px; }
.lbe-dir21-dot--online { border-style: dotted !important; }
.lbe-dir21-name { color: inherit; }
.lbe-dir21-alt { max-width: 100%; color: var(--c-on-deep-2); font-size: .75rem; font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; }
.lbe-dir21-count { color: var(--c-gold-200); font-size: .75rem; font-weight: 650; font-variant-numeric: tabular-nums; }

/* ---------- Suggestions panel ---------- */
.lbe-ac-form { position: relative; }
.lbe-ac { position: absolute; z-index: 60; top: var(--lbe-ac-top, 100%); left: var(--lbe-ac-left, 0); width: min(var(--lbe-ac-width, 100%), calc(100vw - 32px)); max-height: min(62vh, 460px); overflow-y: auto; overscroll-behavior: contain; padding: 6px; background: var(--c-white, #fff); color: var(--c-ink, #14243a); border: 1px solid var(--c-line, #dce3e9); border-radius: var(--r-m, 12px); box-shadow: var(--e-3); text-align: left; font-weight: 400; }
.lbe-ac[hidden] { display: none; }
.lbe-ac-head { padding: 12px 10px 4px; color: var(--c-text-3, #5b6b7d); font-size: .8125rem; font-weight: 700; }
.lbe-ac [role="group"] + [role="group"] { margin-top: 2px; border-top: 1px solid var(--c-line, #dce3e9); }
.lbe-ac-opt { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 8px 10px; border-radius: 8px; cursor: pointer; line-height: 1.3; }
.lbe-ac-opt[aria-selected="true"], .lbe-ac-opt:hover { background: var(--c-teal-50, #e7f2f3); }
.lbe-ac-opt[aria-selected="true"] { outline: 2px solid var(--c-teal, #176b76); outline-offset: -2px; }
.lbe-ac-label { min-width: 0; color: var(--c-ink); overflow-wrap: anywhere; }
.lbe-ac-label mark { background: none; color: inherit; font-weight: 750; text-decoration: underline 2px var(--c-gold, #ebad17); text-underline-offset: 3px; }
.lbe-ac-meta { flex: 0 0 auto; max-width: 48%; color: var(--c-text-2, #44566a); font-size: .8125rem; text-align: right; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.lbe-ac-opt--search .lbe-ac-label { font-weight: 700; }
.lbe-ac-opt--query .lbe-ac-label { font-weight: 600; }
body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd .lbe-ac { max-width: 100%; }
@media (max-width: 599px) { .lbe-ac { left: 0; width: 100%; } .lbe-ac-meta { max-width: 42%; } .lbe-ac-opt { min-height: 48px; } }
@media (prefers-reduced-motion: no-preference) { .lbe-ac-opt { transition: background-color var(--dur-1, 120ms) ease; } }

/* ---------- Notices above the results ---------- */
.lbe-search-notice { margin: 0 0 6px; padding: 12px 16px; border-radius: var(--r-m, 12px); background: var(--c-gold-50, #fdf6e3); color: var(--c-ink, #14243a); font-size: var(--t-small, .875rem); line-height: 1.55; }
.lbe-search-notice p { margin: 0; }
.lbe-search-notice-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.lbe-search-notice-chips .lbe-chip { background: var(--c-white, #fff); }
.lbe-near-consent { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 10px 0 0 !important; color: var(--c-text-2, #44566a); }
.lbe-near-button { min-height: 44px; padding: 0 16px; border: 1px solid var(--c-teal, #176b76); border-radius: var(--r-m, 12px); background: var(--c-white, #fff); color: var(--c-teal, #176b76); font-weight: 700; cursor: pointer; }
.lbe-search-suggest { margin-top: 20px; }
.lbe-search-suggest h3 { margin: 0 0 10px; font-size: 1rem; }
.lbe-search-suggest .lbe-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.lbe-search-suggest .lbe-chip span { color: var(--c-text-3, #5b6b7d); }

/* ---------- Cards: why this listing, and the tiers for administrators ---------- */
.lbe-card-why { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; margin: 0; color: var(--c-teal-700, #105a63); font-size: .8125rem; font-weight: 650; line-height: 1.4; }
.lbe-card-why::before { content: ""; flex: 0 0 auto; width: 14px; height: 2px; border-radius: 2px; background: var(--c-gold, #ebad17); }
.lbe-card-debug { margin: 0; padding: 6px 8px; border-radius: 8px; background: var(--c-sunken, #eef2f5); color: var(--c-text-2, #44566a); font-size: .75rem; }
.lbe-card-debug code { font-size: inherit; white-space: normal; }

/* ---------- Closest results, under their own heading ---------- */
.lbe-search-more { margin-top: clamp(28px, 4vw, 44px); padding-top: clamp(20px, 3vw, 28px); border-top: 1px solid var(--c-line, #dce3e9); }
.lbe-search-more h2 { margin: 0 0 16px; font: 750 clamp(1.2rem, 1.05rem + .5vw, 1.45rem)/1.2 var(--f-display); letter-spacing: -.02em; }

/* ---------- Empty search ---------- */
.lbe-search-empty .lbe-search-empty-actions { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 18px 0 0; }

/* ---------- Phones and tablets ---------- */
@media (max-width: 899px) {
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-dir21-cities ul { grid-auto-columns: 112px; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-dir21-cities li + li::before { left: -56px; width: 112px; }
}
@media (max-width: 599px) {
  /* On phones the search comes first: the heading text shrinks to one line of context. */
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-directory-heading-row p { display: none; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd { margin-top: 16px; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-bar { min-height: 56px; padding-left: 12px; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-submit { padding: 0 16px; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-shortcuts { margin-inline: calc(var(--gutter) * -1); }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-shortcuts-title { padding-inline: var(--gutter); margin-bottom: 8px; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-shortcuts ul { flex-wrap: nowrap; overflow-x: auto; padding: 2px var(--gutter) 6px; scroll-padding-inline: var(--gutter); scrollbar-width: none; scroll-snap-type: x proximity; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-shortcuts ul::-webkit-scrollbar { display: none; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-shortcuts li { flex: 0 0 auto; scroll-snap-align: start; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-shortcuts a { white-space: nowrap; }
}
@media (max-width: 359px) {
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-icon { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-bar, body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-submit, body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd-shortcuts a { transition: none; }
}

/* Owner, 24/10/2026: three columns of listings on desktop so more fit on screen. */
@media (min-width: 1280px) {
  body.page-id-11:not(.home) .lbe-directory-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  body.page-id-11:not(.home) .lbe-directory-card { padding: 20px; gap: 14px; }
  body.page-id-11:not(.home) .lbe-directory-card h3 { font-size: 1.125rem; }
  body.page-id-11:not(.home) .lbe-card-meta div { grid-template-columns: 6.6em minmax(0, 1fr); }
  body.page-id-11:not(.home) .lbe-card-actions a { padding-inline: 12px; }
}

/* Phones: search right after the title, then the shortcuts, then «Publicar mi anuncio», then the stations. */
@media (max-width: 599px) {
  body .lbe-directory-page.site-main .lbe-sd-hero > .site-wrap { display: flex; flex-direction: column; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-directory-heading-row { display: contents; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-directory-breadcrumb { order: 0; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-directory-heading-row > div:first-child { order: 1; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-sd { order: 2; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-directory-publish { order: 3; margin-top: 18px; }
  body .lbe-directory-page.site-main .lbe-sd-hero .lbe-dir21-cities { order: 4; }
}
