/* EDQ Dashboard — animations & custom styles */

/* ── Stage card ── */
.stage-card {
    border-radius: 1rem;
    border-width: 1px;
    background-color: rgba(15, 23, 42, 0.3);
    overflow: hidden;
}
.stage-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid rgba(30, 41, 59, 0.5);
}
.stage-dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

/* ── Metadata cells ── */
.meta-cell {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    background-color: rgba(30, 41, 59, 0.4);
}
.meta-label {
    font-size: 0.625rem;
    line-height: 1rem;
    color: rgb(100, 116, 139);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.125rem;
}
.meta-value {
    font-size: 0.875rem;
    line-height: 1.25rem;
    color: rgb(203, 213, 225);
    word-break: break-all;
}

/* ── Animations ── */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}
@keyframes slideIn {
    from { opacity: 0; transform: translateX(-12px); }
    to { opacity: 1; transform: translateX(0); }
}
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
@keyframes gaugeArc {
    from { stroke-dasharray: 0 100; }
}
@keyframes signalPulse {
    0% { transform: translateX(-100%); opacity: 0; }
    50% { opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}
@keyframes stuckPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
    50% { box-shadow: 0 0 16px 4px rgba(239, 68, 68, 0.3); }
}
@keyframes thresholdGlow {
    0%, 100% { box-shadow: 0 0 20px 0 rgba(239, 68, 68, 0); }
    50% { box-shadow: 0 0 30px 8px rgba(239, 68, 68, 0.15); }
}
@keyframes pulseEmerald {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
    50% { box-shadow: 0 0 12px 2px rgba(16, 185, 129, 0.3); }
}

.animate-fade-in {
    animation: fadeIn 0.5s ease-out both;
}
.animate-fade-in-delayed {
    animation: fadeIn 0.5s ease-out 0.15s both;
}
.animate-fade-in-delayed-2 {
    animation: fadeIn 0.5s ease-out 0.3s both;
}
.animate-slide-in {
    animation: slideIn 0.4s ease-out both;
}
.shimmer {
    background: linear-gradient(90deg, transparent 25%, rgba(148, 163, 184, 0.05) 50%, transparent 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}
.gauge-arc {
    animation: gaugeArc 1.2s ease-out both;
}
.signal-pulse::after {
    content: '';
    position: absolute;
    inset: -1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.4), transparent);
    animation: signalPulse 3s infinite;
}
.stuck-pulse {
    animation: stuckPulse 2s infinite;
}
.threshold-glow {
    animation: thresholdGlow 2s infinite;
}
.pulse-emerald {
    animation: pulseEmerald 2s infinite;
}

/* ── Stage timeline dot colors (CSS vars for dynamic access) ── */
:root {
    --stage-ingestion: #8b5cf6;
    --stage-scanner: #3b82f6;
    --stage-scoring: #f59e0b;
    --stage-audit: #10b981;
}
[class*="bg-stage-ingestion"] { background-color: #8b5cf6; }
[class*="bg-stage-scanner"]   { background-color: #3b82f6; }
[class*="bg-stage-scoring"]   { background-color: #f59e0b; }
[class*="bg-stage-audit"]     { background-color: #10b981; }
[class*="border-stage-ingestion"] { border-color: #8b5cf6; }
[class*="border-stage-scanner"]   { border-color: #3b82f6; }
[class*="border-stage-scoring"]   { border-color: #f59e0b; }
[class*="border-stage-audit"]     { border-color: #10b981; }
