.map-container {
    width: 100%;
    height: 100%;
    min-height: 600px;
    position: relative;
}

.map-container .maplibregl-canvas-container,
.map-container .maplibregl-canvas {
    width: 100%;
    height: 100%;
}

.map-style-ctrl {
    position: relative;
}

.map-style-btn {
    width: 29px;
    height: 29px;
    padding: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.map-style-btn svg {
    width: 18px;
    height: 18px;
}

.map-style-menu {
    position: absolute;
    min-width: 160px;
    max-width: calc(100% - 24px);
    max-height: 300px;
    overflow-y: auto;
    background: var(--brand-color-dark);
    border: 1px solid var(--brand-color-darker);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.map-style-menu button {
    display: block;
    width: 100%;
    padding: 6px 12px;
    background: none;
    border: none;
    color: var(--text);
    text-align: left;
    font-size: 13px;
    cursor: pointer;
}

.map-style-menu button:hover {
    background: var(--brand-color-mid);
}

.maplibregl-ctrl-group {
  background: var(--brand-color-dark) !important;
  border-radius: 4px !important;
}

.maplibregl-ctrl-group button + button {
  border-top: 1px solid var(--brand-color-darker) !important;
}

.maplibregl-ctrl-icon {
  filter: invert();
}

.maplibregl-popup-content {
  background:var(--background) !important;
}

.map-context-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.map-context-menu .map-context-coords {
  font-size: 11px;
  color: var(--text-soft);
  margin-bottom: 4px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.map-context-menu a {
  display: block;
  padding: 4px 6px;
  border-radius: 3px;
  color: var(--text);
  text-decoration: none;
  font-size: 13px;
}

.map-context-menu a:hover {
  background: var(--brand-color-mid);
}

.maplibregl-popup-anchor-bottom .maplibregl-popup-tip {
  border-top-color: var(--background) !important;
}

.maplibregl-popup-anchor-top .maplibregl-popup-tip {
  border-bottom-color: var(--background) !important;
}

.maplibregl-popup-anchor-left .maplibregl-popup-tip {
  border-right-color: var(--background) !important;
}

.maplibregl-popup-anchor-right .maplibregl-popup-tip {
  border-left-color: var(--background) !important;
}


.map-stops-banner {
  position: absolute;
  top: 10px;
  left: 10px;
  background: var(--brand-color-dark);
  border: 1px solid var(--brand-color-darker);
  border-radius: 4px;
  color: var(--text);
  padding: 6px 10px;
  font-size: 13px;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}