.locatorFrame {
  border: 1px solid var(--app-locator-frame-border);
  background: var(--app-locator-frame-bg);
}

.locatorListShell {
  height: 90vh;
}

.mapContainer {
  min-height: 75vh;
  min-width: 0;
  border-left: 1px solid var(--app-locator-map-border);
  height: 100%;
  width: 100%;
  z-index: 1;
  position: relative;
}

#map {
  width: 100%;
  height: 100%;
  z-index: 1;
}

#map:focus-visible {
  outline: none;
}

.shelter-item {
  padding: 12px 14px 11px;
  border-bottom: 1px solid var(--app-locator-item-border);
  cursor: pointer;
  min-height: 96px;
  transition: background-color .18s ease, border-color .18s ease, transform .18s ease, box-shadow .18s ease;
  background: var(--app-locator-item-bg);
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
}

.shelter-item:hover {
  border-left-color: var(--app-accent) !important;
  border-right-color: var(--app-accent) !important;
  background: var(--app-locator-item-hover-bg);
  transform: translateX(1px);
  box-shadow: inset 0 0 0 1px var(--app-locator-item-hover-border);
}

.shelter-item.belongsTo {
  background-color: var(--app-locator-belongs-bg);
  border-left-color: var(--bs-success);
  border-right-color: var(--bs-success);
  color: var(--app-locator-belongs-text);
}

.shelter-item.unmappable {
  opacity: 0.66;
}

.shelter-item.active {
  background-color: var(--app-locator-item-hover-bg) !important;
  border-left-color: var(--app-locator-item-active-border) !important;
  border-right-color: var(--app-locator-item-active-border) !important;
  color: var(--app-locator-title) !important;
  box-shadow: inset 0 0 0 1px var(--app-locator-item-hover-border);
  transform: translateX(1px);
}

.shelter-name {
  font-weight: 700;
  font-size: .95rem;
  line-height: 1.1;
  color: var(--app-locator-title);
}

.shelter-address {
  font-size: .8rem;
  line-height: 1.25;
  color: var(--app-locator-muted);
  margin-top: .45rem;
}

.shelter-card-head {
  display: flex;
  align-items: flex-start;
  gap: .65rem;
}

.shelter-avatar {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  font-size: .88rem;
  color: var(--app-locator-title);
  background: linear-gradient(145deg, #2d7ddb, #1a5fb1);
  box-shadow: 0 5px 10px rgba(0, 70, 160, .25);
  flex: 0 0 auto;
}

.shelter-title-wrap {
  min-width: 0;
}

.shelter-meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem;
  margin-top: .3rem;
}

.shelter-chip {
  font-size: .63rem;
  line-height: 1;
  padding: .28rem .4rem;
  border-radius: 999px;
  border: 1px solid var(--app-chip-border);
  color: var(--app-locator-text);
  background: var(--app-chip-bg);
  letter-spacing: .02em;
}

.shelter-chip.neutral {
  color: var(--app-locator-chip-neutral);
}

.shelter-chip.belongs {
  color: var(--app-locator-belongs-text);
  background: var(--app-locator-belongs-bg);
  border-color: var(--app-locator-belongs-border);
}

.shelter-chip.map-ready {
  color: var(--app-locator-text);
  background: var(--app-chip-bg);
  border-color: var(--app-chip-border);
}

.shelter-chip.map-missing {
  color: var(--app-locator-missing-text);
  background: var(--app-locator-missing-bg);
  border-color: var(--app-locator-missing-border);
}

.shelter-chip i {
  margin-right: .2rem;
}

/* Map Control Panel */
#mapControlPanel {
  position: absolute;
  top: 10px;
  right: 10px;
  background-color: var(--app-surface-1);
  border-radius: 4px;
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
  padding: 10px;
  z-index: 1000;
  width: 250px;
  max-height: 80vh;
  overflow-y: auto;
}

#mapControlPanel .header {
  cursor: move;
  padding: 5px;
  border-radius: 3px;
  margin-bottom: 10px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--bs-primary-text-emphasis);
}

.map-layer-group {
  border-bottom: 1px solid var(--app-border);
}

.map-layer-group h5 {
  font-size: 14px;
  margin-bottom: 8px;
}

#collapseBtn {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: 16px;
}

#mapControlPanel {
  /*width: auto;*/
  background-color: var(--app-surface-1);
  overflow-y: auto;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
  transition: width 0.3s ease;
  position: absolute;
  top: 10px;
  right: 10px;
  border-radius: 6px;
  max-height: calc(100vh - 20px);
  z-index: 2;
}

#mapControlPanel.collapsed {
  width: 40px;
  overflow: hidden;
}

#dragHandle {
  padding: 12px 15px;
  background-color: var(--app-surface-2);
  color: var(--app-text-primary);
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: move;
  border-radius: 6px 6px 0 0;
}

#collapseBtn {
  background: none;
  border: none;
  color: var(--app-text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 0 5px;
}

#collapseBtn:focus {
  outline: none;
}


.form-check {
  display: flex;
  align-items: center;
  margin-bottom: 0;
}

.form-check-input {
  margin-right: 10px;
}

.form-check-label {
  font-size: 13px;
  color: var(--app-text-primary);
}

.form-check-input[type="radio"] {
  appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--app-text-muted);
  outline: none;
  margin-top: 0;
}

.form-check-input[type="radio"]:checked {
  border-color: var(--app-accent);
  background-color: var(--app-accent);
  box-shadow: inset 0 0 0 3px var(--app-surface-1);
}

.form-switch .form-check-input {
  width: 36px;
  height: 18px;
  border-radius: 34px;
  background-color: var(--app-border);
  border: none;
  position: relative;
  transition: background-color 0.3s;
  cursor: pointer;
  margin-top: 0;
  appearance: none;
}

.form-switch .form-check-input::before {
  content: '';
  position: absolute;
  height: 14px;
  width: 14px;
  left: 2px;
  bottom: 2px;
  background-color: white;
  border-radius: 50%;
  transition: 0.3s;
}

.form-switch .form-check-input:checked {
  background-color: var(--app-accent-strong);
}

.form-switch .form-check-input:checked::before {
  transform: translateX(18px);
}

#resetMapBtn {
  background-color: var(--app-surface-2);
  color: var(--app-text-primary);
  border: 1px solid var(--app-border);
  padding: 8px;
  border-radius: 4px;
  cursor: pointer;
  margin: 10px 15px;
  font-size: 13px;
  transition: background-color 0.2s;
}

#resetMapBtn:hover {
  background-color: var(--app-surface-hover);
}

#controlsContent {
  max-height: calc(100vh - 100px);
}

.locatorListHeader {
  background: var(--app-locator-list-header-bg);
  color: var(--app-locator-title);
  border-bottom-color: var(--app-locator-list-header-border) !important;
}

.locatorListTitle {
  font-size: .95rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.locatorListCount {
  font-size: .82rem;
  opacity: .88;
}

.locatorTopRow {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .6rem;
}

.locatorCountryWrap {
  align-self: center;
  min-width: 120px;
  max-width: 150px;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.locatorCountrySelect {
  width: 100%;
  border: 1px solid var(--app-border-strong);
  border-radius: 8px;
  background: var(--app-surface-2);
  color: var(--app-text-primary);
  padding: .28rem .5rem;
  font-size: .78rem;
  outline: none;
}

.locatorCountrySelect:disabled {
  opacity: 1;
  color: var(--app-text-secondary);
}

.locatorSearchWrap {
  position: relative;
}

.locatorSearchIcon {
  position: absolute;
  left: .65rem;
  top: 50%;
  transform: translateY(-50%);
  font-size: .82rem;
  color: var(--app-text-muted);
}

.locatorSearchInput {
  width: 100%;
  border: 1px solid var(--app-border-strong);
  border-radius: 8px;
  background: var(--app-surface-2);
  color: var(--app-text-primary);
  padding: .45rem .65rem .45rem 2rem;
  font-size: .84rem;
  outline: none;
}

.locatorSearchInput::placeholder {
  color: var(--app-text-muted);
}

.locatorSearchInput:focus {
  border-color: var(--app-accent);
  box-shadow: 0 0 0 3px rgba(127, 185, 255, .2);
}

.locatorFiltersWrap {
  border-top: 1px solid var(--app-border);
  padding-top: .6rem;
}

.locatorFiltersToggle {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.locatorFiltersTitle {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--app-text-secondary);
  margin-bottom: .4rem;
}

.locatorServiceFilters {
  display: grid;
  gap: .35rem;
  max-height: 180px;
  overflow-y: auto;
  padding-right: .2rem;
}

.locatorServiceOption {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .76rem;
  color: var(--app-locator-text);
  line-height: 1.15;
}

.locatorServiceOption input[type="checkbox"] {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--app-accent);
}

#sheltersList {
  max-height: calc(75vh - 96px);
  overflow-y: auto;
  background: var(--app-surface-1);
  -ms-overflow-style: none;
  scrollbar-width: none;
}

#sheltersList::-webkit-scrollbar {
  width: 0;
  height: 0;
}

#sheltersList::-webkit-scrollbar-thumb {
  background: var(--app-border-strong);
  border-radius: 999px;
  border: 2px solid var(--app-surface-1);
}

.locatorEmptyState {
  min-height: 170px;
  display: grid;
  place-items: center;
  gap: .4rem;
  color: var(--app-locator-empty);
  font-size: .9rem;
  text-align: center;
}

.locatorEmptyState i {
  font-size: 1.3rem;
  color: var(--app-locator-empty-icon);
}

.mapHud {
  position: absolute;
  z-index: 600;
  top: 12px;
  left: 12px;
  padding: 8px 12px;
  border-radius: 10px;
  background: var(--app-map-hud-bg);
  color: var(--app-text-primary);
  border: 1px solid var(--app-map-hud-border);
  backdrop-filter: blur(6px);
}

.mapHudTitle {
  font-weight: 700;
  font-size: .86rem;
}

.mapHudSubtitle {
  font-size: .75rem;
  opacity: .87;
}

@media (max-width: 1199.98px) {
  .locatorListShell {
    height: auto;
    min-height: 0;
  }

  .mapContainer {
    border-left: 0;
    min-height: 60vh;
  }

  #sheltersList {
    max-height: 42vh;
  }
}

@media (max-width: 767.98px) {
  .mapContainer {
    min-height: 52vh;
    border-top: 0;
    border-bottom: 1px solid var(--app-locator-map-border);
  }

  .locatorListHeader {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
  }

  #sheltersList {
    max-height: 46vh;
  }
}
