/*
  Branch Locator (branch_locator_implementation.md §9)
  Feature-scoped stylesheet — BEM-ish naming, no ID-based selectors,
  tokens follow the theme's custom properties.
*/

.branch-map {
  height: 520px;
  min-height: 380px;
  width: 100%;
  border-radius: 0.5rem;
  z-index: 0; /* keep Leaflet panes below Bootstrap dropdowns/modals */
}

.branch-list {
  max-height: 520px;
  overflow-y: auto;
}

.branch-list__item {
  cursor: pointer;
  border-left: 3px solid transparent;
}

.branch-list__item:hover,
.branch-list__item:focus-visible {
  background-color: var(--phoenix-secondary-bg, rgba(0, 0, 0, 0.03));
}

.branch-list__item--active {
  border-left-color: var(--phoenix-primary, #4357ad);
  background-color: var(--phoenix-tertiary-bg, rgba(67, 87, 173, 0.06));
}

.branch-list__name {
  font-weight: 600;
}

.branch-list__meta {
  font-size: 0.8125rem;
  color: var(--phoenix-gray-600, #6b7a99);
}

.branch-status {
  min-height: 1.25rem;
}

.branch-status--error {
  color: var(--phoenix-danger, #d63384);
}

/* Tile-failure fallback notice (§10) — overlays the map, never blocks the list */
.branch-tile-warning {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  max-width: 90%;
  padding: 0.5rem 0.9rem;
  border-radius: 0.5rem;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.12);
  font-size: 0.875rem;
  z-index: 1000; /* above Leaflet panes (400–700) */
}

/* Marker visuals (divIcon — no image assets needed, CSP-friendly) */
.branch-marker {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background-color: var(--phoenix-primary, #4357ad);
  color: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  font-size: 14px;
}

.branch-marker--selected {
  background-color: var(--phoenix-warning, #f7cf51);
  color: #212529;
}

.branch-marker--user {
  background-color: var(--phoenix-success, #38b63d);
  outline: 3px solid rgba(56, 182, 61, 0.3);
  font-size: 12px;
}

@media (max-width: 991.98px) {
  .branch-map {
    height: 380px;
  }

  .branch-list {
    max-height: 320px;
  }
}
