.location-picker {
  display: grid;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 14, 27, 0.72);
}

.location-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.location-picker-head strong,
.location-picker-head p,
.location-status {
  margin: 0;
}

.location-picker-head p,
.location-status {
  color: var(--muted);
  font-size: 0.78rem;
}

.location-status.is-confirmed {
  color: #6ed9b1;
}

.location-status.has-warning {
  color: #ffc66d;
}

.location-map,
.market-map,
.detail-location-map {
  width: 100%;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
}

.location-map {
  height: 320px;
}

.location-results {
  display: grid;
  gap: 4px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #111827;
}

.address-suggestions {
  position: relative;
  z-index: 700;
  display: grid;
  gap: 4px;
  max-height: 300px;
  margin-top: -8px;
  padding: 5px;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(10, 16, 30, 0.98);
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.34);
}

.address-suggestions[hidden] {
  display: none;
}

.address-suggestions.is-loading {
  opacity: 0.65;
}

.address-suggestions button,
.location-results button {
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text);
  text-align: left;
}

.address-suggestions button {
  display: grid;
  gap: 3px;
}

.address-suggestions button strong,
.address-suggestions button small,
.location-results button strong,
.location-results button small {
  display: block;
}

.address-suggestions button strong,
.location-results button strong {
  color: var(--text);
  font-size: 0.86rem;
}

.address-suggestions button small,
.location-results button small {
  color: var(--muted);
  font-size: 0.72rem;
}

.address-suggestions button:hover,
.location-results button:hover {
  background: rgba(255, 106, 26, 0.12);
}

.market-view-switch {
  display: inline-grid;
  grid-template-columns: repeat(2, 1fr);
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.025);
}

.market-view-switch button {
  min-height: 34px;
  padding: 0 14px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted-strong);
}

.market-view-switch button.is-active {
  background: rgba(255, 106, 26, 0.16);
  color: var(--text);
}

.market-map-panel {
  position: relative;
  min-height: 620px;
}

.market-map {
  height: min(72vh, 760px);
  min-height: 620px;
}

.market-map-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 500;
  width: min(320px, calc(100% - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(8, 14, 27, 0.92);
  text-align: center;
  transform: translate(-50%, -50%);
}

.market-map-empty p {
  margin-bottom: 0;
  color: var(--muted);
}

.detail-location-map-section {
  display: grid;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.detail-location-map-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.detail-location-map-head h2,
.detail-location-map-head p {
  margin: 0;
}

.detail-location-map-head h2 {
  margin-top: 4px;
  font-size: 1rem;
}

.detail-location-map {
  height: 330px;
}

.leaflet-container {
  font-family: inherit;
}

.leaflet-tile-pane {
  filter: saturate(0.72) brightness(0.72) contrast(1.08);
}

.leaflet-control-zoom a,
.leaflet-control-attribution {
  border-color: var(--line) !important;
  background: rgba(10, 16, 30, 0.92) !important;
  color: var(--muted-strong) !important;
}

.bridge-map-marker-wrap {
  background: transparent;
  border: 0;
}

.bridge-map-marker {
  position: relative;
  display: grid;
  place-items: center;
  width: max-content;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border: 2px solid #fff;
  border-radius: 17px;
  background: #ff6a1a;
  box-shadow: 0 7px 18px rgba(0, 0, 0, 0.32);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.bridge-map-marker::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  width: 12px;
  height: 12px;
  border-right: 2px solid #fff;
  border-bottom: 2px solid #fff;
  background: #ff6a1a;
  transform: translateX(-50%) rotate(45deg);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #101827;
  color: var(--text);
}

.leaflet-popup-content {
  margin: 8px;
}

.market-map-popup {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 10px;
  color: var(--text);
}

.market-map-popup img {
  width: 76px;
  height: 76px;
  border-radius: 6px;
  object-fit: cover;
}

.market-map-popup span,
.market-map-popup strong,
.market-map-popup small,
.market-map-popup b {
  display: block;
}

.market-map-popup small {
  margin-top: 5px;
  color: var(--muted);
}

.market-map-popup b {
  margin-top: 7px;
  color: var(--accent-strong);
}

@media (max-width: 700px) {
  .location-picker-head {
    align-items: stretch;
    flex-direction: column;
  }

  .location-map {
    height: 280px;
  }

  .detail-location-map-head {
    align-items: stretch;
    flex-direction: column;
  }

  .detail-location-map-head .button {
    width: 100%;
  }

  .detail-location-map {
    height: 280px;
  }

  .market-results-toolbar {
    align-items: center;
  }

  .market-view-switch {
    width: 100%;
  }

  .market-map-panel,
  .market-map {
    min-height: calc(var(--app-height, 100dvh) - 220px);
  }

  .market-map {
    height: calc(var(--app-height, 100dvh) - 220px);
  }
}
