/* DrawToolbar — annotation drawing tools, anchored on the inline-start edge
   of the Lagebild map and vertically centred. Compact, dark, matches the rest
   of the map chrome. RTL flips it to the visual right via the logical inset. */

.ms-draw-toolbar {
    position: absolute;
    top: 50%;
    inset-inline-start: 12px;
    transform: translateY(-50%);
    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;
}
