/* ============================================================
   SIDEBAR
   Desktop: narrow vertical column (icon-over-label cards)
   Mobile:  horizontal scrolling bar at the top
   ============================================================ */

.sidebar {
    background: var(--color-sidebar-bg);
    border-right: 1px solid var(--color-border);
    flex-shrink: 0;
    width: 96px;
    overflow-y: auto;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-md) var(--space-sm);
    gap: var(--space-md);
}

.sidebar-item-form {
    margin: 0;
    padding: 0;
    display: contents;
}

.sidebar-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm);
    width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 8px;
    background: var(--color-sidebar-item-bg);
    color: var(--color-text);
    cursor: pointer;
    text-align: center;
    transition: background 0.15s, border-color 0.15s, transform 0.05s;
}

.sidebar-item:hover,
.sidebar-item:focus-visible {
    background: var(--color-surface);
    border-color: var(--color-surface);
    outline: none;
}

.sidebar-item:active {
    transform: scale(0.97);
}

.sidebar-item__icon {
    width: 28px;
    height: 28px;
    object-fit: contain;
    display: block;
}

.sidebar-item__label {
    font-size: 0.75rem;
    line-height: 1.2;
}
/* Keep sidebar buttons a consistent height — long labels shouldn't wrap and
   grow the button (e.g. "Early Warning" on mobile, shortened to "Warning"). */
.sidebar-item__label {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.sidebar-mobile__actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);   /* same gap the nav used to give the buttons */
}

/* Binary (mode-switch) buttons — a small toggle indicator (feedback A1)
   distinguishes them from single-action buttons. */
.sidebar-item--binary {
    position: relative;
}
.sidebar-item__toggle {
    position: absolute;
    top: 4px;
    right: 6px;
    font-size: 0.8rem;
    line-height: 1;
    color: var(--color-primary);
    opacity: 0.85;
    pointer-events: none;
}