#map-controls {
    position: absolute;
    right: 12px;
    bottom: 12px;
    z-index: 1000;
    display: flex;
    flex-direction: row-reverse;
    gap: 8px;
}

#controls-toggle,
.map-control {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--bg-panel);
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    padding: 0;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

#controls-toggle:hover,
.map-control:hover {
    background: var(--bg-hover);
}

#controls-toggle {
    display: flex;
}

.map-control {
    display: none;
}

#map-controls.expanded .map-control {
    display: flex;
}

#locate-btn {
    font-size: 1.2rem;
}

#info-btn {
    color: var(--text-secondary);
    font-weight: bold;
}

#airspace-btn.active {
    color: #eab308;
    border-color: #eab308;
}

#locate-error {
    position: absolute;
    right: 12px;
    bottom: 60px;
    z-index: 1000;
    background: #fdecea;
    border: 1px solid #f5c2c0;
    color: #611a15;
    border-radius: 6px;
    padding: 6px 12px;
    font: 13px sans-serif;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
}

#locate-error.hidden {
    display: none;
}

.reference-marker-icon {
    font-size: 28px;
    text-align: center;
    line-height: 32px;
}

.map-context-menu {
    position: absolute;
    z-index: 1000;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font: 14px sans-serif;
    overflow: hidden;
}

.map-context-menu div {
    padding: 8px 16px;
    cursor: pointer;
    white-space: nowrap;
    color: var(--text-primary);
}

.map-context-menu div:hover {
    background: var(--bg-hover);
}

.takeoff-marker-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    /* No position set here - Leaflet's own .leaflet-marker-icon class
     already sets position: absolute (how it pins markers to their map
     coordinates via transform); that's already a valid positioning
     context for the .favorite::after badge below too, so overriding it
     (e.g. to "relative") would break marker placement entirely. */
    /* Same reasoning as #list li in list-panel.css: without this, a real
     double-tap on mobile can get consumed by the browser's native
     double-tap-to-zoom gesture instead of firing our own dblclick handler. */
    touch-action: manipulation;
}

.takeoff-marker-icon.favorite::after {
    content: "★";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 12px;
    line-height: 1;
    color: #eab308;
}

.takeoff-marker {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #7c3aed;
    border: 1px solid white;
}

.takeoff-marker-icon:hover .takeoff-marker,
.takeoff-marker-icon.hovered .takeoff-marker {
    scale: 1.2;
}

.takeoff-marker-icon.selected .takeoff-marker {
    background: #ea580c;
}

.marker-tooltip {
    display: flex;
    align-items: center;
    gap: 5px;
}

.leaflet-tooltip {
    background-color: var(--bg-panel);
    border-color: var(--bg-panel);
    color: var(--text-primary);
}

.leaflet-tooltip-top:before {
    border-top-color: var(--bg-panel);
}

.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
    background: var(--bg-panel);
    color: var(--text-primary);
}

.leaflet-popup-content a {
    color: var(--text-primary);
}