/* JS moves tooltip bodies onto <body> and positions them clamped to the
   viewport, so they can never be clipped by the sidebar or pushed off screen. */

.map-help-tooltip-content.is-floating {
    position: fixed;
    right: auto;
    top: auto;
}

.map-help-tooltip-content.is-floating.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.map-position-input-row input {
    width: 100%;
    background: var(--panel-dark);
    border: 2px solid var(--border);
    color: var(--text);
    padding: 8px 10px;
    font-size: 0.78rem;
    line-height: 1.35;
    font-family: var(--font-code);
    outline: none;
    box-shadow: var(--shadow-s);
    transition: border-color 0.15s ease;
}

.map-position-input-row input:focus {
    border-color: var(--accent);
}

.map-position-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

/* Route planner actions stack so the longer "Turn off route planner" label
   stays on one line instead of being cramped into a half-width column. */

.map-route-panel .map-position-actions {
    grid-template-columns: 1fr;
}

.map-position-btn {
    min-height: 34px;
    padding: 0.1em 0.6em;
    font-size: 0.76rem;
    line-height: 1.25;
    box-shadow: var(--shadow-s);
}

.map-position-btn:active {
    transform: translate(2px, 2px);
}

.map-position-btn:disabled {
    opacity: 0.48;
    cursor: not-allowed;
    transform: none;
    box-shadow: var(--shadow-s);
}

.map-position-panel .btn-danger {
    background: #331414;
    border-color: #6f2d2d;
    color: #ffb7a8;
}

.map-position-switch {
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.map-position-switch-compact {
    padding-top: 0;
    border-top: 0;
}

.map-position-history-field {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border);
}

.map-position-readout {
    display: grid;
    gap: 5px;
    padding: 9px 10px;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border);
    font-family: var(--font-ui);
}

.map-position-readout span {
    min-width: 0;
    color: var(--text);
    font-size: 0.75rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
}

.map-position-readout strong {
    color: var(--accent);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.map-position-status {
    min-height: 18px;
    color: var(--muted);
    font-family: var(--font-ui);
    font-size: 0.72rem;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.map-position-status.is-ok {
    color: #89d185;
}

.map-position-status.is-warn {
    color: #ffb45f;
}

.map-minimap-sync {
    display: grid;
    gap: 8px;
    padding: 10px;
    background: rgba(0, 0, 0, 0.16);
    border: 1px solid var(--border);
}

