/* ==========================================================================
   JLW Discovery Engine — Frontend Styles
   ========================================================================== */

/* Avenir: native on macOS/iOS; Nunito is the web fallback */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@300;400;500;600;700;800&display=swap');

:root {
  --jlw-primary      : #4a6834;
  --jlw-primary-dark : #b26d32;
  --jlw-primary-light: #edf0eb;
  --jlw-text         : #1f2937;
  --jlw-text-muted   : #6b7280;
  --jlw-border       : rgba(10, 10, 10, 0.30);
  --jlw-bg-glass     : rgba(255, 255, 255, 0.23);
  --jlw-white        : #ffffff;
  --jlw-radius       : 12px;
  --jlw-radius-sm    : 8px;
  --jlw-shadow       : 0 2px 8px rgba(0,0,0,.08);
  --jlw-shadow-hover : 0 6px 20px rgba(0,0,0,.12);
  --jlw-font         : 'Avenir', 'Avenir Next', 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --jlw-font-size    : 16px;
}

/* ── WRAP ────────────────────────────────────────────────────────────────── */
.jlw-discovery-wrap {
  font-family: var(--jlw-font);
  font-size  : var(--jlw-font-size);
  color      : var(--jlw-text);
  box-sizing : border-box;
  max-width  : 1400px;
  margin     : 0 auto;
}
.jlw-discovery-wrap *, .jlw-discovery-wrap *::before, .jlw-discovery-wrap *::after { box-sizing: inherit; }

/* ── TOP BAR ─────────────────────────────────────────────────────────────── */
.jlw-topbar {
  display        : flex;
  flex-direction : column;
  align-items    : stretch;
  gap            : 12px;
  padding        : 18px 0 12px;
}

/* Row holding the search bar (left, 50%) + filters (right, 50%) */
.jlw-search-filters-row {
  display  : flex;
  align-items: center;
  gap      : 12px;
  flex-wrap: wrap;
}

/* ── SINGLE UNIFIED SEARCH WRAP ─────────────────────────────────────────── */
.jlw-search-wrap {
  position   : relative;
  display    : flex;
  align-items: center;
  background : var(--jlw-white);
  border     : 1px solid var(--jlw-border);
  border-radius: 50px;
  padding    : 0 6px 0 14px;
  gap        : 8px;
  flex       : 1 1 260px;
  min-width  : 220px;
  max-width  : 460px;
  box-shadow : 0 1px 4px rgba(0,0,0,.06);
  transition : box-shadow .2s;
  overflow   : visible;
}
.jlw-search-wrap:focus-within {
  box-shadow  : 0 0 0 3px rgba(0,169,158,.18);
  border-color: var(--jlw-primary);
}

.jlw-icon-search { color: var(--jlw-text-muted); flex-shrink: 0; line-height: 0; }

.jlw-main-search {
  flex       : 1;
  border     : none;
  outline    : none;
  font-family: var(--jlw-font);
  font-size  : var(--jlw-font-size);
  color      : var(--jlw-text);
  background : transparent;
  padding    : 11px 0;
  min-width  : 0;
}
.jlw-main-search::placeholder { color: var(--jlw-text-muted); }

/* Near Me button */
.jlw-geo-btn {
  display    : flex;
  align-items: center;
  gap        : 5px;
  padding    : 7px 14px;
  background : var(--jlw-primary);
  border     : none;
  border-radius: 50px;
  color      : var(--jlw-white);
  font-family: var(--jlw-font);
  font-size  : .8rem;
  font-weight: 600;
  cursor     : pointer;
  white-space: nowrap;
  transition : background .2s;
  flex-shrink: 0;
}
.jlw-geo-btn:hover { background: var(--jlw-primary-dark); }
.jlw-geo-btn:disabled { opacity: .5; cursor: wait; }

.jlw-geo-status {
  position     : absolute;
  top          : calc(100% + 8px);
  right        : 0;
  z-index      : 5;
  max-width    : 260px;
  padding      : 10px 14px;
  background   : #1f2937;
  color        : var(--jlw-white);
  font-size    : .8rem;
  line-height  : 1.4;
  border-radius: var(--jlw-radius-sm);
  box-shadow   : var(--jlw-shadow-hover);
}

/* ── TABS / FILTER BUTTONS ──────────────────────────────────────────────── */
/* Per design spec: padding 15px 50px, border 1px #0A0A0A4D, bg #FFFFFF3B, text #000 */
.jlw-tabs {
  display  : flex;
  gap      : 10px;
  flex-wrap: nowrap;
}

.jlw-tab {
  flex         : 1 1 0;
  padding      : 15px 20px;
  border       : 1px solid rgba(10, 10, 10, 0.30);
  border-radius: 50px;
  background   : rgba(255, 255, 255, 0.23);
  cursor       : pointer;
  font-family  : var(--jlw-font);
  font-size    : var(--jlw-font-size);
  font-weight  : 400;
  color        : #000000;
  transition   : background .2s, border-color .2s, color .2s;
  white-space  : nowrap;
  line-height  : 1;
  text-align   : center;
}
.jlw-tab:hover {
  background  : #b26d32;
  border-color: #b26d32;
  color       : var(--jlw-white);
}
.jlw-tab.active {
  background  : #b26d32;
  border-color: #b26d32;
  color       : var(--jlw-white);
  font-weight : 600;
}

/* ── AUTOCOMPLETE ───────────────────────────────────────────────────────── */
.jlw-autocomplete {
  position     : absolute;
  top          : calc(100% + 6px);
  left         : 0;
  right        : 0;
  background   : var(--jlw-white);
  border       : 1px solid var(--jlw-border);
  border-radius: var(--jlw-radius-sm);
  box-shadow   : var(--jlw-shadow);
  z-index      : 500;
  max-height   : 260px;
  overflow-y   : auto;
}
.jlw-autocomplete[hidden] { display: none; }

.jlw-autocomplete__item {
  padding      : 10px 16px;
  cursor       : pointer;
  font-size    : .875rem;
  border-bottom: 1px solid rgba(0,0,0,.05);
  transition   : background .15s;
  display      : flex;
  flex-direction: column;
  gap          : 2px;
}
.jlw-autocomplete__item strong { color: var(--jlw-text); }
.jlw-autocomplete__item small  { color: var(--jlw-text-muted); font-size: .78rem; }
.jlw-autocomplete__item:last-child { border-bottom: none; }
.jlw-autocomplete__item:hover  { background: var(--jlw-primary-light); }

/* ── FILTERS ROW ────────────────────────────────────────────────────────── */
.jlw-filters {
  display  : flex;
  flex-wrap: wrap;
  gap      : 10px;
  margin-bottom: 14px;
  align-items: center;
}

.jlw-filter-group {
  display  : flex;
  flex-wrap: wrap;
  gap      : 10px;
  align-items: center;
}
.jlw-filter-group[hidden] { display: none; }

/* Filter selects / inputs styled as pills */
.jlw-filters select,
.jlw-filters input[type="number"] {
  padding      : 9px 16px;
  border       : 1px solid rgba(10, 10, 10, 0.30);
  border-radius: 50px;
  font-family  : var(--jlw-font);
  font-size    : .875rem;
  color        : #000000;
  background   : rgba(255,255,255,0.23);
  outline      : none;
  cursor       : pointer;
  transition   : border-color .2s, background .2s;
}
.jlw-filters select:focus,
.jlw-filters input[type="number"]:focus {
  border-color: var(--jlw-primary);
  background  : var(--jlw-white);
}
.jlw-filters select:hover,
.jlw-filters input[type="number"]:hover {
  border-color: #b26d32;
}

.jlw-price-filter { display:flex; align-items:center; gap:6px; }
.jlw-price-filter label { font-size:.8rem; color:var(--jlw-text-muted); white-space:nowrap; }
.jlw-price-filter input { width:90px; }

/* Search bar 50% (left) + filters 50% (right), same row — all pages */
.jlw-search-filters-row .jlw-search-wrap {
  order    : 1;
  flex     : 0 1 calc(50% - 6px);
  max-width: calc(50% - 6px);
}
.jlw-search-filters-row .jlw-filters-inline {
  order    : 2;
  flex     : 1 1 calc(50% - 6px);
  max-width: calc(50% - 6px);
  min-width: 0;
  margin-bottom: 0;
}
.jlw-search-filters-row .jlw-filters-inline .jlw-filter-group {
  flex-wrap: nowrap;
  width    : 100%;
}
.jlw-search-filters-row .jlw-filters-inline .jlw-filter-group > select,
.jlw-search-filters-row .jlw-filters-inline .jlw-filter-group > .jlw-price-filter {
  flex     : 1 1 0;
  min-width: 0;
}
.jlw-search-filters-row .jlw-filters-inline .jlw-filter-group select {
  width: 100%;
}
.jlw-search-filters-row .jlw-filters-inline .jlw-price-filter { flex: 1 1 0; }
.jlw-search-filters-row .jlw-filters-inline .jlw-price-filter input { width: 100%; min-width: 60px; }

@media (max-width: 900px) {
  .jlw-search-filters-row .jlw-filters-inline .jlw-filter-group { flex-wrap: wrap; }
  .jlw-search-filters-row .jlw-filters-inline .jlw-filter-group > select,
  .jlw-search-filters-row .jlw-filters-inline .jlw-filter-group > .jlw-price-filter {
    flex: 1 1 160px;
  }
}
@media (max-width: 768px) {
  .jlw-search-filters-row .jlw-search-wrap,
  .jlw-search-filters-row .jlw-filters-inline {
    order    : 0;
    flex     : 1 1 100%;
    max-width: 100%;
  }
}

/* ── MAIN LAYOUT ────────────────────────────────────────────────────────── */
.jlw-main {
  display              : grid;
  grid-template-columns: 1fr 420px;
  gap                  : 20px;
  align-items          : start;
}
@media (max-width: 960px) { .jlw-main { grid-template-columns: 1fr; } }

/* Map */
.jlw-map-wrap {
  border-radius: var(--jlw-radius);
  overflow     : hidden;
  box-shadow   : var(--jlw-shadow);
  position     : sticky;
  top          : 20px;
}
#jlw-map { width:100%; z-index:1; }

/* Results panel */
.jlw-results-wrap {
  display       : flex;
  flex-direction: column;
  gap           : 12px;
  max-height    : var(--map-height, 550px);
  overflow-y    : auto;
  padding-right : 4px;
}
.jlw-results-wrap::-webkit-scrollbar       { width:4px; }
.jlw-results-wrap::-webkit-scrollbar-track { background:transparent; }
.jlw-results-wrap::-webkit-scrollbar-thumb { background:var(--jlw-border); border-radius:4px; }

.jlw-results-header {
  display        : flex;
  align-items    : center;
  justify-content: space-between;
}
.jlw-result-count { font-size:.875rem; color:var(--jlw-text-muted); font-weight:500; }

/* View All button — matches tab style but smaller */
.jlw-view-all-btn {
  padding      : 8px 20px;
  border       : 1px solid rgba(10, 10, 10, 0.30);
  border-radius: 50px;
  background   : rgba(255,255,255,.23);
  font-family  : var(--jlw-font);
  font-size    : .8rem;
  color        : #000;
  cursor       : pointer;
  transition   : all .2s;
  white-space  : nowrap;
}
.jlw-view-all-btn:hover { background:#b26d32; border-color:#b26d32; color:var(--jlw-white); }

/* Loading / empty states */
.jlw-loading { display:flex; flex-direction:column; align-items:center; padding:40px 0; }
.jlw-loading[hidden], .jlw-no-results[hidden] { display:none; }

.jlw-spinner {
  width:36px; height:36px;
  border:3px solid var(--jlw-border);
  border-top:3px solid var(--jlw-primary);
  border-radius:50%;
  animation: jlw-spin .7s linear infinite;
}
@keyframes jlw-spin { to { transform:rotate(360deg); } }

.jlw-no-results { text-align:center; padding:40px 20px; color:var(--jlw-text-muted); font-size:.9rem; line-height:1.6; }
.jlw-request-btn {
  display:inline-block; margin-top:14px; padding:10px 24px; border-radius:50px;
  background:var(--jlw-primary); color:var(--jlw-white); font-weight:600; font-size:.85rem;
  text-decoration:none; transition:background .2s;
}
.jlw-request-btn:hover { background:var(--jlw-primary-dark); color:var(--jlw-white); }

/* ── CARDS ───────────────────────────────────────────────────────────────── */
.jlw-cards { display:flex; flex-direction:column; gap:12px; }
.jlw-cards[hidden] { display:none; }

.jlw-card {
  display      : flex;
  height       : 210px;
  background   : var(--jlw-white);
  border       : 1px solid #e5e7eb;
  border-radius: var(--jlw-radius);
  overflow     : hidden;
  cursor       : pointer;
  transition   : box-shadow .2s, border-color .2s, transform .15s;
}
.jlw-card:hover       { box-shadow:var(--jlw-shadow-hover); border-color:var(--jlw-primary); transform:translateY(-1px); }
.jlw-card.is-active   { border-color:var(--jlw-primary); box-shadow:0 0 0 2px var(--jlw-primary); }

.jlw-card__image-wrap { position:relative; flex-shrink:0; width:220px; height:100%; background:var(--jlw-primary-light); }
.jlw-card__image      { width:100%; height:100%; object-fit:contain; object-position:center; display:block; }
.jlw-card__image-placeholder {
  width:100%; height:100%;
  display:flex; align-items:center; justify-content:center;
  font-size:2rem; line-height:1; background:var(--jlw-primary-light);
}

/* Guide cards use a small circular avatar instead of a full rectangular photo */
.jlw-card__image-wrap--guide {
  width:110px; height:100%;
  display:flex; align-items:center; justify-content:center; background:var(--jlw-white);
}
.jlw-card__image--avatar {
  width:64px; height:64px; border-radius:50%; object-fit:cover;
  border:2px solid var(--jlw-white); box-shadow:0 0 0 1px var(--jlw-border);
}
.jlw-card__image-placeholder--guide {
  width:64px; height:64px; min-height:0; border-radius:50%;
  font-size:1.7rem; line-height:1; flex-shrink:0;
}

.jlw-favorite-btn {
  position:absolute; top:6px; right:6px;
  background:rgba(255,255,255,.85); border:none; border-radius:50%;
  width:28px; height:28px; padding:0; font-size:.9rem; line-height:1; cursor:pointer;
  color:#ccc; display:flex; align-items:center; justify-content:center;
  transition:color .2s, background .2s; z-index:10;
}
.jlw-favorite-btn:hover, .jlw-favorite-btn.is-favorite { color:#e53e3e; background:var(--jlw-white); }

.jlw-card__badges { position:absolute; bottom:6px; left:6px; display:flex; flex-wrap:wrap; gap:3px; }

.jlw-card__body {
  flex:1; padding:12px 14px; display:flex; flex-direction:column; gap:6px;
  min-width:0; min-height:0; overflow:hidden;
}

.jlw-card__header { display:flex; align-items:flex-start; gap:6px; justify-content:space-between; flex-shrink:0; }

.jlw-card__title {
  font-size:.9rem; font-weight:600; margin:0; line-height:1.3; flex:1; min-width:0;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.jlw-card__title a { color:var(--jlw-text); text-decoration:none; }
.jlw-card__title a:hover { color:var(--jlw-primary); }

.jlw-card__location {
  font-size:.78rem; color:var(--jlw-text-muted); margin:0; display:flex; align-items:center; gap:4px;
  flex-shrink:0; white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
}
.jlw-card__location svg { flex-shrink:0; }

.jlw-card__bio {
  font-size:.78rem; color:var(--jlw-text-muted); margin:0; line-height:1.4;
  display:-webkit-box; -webkit-line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}

.jlw-tags { display:flex; flex-wrap:nowrap; gap:4px; overflow:hidden; flex-shrink:0; max-width:100%; }

.jlw-card__meta { display:flex; flex-wrap:wrap; gap:6px; align-items:center; overflow:hidden; max-height:2.6em; flex-shrink:0; }
.jlw-meta-item  { font-size:.78rem; color:var(--jlw-text-muted); display:flex; align-items:center; gap:3px; white-space:nowrap; }

.jlw-card__footer { display:flex; align-items:center; justify-content:space-between; gap:8px; margin-top:auto; padding-top:4px; flex-shrink:0; }
.jlw-card__price  { font-size:.875rem; font-weight:700; color:var(--jlw-primary); white-space:nowrap; }

/* ── BUTTONS ─────────────────────────────────────────────────────────────── */
.jlw-btn {
  display:inline-flex; align-items:center; justify-content:center;
  padding:9px 22px; border-radius:50px;
  font-family:var(--jlw-font); font-size:.875rem; font-weight:600;
  text-decoration:none; cursor:pointer; border:none; transition:all .2s; white-space:nowrap;
}
/* Primary CTA — uses the search button color (#4a6834) per design spec */
.jlw-btn--primary { background:var(--jlw-primary); color:var(--jlw-white); }
.jlw-btn--primary:hover { background:var(--jlw-primary-dark); color:var(--jlw-white); }

/* ── BADGES & STATUS ─────────────────────────────────────────────────────── */
.jlw-status { font-size:.7rem; font-weight:600; padding:3px 10px; border-radius:50px; white-space:nowrap; flex-shrink:0; }
.jlw-status--open     { background:#dcfce7; color:#16a34a; }
.jlw-status--full     { background:#fee2e2; color:#dc2626; }
.jlw-status--closed   { background:#f3f4f6; color:#6b7280; }
.jlw-status--seasonal { background:#fef9c3; color:#ca8a04; }

.jlw-badge { font-size:.7rem; font-weight:600; padding:3px 9px; border-radius:50px; white-space:nowrap; }
.jlw-badge--easy     { background:#dcfce7; color:#16a34a; }
.jlw-badge--moderate { background:#fef9c3; color:#ca8a04; }
.jlw-badge--hard     { background:#fed7aa; color:#ea580c; }
.jlw-badge--expert   { background:#fee2e2; color:#dc2626; }
.jlw-badge--type     { background:var(--jlw-primary-light); color:var(--jlw-primary); }
.jlw-badge--program-type      { font-weight:700; }
.jlw-badge--program-cohort    { background:#ede9fe; color:#7c3aed; }
.jlw-badge--program-immersion { background:var(--jlw-primary-light); color:var(--jlw-primary); }
.jlw-badge--program-retreat   { background:#fef9c3; color:#ca8a04; }
.jlw-badge--program-combo     { background:#fed7aa; color:#ea580c; }
.jlw-hero__program-type { display:inline-block; font-weight:700; letter-spacing:.04em; text-transform:uppercase; font-size:.8rem; opacity:.9; }

.jlw-tags { display:flex; flex-wrap:wrap; gap:4px; }
.jlw-tag  { font-size:.7rem; padding:2px 8px; border-radius:50px; white-space:nowrap; }
.jlw-tag--language  { background:#ede9fe; color:#7c3aed; }
.jlw-tag--specialty { background:#e0f2fe; color:#0284c7; }

/* ── RATING ──────────────────────────────────────────────────────────────── */
.jlw-rating { display:flex; align-items:center; gap:1px; flex-shrink:0; }
.jlw-star        { font-size:.85rem; color:#d1d5db; }
.jlw-star--full  { color:#f59e0b; }
.jlw-rating-num  { font-size:.75rem; color:var(--jlw-text-muted); margin-left:4px; }
.jlw-certified   { color:var(--jlw-primary); font-weight:600; }

/* ── SPOTS BAR ───────────────────────────────────────────────────────────── */
.jlw-spots { display:flex; flex-direction:column; gap:3px; width:100%; }
.jlw-spots__bar  { height:5px; background:#e5e7eb; border-radius:10px; overflow:hidden; }
.jlw-spots__fill { height:100%; background:var(--jlw-primary); border-radius:10px; transition:width .4s; }
.jlw-spots__label { font-size:.72rem; color:var(--jlw-text-muted); }
.jlw-urgent { color:#dc2626; }

/* ── PAGINATION ──────────────────────────────────────────────────────────── */
.jlw-load-more {
  display:flex; align-items:center; justify-content:center; gap:10px;
  padding:16px 0; color:var(--jlw-text-muted); font-size:.85rem;
}
.jlw-load-more[hidden] { display:none; }
.jlw-spinner--sm { width:18px; height:18px; border-width:2px; }
.jlw-end-of-results {
  text-align:center; padding:16px 0; color:var(--jlw-text-muted); font-size:.8rem;
}
.jlw-end-of-results[hidden] { display:none; }
#jlw-page-info { font-size:.85rem; color:var(--jlw-text-muted); white-space:nowrap; }

/* ── LEAFLET POPUP ───────────────────────────────────────────────────────── */
.jlw-popup { font-family:var(--jlw-font); font-size:.85rem; line-height:1.5; }
.jlw-popup-link { display:inline-block; margin-top:6px; color:var(--jlw-primary); font-weight:600; text-decoration:none; }
.jlw-marker-icon { background:none; border:none; }

/* ── ACCESSIBILITY ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  * { animation-duration:.01ms !important; animation-iteration-count:1 !important; transition-duration:.01ms !important; }
}

/* ── FOCUS STYLES ───────────────────────────────────────────────────────── */
.jlw-discovery-wrap *:focus-visible {
  outline: 2px solid var(--jlw-primary);
  outline-offset: 2px;
}

/* ── HIGH CONTRAST MODE ─────────────────────────────────────────────────── */
@media (prefers-contrast: more) {
  .jlw-card { border-width: 2px; }
  .jlw-btn { font-weight: 700; }
  .jlw-tab { border-width: 2px; }
}

/* Dark mode auto-switching removed: the site's theme is light-only, and
   partially darkening just the widget (cards/search bar) while the rest of
   the page stayed light created a broken, inconsistent look for visitors
   whose OS/browser is set to dark mode. The widget now always renders with
   its designed light theme regardless of system preference. */

/* ── ANIMATIONS ─────────────────────────────────────────────────────────── */
@keyframes jlw-fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.jlw-card { animation: jlw-fadeIn 0.3s ease-out; }
.jlw-loading { animation: jlw-spinner 0.8s linear infinite; }

/* ── RESPONSIVE ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .jlw-topbar { flex-direction:column; align-items:stretch; }
  .jlw-tabs   { overflow-x:auto; flex-wrap:nowrap; }
  .jlw-tab    { flex:0 0 auto; padding:12px 28px; font-size:.875rem; }
  .jlw-search-wrap { max-width:100%; }
  .jlw-card__image-wrap { width:140px; }
  .jlw-main { flex-direction: column; }
  .jlw-map-wrap { height: 400px !important; }
}
@media (max-width: 480px) {
  .jlw-tab  { padding:10px 18px; }
  .jlw-card { flex-direction:column; height:380px; }
  .jlw-card__image-wrap { width:100%; height:150px; }
  .jlw-topbar { padding: 12px 0 8px; }
  .jlw-search-wrap { max-width: 100%; }
}


/* Expired programs (already started / ended) */
.jlw-status--expired { background: #eef0f2; color: #6b7280; border-color: #d1d5db; }


/* "You are here" marker (Near Me) */
.jlw-user-location-icon { position: relative; }
.jlw-user-dot {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: #4285F4; border: 3px solid #fff;
  box-shadow: 0 0 4px rgba(0,0,0,.4);
  z-index: 2;
}
.jlw-user-pulse {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  width: 14px; height: 14px; border-radius: 50%;
  background: rgba(66,133,244,.35);
  animation: jlw-user-pulse 1.8s ease-out infinite;
  z-index: 1;
}
@keyframes jlw-user-pulse {
  0%   { transform: translate(-50%, -50%) scale(1);   opacity: .8; }
  100% { transform: translate(-50%, -50%) scale(4);   opacity: 0;  }
}

/* Clear filters button */
.jlw-clear-filters{padding:10px 16px;border:1px solid #4A6834;border-radius:30px;background:transparent;color:#4A6834;font-size:14px;line-height:1.2;cursor:pointer;white-space:nowrap;transition:background .2s,color .2s}
.jlw-clear-filters:hover{background:#4A6834;color:#fff}
.jlw-search-filters-row .jlw-filters-inline{display:flex;align-items:center;gap:10px}
.jlw-search-filters-row .jlw-filters-inline .jlw-filter-group{flex:1 1 0;min-width:0;width:auto}
.jlw-search-filters-row .jlw-filters-inline .jlw-clear-filters{flex:0 0 auto}

/* Mobile / tablet layout for the directory maps: map above a scrollable list, stacked filters */
@media (max-width: 960px) {
  .jlw-main { display: flex !important; flex-direction: column; gap: 16px; }
  .jlw-map-wrap { height: 340px !important; min-height: 0 !important; width: 100%; }
  .jlw-map-wrap #jlw-map { height: 340px !important; }
  .jlw-results-wrap { max-height: 560px !important; overflow-y: auto !important; width: 100%; }
  .jlw-search-filters-row { flex-direction: column; align-items: stretch; }
  .jlw-search-filters-row .jlw-search-wrap,
  .jlw-search-filters-row .jlw-filters-inline { flex: 1 1 auto !important; max-width: 100% !important; width: 100%; }
  .jlw-search-filters-row .jlw-filters-inline { flex-direction: column; align-items: stretch; gap: 10px; }
  .jlw-search-filters-row .jlw-filters-inline .jlw-filter-group { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; }
  .jlw-search-filters-row .jlw-filters-inline .jlw-filter-group > * { min-width: 0; }
  .jlw-search-filters-row .jlw-filters-inline .jlw-filter-group > select { width: 100%; }
  .jlw-search-filters-row .jlw-filters-inline .jlw-clear-filters { width: 100%; }
  .jlw-search-wrap .jlw-main-search { border: 0 !important; box-shadow: none !important; background: transparent !important; min-width: 0; }
}
