/* GeoX UI v1 · common map controls */

.map-toggle {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 1005;
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: var(--gx-radius-pill);
  background: rgba(20, 20, 20, 0.72);
  backdrop-filter: blur(6px);
  box-shadow: var(--gx-shadow-map-toggle);
}

.map-toggle-btn {
  border: 0;
  border-radius: var(--gx-radius-pill);
  padding: 7px 12px;
  font-size: var(--gx-font-small);
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  color: #ffffff;
  background: transparent;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease;
}

.map-toggle-btn:hover {
  background: transparent;
  transform: translateY(-1px);
}

.map-toggle-btn.active {
  color: #111111;
  background: #ffffff;
}

#btn-my-location {
  position: absolute;
  top: 64px;
  right: 16px;
  z-index: 1002;
  width: 42px;
  height: 42px;
  border-radius: var(--gx-radius-map-control);
  background: var(--gx-surface);
  font-size: 20px;
  box-shadow: var(--gx-shadow-floating);
}

.mobile-layer-toggle {
  position: absolute;
  top: 66px;
  left: 16px;
  z-index: 2000;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #cbd5e1;
  border-radius: var(--gx-radius-pill);
  background: var(--gx-surface);
  color: #334155;
  font-size: var(--gx-font-small);
  font-weight: 800;
  box-shadow: var(--gx-shadow-floating);
}

#search-box-wrapper {
  position: absolute;
  z-index: 2500;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  width: min(var(--gx-search-max-width), calc(100% - 360px));
}

#search-box {
  width: 100%;
  height: 44px;
  border: 1px solid #cbd5e1;
  border-radius: var(--gx-radius-pill);
  padding: 0 18px;
  font-size: var(--gx-font-control);
  box-shadow: var(--gx-shadow-floating);
}

#geoquery-toast,
#map-hint {
  position: absolute;
  z-index: 1200;
  max-width: min(560px, calc(100% - 32px));
  border-radius: var(--gx-radius-pill);
  background: rgba(15, 23, 42, 0.88);
  color: #ffffff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
}

#geoquery-toast {
  right: 14px;
  top: 114px;
  max-width: min(320px, calc(100% - 28px));
  padding: 10px 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
  opacity: 0;
  transform: translateY(-6px);
  transition: opacity 0.18s ease, transform 0.18s ease;
}

#geoquery-toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

#map-hint {
  left: 50%;
  bottom: 28px;
  transform: translateX(-50%);
  padding: 10px 16px;
}

@media (max-width: 768px) {
  #search-box-wrapper {
    top: 12px;
    left: 12px;
    right: 12px;
    width: auto;
    transform: none;
  }

  #search-box {
    height: 42px;
    border-radius: 14px;
  }

  .map-toggle {
    top: 66px;
    right: 12px;
  }

  #btn-my-location {
    top: 116px;
    right: 12px;
    width: 40px;
    height: 40px;
  }

  .mobile-layer-toggle {
    top: 116px;
    left: 12px;
  }
}
