.mapviewer-page {
  width: 100%;
}

.mapviewer-shell {
  position: relative;
  min-height: 70vh;
  border: 1px solid rgba(166, 132, 68, 0.45);
  border-radius: 0.45rem;
  background: rgba(13, 13, 13, 0.62);
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}

.mapviewer-stage {
  position: absolute;
  inset: 0;
  transform-origin: 0 0;
  cursor: grab;
  user-select: none;
  -webkit-user-select: none;
}

.mapviewer-layer,
.mapviewer-base {
  user-select: none;
  -webkit-user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.mapviewer-controls {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mapviewer-controls-top-right {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 10;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mapviewer-controls-bottom-left {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  z-index: 10;
}

.mapviewer-control-btn {
  width: 2.15rem;
  height: 2.15rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 0.22rem;
  background: #fff;
  color: #1f1f1f;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.mapviewer-control-btn + .mapviewer-control-btn {
  margin-top: 0;
}

.mapviewer-control-btn:hover {
  background: #f3f3f3;
  color: #0f0f0f;
}

.mapviewer-control-btn:active {
  background: #e8e8e8;
}

.mapviewer-control-btn.is-active {
  background: #e7d4ab;
  border-color: #6a5b37;
}

.mapviewer-control-btn:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 1px;
}

.mapviewer-control-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.35rem;
  background: #f7efe0;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 0.22rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  width: max-content;
  min-width: max-content;
  z-index: 11;
  display: none;
}

.mapviewer-control-dropdown.is-visible {
  display: block;
}

.mapviewer-control-dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  border: none;
  background: none;
  width: 100%;
  text-align: left;
  font-size: 0.9rem;
  color: #1f1f1f;
  white-space: nowrap;
}

.mapviewer-control-dropdown-item:hover {
  background: rgba(166, 132, 68, 0.1);
}

.mapviewer-layer-state {
  width: 1rem;
  height: 1rem;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mapviewer-indicator-active {
  display: none;
}

.mapviewer-indicator-inactive {
  display: inline-flex;
}

.mapviewer-control-dropdown-item.is-active .mapviewer-indicator-active {
  display: inline-flex;
}

.mapviewer-control-dropdown-item.is-active .mapviewer-indicator-inactive {
  display: none;
}

.mapviewer-layer-label {
  display: inline-block;
  white-space: nowrap;
}

.mapviewer-control-icon,
.mapviewer-control-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}

.mapviewer-control-icon svg {
  width: 1.4rem;
  height: 1.4rem;
  display: block;
}

.mapviewer-control-text {
  font-size: 1rem;
  font-weight: 700;
}

.map-pin-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.map-pin-icon svg {
  width: 0.85rem;
  height: 0.85rem;
  display: block;
}

@media (max-width: 768px) {
  .mapviewer-shell {
    min-height: 55vh;
  }
}
