/* status.css
 * Phase 2: Status indicators and transient UI (badges, loading states)
 */

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: var(--font-size-xs);
    font-weight: 500;
    border-radius: var(--radius-md);
    background: var(--color-gray-100);
    color: var(--color-text);
}

.badge--running {
    background: #fef3c7;
    color: #92400e;
}

.badge--finished {
    background: #d1fae5;
    color: #065f46;
}

.badge--error {
    background: #fee2e2;
    color: #991b1b;
}

.badge--success {
    background: #d1fae5;
    color: #065f46;
}

.badge--warning {
    background: #fef3c7;
    color: #92400e;
}

.badge--pending {
    background: #e0e7ff;
    color: #3730a3;
}

.badge--queued {
    background: #fef3c7;
    color: #92400e;
}

.badge--executing {
    background: #dbeafe;
    color: #1e40af;
}

.badge--unknown {
    background: var(--color-gray-200);
    color: var(--color-gray-700);
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 999;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--color-gray-200);
    border-top: 4px solid var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.loading-text {
    margin-top: var(--spacing-md);
    color: var(--color-text-muted);
}

.loading-message {
    padding: 2rem;
    text-align: center;
    color: var(--color-text-muted);
    font-style: italic;
}

.loading-placeholder {
    padding: var(--spacing-xl);
    text-align: center;
    color: var(--color-text-muted);
}

/* Status Indicators (migrated from legacy/components.css) */
.status-indicator {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.status-indicator__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-gray-400);
}

.status-indicator--running .status-indicator__dot {
    background: var(--color-warning);
    animation: pulse 1.5s infinite;
}

.status-indicator--finished .status-indicator__dot {
    background: var(--color-success);
}

.status-indicator--error .status-indicator__dot {
    background: var(--color-error);
}

.status-indicator--pending .status-indicator__dot {
    background: var(--color-info);
}

/* Progress Bars (migrated) */
.progress {
    width: 100%;
    height: 8px;
    background: var(--color-gray-200);
    border-radius: var(--radius-sm);
    overflow: hidden;
}

.progress__bar {
    height: 100%;
    background: var(--color-primary);
    transition: width .3s ease;
}

.progress--success .progress__bar {
    background: var(--color-success);
}

.progress--warning .progress__bar {
    background: var(--color-warning);
}

.progress--error .progress__bar {
    background: var(--color-error);
}