/* Company locator — split list + map layout */

.dir-locator-hero,
.dir-locator-shell {
  padding-top: 0;
  padding-bottom: 0;
}

.dir-locator-shell {
  padding-bottom: clamp(40px, 6vw, 80px);
}

.dir-locator-hero {
  padding: 24px 0 16px;
}

.dir-locator-hero .dir-page-title {
  font-size: clamp(28px, 4vw, 40px);
  margin-bottom: 8px;
}

.dir-locator-hero .lead {
  margin-bottom: 0;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dir-locator-layout {
  display: grid;
  grid-template-columns: minmax(300px, 380px) minmax(0, 1fr);
  gap: 0;
  height: clamp(520px, calc(100vh - var(--nav-h) - 220px), 820px);
  max-height: clamp(520px, calc(100vh - var(--nav-h) - 220px), 820px);
  border: 1px solid var(--border-light);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  margin-bottom: clamp(40px, 6vw, 80px);
}

.dir-locator-layout > * {
  min-height: 0;
}

.dir-locator-list-panel {
  border-right: 1px solid var(--border-light);
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  background: var(--surface);
}

.dir-locator-map-panel {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  background: var(--secondary);
}

.dir-locator-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.dir-locator-map-fallback {
  display: grid;
  place-items: center;
  min-height: 240px;
  padding: 24px;
  color: var(--text-secondary);
  text-align: center;
}

.dir-locator-toolbar {
  padding: 16px;
  border-bottom: 1px solid var(--border-light);
  display: grid;
  gap: 12px;
  flex-shrink: 0;
}

.dir-locator-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: min(168px, 30vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

.dir-filter-chip {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--r-full);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 13px;
  font-weight: 500;
  color: var(--text-secondary);
}

.dir-filter-chip.is-active,
.dir-filter-chip:hover,
.dir-filter-chip:focus-visible {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

.dir-locator-scroll {
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.dir-brand-group + .dir-brand-group {
  border-top: 1px solid var(--border-light);
}

.dir-brand-group__toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  text-align: left;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
  color: var(--text-primary);
  background: var(--secondary);
}

.dir-brand-group__count {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

.dir-location-row-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--border-light);
  padding-right: 12px;
}

.dir-location-row__actions {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  flex-shrink: 0;
}

.dir-location-row__details-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}

.dir-location-row__details-btn:hover,
.dir-location-row__details-btn:focus-visible {
  background: var(--secondary);
  border-color: var(--primary);
  color: var(--primary);
  outline: none;
}

.dir-location-row {
  display: block;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
  transition: background-color .15s ease;
}

.dir-location-row__map-btn {
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  white-space: nowrap;
}

.dir-location-row__map-btn:hover,
.dir-location-row__map-btn:focus-visible {
  background: var(--primary-light);
  border-color: var(--primary);
  outline: none;
}

.dir-location-row:hover,
.dir-location-row:focus-visible,
.dir-location-row.is-active {
  background: var(--primary-light);
  outline: none;
}

.dir-location-row__name {
  font-weight: 600;
  color: var(--text-primary);
}

.dir-location-row__address {
  margin-top: 4px;
  font-size: 14px;
  color: var(--text-secondary);
  line-height: 1.45;
}

.dir-location-row__notice {
  margin-top: 6px;
  font-size: 12px;
  color: var(--text-tertiary);
}

.dir-locator-tabs {
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 12px 16px 0;
}

.dir-locator-tab {
  min-height: 44px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  font-weight: 600;
  color: var(--text-secondary);
}

.dir-locator-tab.is-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.dir-locator-empty {
  padding: 32px 16px;
  text-align: center;
  color: var(--text-secondary);
}

@media (max-width: 768px) {
  .dir-locator-layout {
    grid-template-columns: 1fr;
    height: auto;
    max-height: none;
  }

  .dir-locator-list-panel {
    border-right: none;
    border-bottom: 1px solid var(--border-light);
    max-height: 55vh;
  }

  .dir-locator-tabs {
    display: grid;
  }

  .js-enabled .dir-locator-list-panel.is-map-active {
    display: none;
  }

  .js-enabled .dir-locator-map-panel {
    display: none;
    position: relative;
    min-height: 60vh;
    height: 60vh;
  }

  .js-enabled .dir-locator-map-panel.is-active {
    display: block;
  }

  .js-enabled .dir-locator-map-panel.is-active .dir-locator-map {
    min-height: 60vh;
  }
}

@media (min-width: 769px) {
  .dir-locator-map-fallback {
    position: absolute;
    inset: 0;
  }
}
