/*
    indicators.css — the small pieces that report state: status badges and the
    flash message raised after a save or a delete.
*/

.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: 2px var(--space-2);
    border-radius: var(--radius-pill);
    background: var(--surface-sunken);
    color: var(--text-muted);
    font-size: var(--text-xs);
    font-weight: var(--weight-semibold);
    line-height: 1.6;
    white-space: nowrap;
}

.badge-neutral {
    background: var(--surface-sunken);
    color: var(--text-muted);
}

.badge-brand {
    background: var(--brand-soft);
    color: var(--brand);
}

.badge-success {
    background: var(--success-soft);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-soft);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge-info {
    background: var(--info-soft);
    color: var(--info);
}

.badge-count {
    min-width: 22px;
    justify-content: center;
    font-variant-numeric: tabular-nums;
}

/* ---- Inline alert: a message a form shows above its fields ---- */

.alert {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-sunken);
    font-size: var(--text-sm);
}

.alert-danger {
    border-color: var(--danger);
    background: var(--danger-soft);
    color: var(--danger);
}

.alert-text {
    min-width: 0;
}

/* ---- Flash message ---- */

.flash {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    border: 1px solid var(--border);
    border-inline-start: 3px solid var(--success);
    border-radius: var(--radius-md);
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    font-size: var(--text-base);
}

.flash > .icon {
    flex: none;
    font-size: 1.3rem;
    color: var(--success);
}

.flash-text {
    flex: 1 1 auto;
    min-width: 0;
}

.flash-close {
    flex: none;
    width: 28px;
    height: 28px;
    padding: 0;
    border: 0;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-subtle);
    cursor: pointer;
}

.flash-close:hover {
    background: var(--surface-hover);
    color: var(--text);
}

.flash.is-hiding {
    opacity: 0;
    transition: opacity var(--duration) var(--ease);
}

.flash-danger {
    border-inline-start-color: var(--danger);
}

.flash-danger > .icon {
    color: var(--danger);
}
