/* DrawToolbar — annotation drawing tools, anchored on the PHYSICAL left
   edge of the Lagebild map and vertically centred. Physical (2026-06-12
   layout cleanup): the logical inset put it on the same side as the
   AIS/filter chrome under RTL, where the tall open panel reached the
   toolbar's vertical span and lost its checkbox column under it. Left
   edge = HUD + toolbars, right edge = filter rail, both directions. */

.ms-draw-toolbar {
    position: absolute;
    /* Polish v3 (2026-07-18): fest unter dem Windy-FAB verankert statt
       vertikal zentriert — die 50%-Zentrierung erreichte auf niedrigen
       Viewports (50vh-Karte ≤1280px) die top-left-Zone (HUD + Windy-FAB)
       und erzeugte Overlaps. Deterministische Slots: HUD 10px (≈82px hoch),
       FAB 106px, Toolbar 162px. */
    top: 162px;
    left: 12px;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 6px;
    background: var(--ms-panel);
    border: 1px solid var(--ms-panel-border);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(6px);
    pointer-events: auto;
}

.ms-draw-toolbar-head {
    display: flex;
    justify-content: center;
    width: 100%;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--ms-panel-border);
    color: var(--ms-text-dim);
}

.ms-draw-tools {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.ms-draw-tool {
    width: 34px;
    height: 34px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    color: var(--ms-text-dim);
    border: 1px solid transparent;
    border-radius: 6px;
    cursor: var(--ms-cursor-pointer);
    transition: background-color 100ms ease-out, color 100ms ease-out, border-color 100ms ease-out;
}
.ms-draw-tool:hover {
    color: var(--ms-text);
    background: var(--ms-panel-header);
}
.ms-draw-tool.active {
    color: var(--ms-bg);
    background: var(--ms-accent);
    border-color: var(--ms-accent);
}
.ms-draw-tool:focus-visible {
    outline: 2px solid var(--ms-accent);
    outline-offset: 1px;
}

.ms-draw-colors {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    width: 38px;
    padding-top: 6px;
    border-top: 1px solid var(--ms-panel-border);
}

.ms-draw-swatch {
    width: 14px;
    height: 14px;
    padding: 0;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.35);
    cursor: var(--ms-cursor-pointer);
}
.ms-draw-swatch.active {
    outline: 2px solid var(--ms-text);
    outline-offset: 1px;
}
.ms-draw-swatch:focus-visible {
    outline: 2px solid var(--ms-accent);
    outline-offset: 1px;
}

/* Custom-colour swatch: a rainbow chip covering a hidden native colour input. */
.ms-draw-swatch-custom {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    background: conic-gradient(red, #ff0, lime, cyan, blue, magenta, red);
}
.ms-draw-swatch-custom input {
    position: absolute;
    inset: -4px;
    width: 200%;
    height: 200%;
    margin: 0;
    padding: 0;
    border: 0;
    opacity: 0;
    cursor: var(--ms-cursor-pointer);
}

/* Active-tool hint — floated under the toolbar so it never widens the column. */
.ms-draw-hint {
    position: absolute;
    top: 100%;
    inset-inline-start: 0;
    margin-top: 6px;
    width: max-content;
    max-width: 168px;
    padding: 4px 8px;
    background: var(--ms-panel);
    border: 1px solid var(--ms-panel-border);
    border-radius: 6px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.35);
    color: var(--ms-text-dim);
    font-family: var(--ms-font-mono);
    font-size: 10px;
    line-height: 1.3;
    pointer-events: none;
}

/* ── DrawToolbar collapse (#weather-toggles) ────────────────────────────── */
.ms-draw-toolbar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}
.ms-draw-head-icon { display: inline-flex; align-items: center; }
.ms-draw-collapse {
    appearance: none;
    border: none;
    background: transparent;
    color: var(--ms-text-dim, #94a3b8);
    cursor: pointer;
    font-size: 13px;
    line-height: 1;
    padding: 2px 4px;
    border-radius: 4px;
}
.ms-draw-collapse:hover { color: var(--ms-text, #e2e8f0); background: rgba(255,255,255,0.08); }
/* Collapsed = just the pen icon; the rest is hidden by the @if in markup. */
.ms-draw-toolbar.collapsed {
    padding: 6px;
    width: auto;
}
.ms-draw-toolbar.collapsed .ms-draw-head-icon { cursor: pointer; }
