.worq-locations {
  --wq-loc-gap: 1.25rem;
  --wq-loc-fg: #1a1a1a;
  --wq-loc-muted: #5c5c5c;
  --wq-loc-accent: #fdb813;
  --wq-loc-border: rgba(36, 53, 47, 0.12);
  --wq-loc-bg: #fff;
  position: relative;
  color: var(--wq-loc-fg);
  margin: 0 auto 2.5rem;
  max-width: 72rem;
  padding: 0 1.25rem;
  z-index: 2;
}

.worq-locations--search {
  max-width: min(1280px, 100%);
  margin-top: 1.5rem;
}

.wq-locations-page {
  /* Clear fixed site header (+ WP admin bar when present). */
  padding: calc(var(--wq-header-h, 76px) + var(--wp-admin--admin-bar--height, 0px) + 4.75rem) 0 3.5rem;
}

body.admin-bar .wq-locations-page {
  padding-top: calc(var(--wq-header-h, 76px) + 32px + 4.75rem);
}

@media screen and (max-width: 782px) {
  body.admin-bar .wq-locations-page {
    padding-top: calc(var(--wq-header-h, 76px) + 46px + 4.75rem);
  }
}

.wq-locations-page .worq-locations--search {
  margin-top: 0;
}

.worq-locations__header {
  text-align: center;
  margin-bottom: 1.25rem;
}

.worq-locations__eyebrow {
  margin: 0 0 0.35rem;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--wq-loc-muted);
}

.worq-locations__title {
  font-size: clamp(1.5rem, 2.4vw, 2.1rem);
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.worq-locations__lead {
  margin: 0;
  color: var(--wq-loc-muted);
}

.worq-finder__bar {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(12rem, 0.9fr) auto;
  gap: 0.85rem;
  align-items: end;
  margin-bottom: 1.5rem;
  padding: 1rem 1.1rem;
  background: var(--wq-loc-bg);
  border: 1px solid var(--wq-loc-border);
  border-radius: 1.25rem;
  box-shadow: 0 18px 40px rgba(28, 42, 37, 0.12);
}

.worq-locations__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  min-width: 0;
}

.worq-locations__field--query {
  gap: 0;
}

.worq-locations__field label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--wq-loc-muted);
}

.worq-locations__field select,
.worq-locations__field input[type="text"],
.worq-locations__field input[type="search"],
.worq-locations__submit,
.worq-locations__btn {
  min-height: 52px;
  min-width: 48px;
  font: inherit;
}

.worq-locations__field select {
  width: 100%;
  padding: 0.65rem 0.9rem;
  border: 1px solid var(--wq-loc-border);
  border-radius: 999px;
  background: #faf9f6;
}

.worq-finder__query {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.worq-finder__query-icon {
  position: absolute;
  left: 1.05rem;
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  color: #1a1a1a;
  pointer-events: none;
  z-index: 1;
}

.worq-finder__query input[type="text"],
.worq-finder__query input[type="search"] {
  width: 100%;
  padding: 0.75rem 1.15rem 0.75rem 2.85rem;
  border: 1px solid rgba(26, 26, 26, 0.18);
  border-radius: 999px;
  background: #fff;
  color: var(--wq-loc-fg);
  appearance: none;
}

.worq-finder__query input::placeholder {
  color: rgba(26, 26, 26, 0.45);
}

.worq-finder__query input:hover {
  border-color: rgba(26, 26, 26, 0.28);
}

.worq-finder__places {
  position: absolute;
  top: calc(100% + 0.45rem);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: min(320px, 55vh);
  overflow: auto;
  padding: 0.55rem 0;
  background: #fff;
  border: 1px solid rgba(26, 26, 26, 0.1);
  border-radius: 1rem;
  box-shadow: 0 18px 40px rgba(28, 42, 37, 0.16);
}

.worq-finder__places-heading {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  padding: 0.35rem 1rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(26, 26, 26, 0.55);
}

.worq-finder__places-heading svg {
  flex: 0 0 auto;
}

.worq-finder__place {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  width: 100%;
  margin: 0;
  padding: 0.7rem 1rem;
  border: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.worq-finder__place:hover,
.worq-finder__place.is-active,
.worq-finder__place[aria-selected="true"] {
  background: rgba(36, 53, 47, 0.06);
}

.worq-finder__place-name {
  font-weight: 700;
  color: #24352f;
  line-height: 1.25;
}

.worq-finder__place-meta {
  font-size: 0.9rem;
  color: rgba(26, 26, 26, 0.55);
  line-height: 1.3;
}

.worq-finder__places-empty {
  margin: 0;
  padding: 0.75rem 1rem 0.35rem;
  color: var(--wq-loc-muted);
  font-size: 0.92rem;
}

.worq-finder__search {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0 1.25rem;
  border: 0;
  border-radius: 999px;
  background: #24352f;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

.worq-finder__search:hover {
  background: #1c2a25;
}

.worq-locations__field select:focus,
.worq-finder__query input:focus,
.worq-locations__btn:focus,
.worq-finder__search:focus {
  outline: 2px solid var(--wq-loc-accent);
  outline-offset: 2px;
}

.worq-locations__clear {
  display: none !important;
}

.worq-locations__status {
  min-height: 1.25rem;
  margin: 0 0 0.75rem;
  color: var(--wq-loc-muted);
  font-size: 0.9rem;
}

.worq-locations__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--wq-loc-gap);
  align-items: stretch;
}

.worq-locations__actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  align-items: stretch;
  justify-content: end;
  margin-top: auto;
  padding-top: 0.35rem;
}

.worq-locations__clear {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wq-loc-muted);
  text-align: center;
}

.worq-locations__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.worq-locations__view-toggle {
  display: inline-flex;
  border: 1px solid var(--wq-loc-border);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.worq-locations__view-btn {
  border: 0;
  background: transparent;
  padding: 0.55rem 1rem;
  font-weight: 700;
  cursor: pointer;
  color: var(--wq-loc-muted);
}

.worq-locations__view-btn.is-active {
  background: #24352f;
  color: #fff;
}

.worq-locations__status {
  margin: 0;
  min-height: 1.25rem;
  color: var(--wq-loc-muted);
  font-size: 0.9rem;
}

.worq-locations__results {
  display: block;
}

@media (min-width: 960px) {
  .worq-locations__results.is-split,
  .worq-locations__results[data-active-view="map"] {
    display: grid;
    grid-template-columns: minmax(21rem, 26rem) minmax(0, 1fr);
    gap: 1rem;
    align-items: stretch;
    height: calc(100dvh - var(--wq-header-h, 76px) - var(--wp-admin--admin-bar--height, 0px) - 14.75rem);
    min-height: 28rem;
    max-height: 46rem;
  }

  .worq-locations__results.is-split .worq-locations__grid,
  .worq-locations__results[data-active-view="map"] .worq-locations__grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-height: none;
    height: 100%;
    min-height: 0;
    overflow: auto;
    padding-right: 0.15rem;
    align-items: stretch;
    align-content: flex-start;
    scrollbar-width: thin;
    scrollbar-color: rgba(36, 53, 47, 0.28) transparent;
  }

  .worq-locations__results.is-split .worq-locations__map-panel,
  .worq-locations__results[data-active-view="map"] .worq-locations__map-panel {
    position: relative;
    top: auto;
    height: 100%;
    min-height: 0;
    align-self: stretch;
  }

  .worq-locations__results.is-split .worq-locations__map-canvas,
  .worq-locations__results.is-split .worq-locations__map-canvas .leaflet-container,
  .worq-locations__results[data-active-view="map"] .worq-locations__map-canvas,
  .worq-locations__results[data-active-view="map"] .worq-locations__map-canvas .leaflet-container {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100% !important;
    min-height: 0;
  }
}

.worq-locations__map-panel {
  position: relative;
  min-height: 420px;
  border: 1px solid var(--wq-loc-border);
  border-radius: 1rem;
  overflow: hidden;
  background: #f6f3ec;
}

.worq-locations__map-canvas {
  width: 100%;
  min-height: 28rem;
  height: 100%;
  z-index: 0;
}

.worq-locations__map-canvas .leaflet-container {
  width: 100%;
  height: 100%;
  min-height: 28rem;
  font: inherit;
  background: #ece7dc;
}

.worq-map-pin {
  background: none !important;
  border: 0 !important;
}

.worq-map-pin__mark {
  display: block;
  width: 1.15rem;
  height: 1.15rem;
  margin: 0.2rem auto 0;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: var(--wq-loc-accent);
  border: 2px solid #24352f;
  box-shadow: 0 6px 14px rgba(28, 42, 37, 0.28);
}

.worq-map-pin.is-active .worq-map-pin__mark {
  transform: rotate(-45deg) scale(1.18);
  box-shadow: 0 8px 18px rgba(253, 184, 19, 0.45);
}

.worq-locations__map-canvas .leaflet-popup-content-wrapper {
  border-radius: 0.85rem;
  box-shadow: 0 14px 32px rgba(28, 42, 37, 0.16);
  padding: 0;
}

.worq-locations__map-canvas .leaflet-popup-content {
  margin: 0.85rem 1rem;
  font: inherit;
  line-height: 1.35;
  color: #24352f;
}

.worq-locations__map-canvas .leaflet-popup-content a {
  display: inline-block;
  margin-top: 0.35rem;
  color: #24352f;
  font-weight: 700;
}

.worq-locations__map-empty,
.worq-locations__map-unavailable {
  position: absolute;
  inset: auto 1rem 1rem;
  z-index: 500;
  margin: 0;
  padding: 0.75rem 1rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--wq-loc-border);
  text-align: center;
  color: var(--wq-loc-muted);
  font-weight: 600;
  box-shadow: 0 10px 24px rgba(28, 42, 37, 0.12);
}

.worq-locations__card {
  border: 1px solid var(--wq-loc-border);
  border-radius: 1rem;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  box-shadow: 0 10px 28px rgba(28, 42, 37, 0.06);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.worq-locations__card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(28, 42, 37, 0.12);
}

.worq-locations .worq-locations__media {
  position: relative;
  aspect-ratio: 4 / 3;
  width: 100%;
  overflow: hidden;
  flex: 0 0 auto;
  background:
    linear-gradient(145deg, rgba(253, 184, 19, 0.18), transparent 55%),
    #efebe3;
}

.worq-locations .worq-locations__thumb {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center;
  display: block;
}

.worq-locations__fallback {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 1rem;
  text-align: center;
  color: #24352f;
  background:
    radial-gradient(circle at 50% 30%, rgba(253, 184, 19, 0.28), transparent 48%),
    linear-gradient(165deg, #f8f4ec 0%, #ebe3d4 100%);
}

.worq-locations__fallback-icon {
  display: inline-flex;
  color: #24352f;
  opacity: 0.88;
}

.worq-locations__fallback-mark {
  font-size: 0.95rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.worq-locations__fallback-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: #5c5c5c;
}

.worq-locations__fallback-place {
  display: none;
}

.worq-locations__promo {
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem;
  font-weight: 700;
  z-index: 1;
}

.worq-locations__body {
  padding: 1.05rem 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1 1 auto;
  min-height: 0;
}

.worq-locations__title-row {
  display: block;
}

.worq-locations__name {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
  color: #24352f;
}

.worq-locations__office-count {
  margin: 0;
  white-space: nowrap;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--wq-loc-muted);
}

.worq-locations__summary {
  margin: 0;
  color: #3d4a45;
  font-size: 0.88rem;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.worq-locations__view {
  white-space: nowrap;
  font-size: 0.85rem;
  font-weight: 700;
  color: #24352f;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.worq-locations__meta,
.worq-locations__address,
.worq-locations__phone {
  margin: 0;
  color: var(--wq-loc-muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.worq-locations__meta {
  font-weight: 600;
}

.worq-locations__address {
  color: #6a736e;
}

.worq-locations__price {
  margin: 0.15rem 0 0;
  font-weight: 700;
  color: #24352f;
  font-size: 0.95rem;
}

.worq-locations__badge {
  display: inline-block;
  margin: 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #f3f1eb;
  font-size: 0.75rem;
  font-weight: 700;
}

.worq-locations__chips {
  list-style: none;
  margin: 0.35rem 0 0.5rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.worq-locations__chip,
.worq-locations__chips li {
  padding: 0.25rem 0.55rem;
  border-radius: 999px;
  background: #f6f3ec;
  font-size: 0.75rem;
  font-weight: 600;
  list-style: none;
}

.worq-locations__chip.is-matched {
  background: var(--wq-loc-accent);
  color: #1a1a1a;
}

.worq-locations__chip--more {
  background: transparent;
  border: 1px solid var(--wq-loc-border);
  color: var(--wq-loc-muted);
  font-weight: 700;
}

.worq-locations__toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.worq-locations__count {
  margin: 0;
  font-weight: 700;
  color: var(--wq-loc-muted);
  font-size: 0.92rem;
}

.worq-locations__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0;
  padding: 0.8rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.95rem;
  box-sizing: border-box;
}

.worq-locations__btn--primary {
  background: var(--wq-loc-accent);
  color: #1a1a1a;
}

.worq-finder__map-fab {
  position: sticky;
  bottom: 1.25rem;
  display: inline-flex;
  margin: 1.25rem auto 0;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.85rem 1.35rem;
  border-radius: 999px;
  background: #24352f;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 10px 28px rgba(28, 42, 37, 0.25);
  z-index: 5;
}

.worq-finder__map {
  margin-top: 1rem;
  border-radius: 1rem;
  overflow: hidden;
  border: 1px solid var(--wq-loc-border);
  background: #fff;
  padding: 0.75rem;
}

.worq-finder__map iframe {
  width: 100%;
  min-height: 280px;
  border: 0;
  border-radius: 0.75rem;
}

.worq-locations__empty {
  grid-column: 1 / -1;
  padding: 2rem;
  text-align: center;
  color: var(--wq-loc-muted);
}

@media (max-width: 959px) {
  .worq-locations__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .worq-locations__results.is-split,
  .worq-locations__results[data-active-view="map"] {
    display: block;
  }

  .worq-locations__results[data-active-view="map"] .worq-locations__grid {
    display: none;
  }

  .worq-locations__results.is-split .worq-locations__map-panel,
  .worq-locations__results[data-active-view="map"] .worq-locations__map-panel {
    position: relative;
    min-height: min(70vh, 32rem);
    height: min(70vh, 32rem);
  }

  .worq-locations__results.is-split .worq-locations__map-canvas,
  .worq-locations__results.is-split .worq-locations__map-canvas .leaflet-container,
  .worq-locations__results[data-active-view="map"] .worq-locations__map-canvas,
  .worq-locations__results[data-active-view="map"] .worq-locations__map-canvas .leaflet-container {
    position: absolute;
    inset: 0;
    min-height: 0;
    height: 100% !important;
  }
}

@media (max-width: 900px) {
  .worq-finder__bar {
    grid-template-columns: 1fr;
    border-radius: 1.25rem;
  }

  .worq-finder__search {
    width: 100%;
  }

  /* Search filters scroll with the page (not sticky over content). */
  .worq-locations__filters {
    position: static;
    top: auto;
    z-index: auto;
  }
}

@media (max-width: 640px) {
  .worq-locations__grid {
    grid-template-columns: 1fr;
  }
}

/* Map split tickets — placed after base card/media rules so overrides win. */
@media (min-width: 960px) {
  .worq-locations--search .worq-locations__results.is-split .worq-locations__card,
  .worq-locations--search .worq-locations__results[data-active-view="map"] .worq-locations__card {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: stretch;
    width: 100%;
    height: auto;
    min-height: 0;
    cursor: pointer;
    box-shadow: 0 8px 22px rgba(28, 42, 37, 0.06);
  }

  .worq-locations--search .worq-locations__results.is-split .worq-locations__card:hover,
  .worq-locations--search .worq-locations__results[data-active-view="map"] .worq-locations__card:hover {
    transform: none;
  }

  .worq-locations--search .worq-locations__results.is-split .worq-locations__card.is-active,
  .worq-locations--search .worq-locations__results[data-active-view="map"] .worq-locations__card.is-active {
    border-color: rgba(253, 184, 19, 0.8);
    box-shadow: 0 0 0 2px rgba(253, 184, 19, 0.35), 0 12px 28px rgba(253, 184, 19, 0.16);
  }

  .worq-locations--search .worq-locations__results.is-split .worq-locations__media,
  .worq-locations--search .worq-locations__results[data-active-view="map"] .worq-locations__media {
    flex: 0 0 6.5rem;
    width: 6.5rem;
    max-width: 6.5rem;
    aspect-ratio: 1;
    align-self: stretch;
  }

  .worq-locations--search .worq-locations__results.is-split .worq-locations__body,
  .worq-locations--search .worq-locations__results[data-active-view="map"] .worq-locations__body {
    flex: 1 1 auto;
    min-width: 0;
    padding: 0.7rem 0.85rem 0.75rem;
    gap: 0.15rem;
    justify-content: center;
  }

  .worq-locations--search .worq-locations__results.is-split .worq-locations__name,
  .worq-locations--search .worq-locations__results[data-active-view="map"] .worq-locations__name {
    font-size: 0.95rem;
    line-height: 1.2;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  .worq-locations--search .worq-locations__results.is-split .worq-locations__meta,
  .worq-locations--search .worq-locations__results.is-split .worq-locations__address,
  .worq-locations--search .worq-locations__results[data-active-view="map"] .worq-locations__meta,
  .worq-locations--search .worq-locations__results[data-active-view="map"] .worq-locations__address {
    font-size: 0.76rem;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .worq-locations--search .worq-locations__results.is-split .worq-locations__summary,
  .worq-locations--search .worq-locations__results.is-split .worq-locations__chips,
  .worq-locations--search .worq-locations__results[data-active-view="map"] .worq-locations__summary,
  .worq-locations--search .worq-locations__results[data-active-view="map"] .worq-locations__chips {
    display: none;
  }

  .worq-locations--search .worq-locations__results.is-split .worq-locations__actions,
  .worq-locations--search .worq-locations__results[data-active-view="map"] .worq-locations__actions {
    margin-top: 0.15rem;
    padding-top: 0;
    align-items: flex-start;
  }

  .worq-locations--search .worq-locations__results.is-split .worq-locations__btn,
  .worq-locations--search .worq-locations__results[data-active-view="map"] .worq-locations__btn {
    width: auto;
    align-self: flex-start;
    margin-top: 0;
    padding: 0.35rem 0.75rem;
    font-size: 0.75rem;
    min-height: 0;
  }
}

.worq-city__sub {
  margin: 2rem 0 0.75rem;
  font-size: 1.35rem;
}

.worq-city__map [data-worq-city-map] {
  height: 360px;
  min-height: 360px;
  border-radius: 12px;
  overflow: hidden;
  background: #ece7dc;
}

.worq-city__map [data-worq-city-map].leaflet-container,
.worq-city__map [data-worq-city-map] .leaflet-container {
  height: 360px !important;
  width: 100%;
}

.worq-city__map [data-worq-city-map] a {
  display: none;
}

.worq-city__faq {
  border-bottom: 1px solid var(--wq-loc-border, rgba(36, 53, 47, 0.12));
  padding: 0.75rem 0;
}

.worq-city__faq summary {
  cursor: pointer;
  font-weight: 600;
}

.worq-locations__badge {
  display: inline-block;
  margin: 0.35rem 0 0;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: #fdb813;
  color: #1a1a1a;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
