/* assets/css/live-stats-widget.css */
.live-stats-section { margin: var(--space-5) auto; }
.live-stats-card {
    padding: var(--space-4);
    max-width: var(--container-max);
    margin: 0 auto;
    /* Mjuk, "andande" gradient-glow runt kortet — högst upp på sidan,
       ska kännas som en levande, professionell instrumentpanel snarare
       än en statisk ruta med siffror. */
    position: relative;
    box-shadow: 0 0 0 1px rgba(124,110,242,.12), 0 20px 50px rgba(0,0,0,.3);
    animation: liveStatsGlow 5s ease-in-out infinite;
}
@keyframes liveStatsGlow {
    0%, 100% { box-shadow: 0 0 0 1px rgba(124,110,242,.12), 0 20px 50px rgba(0,0,0,.3); }
    50% { box-shadow: 0 0 0 1px rgba(124,110,242,.28), 0 20px 60px rgba(124,110,242,.12); }
}
.live-stats-item { animation: socialItemFadeIn .5s ease both; }
.live-stats-item:nth-child(1) { animation-delay: .04s; }
.live-stats-item:nth-child(2) { animation-delay: .1s; }
.live-stats-item:nth-child(3) { animation-delay: .16s; }
.live-stats-item:nth-child(4) { animation-delay: .22s; }
.live-stats-recent li { animation: socialItemFadeIn .45s ease both; }
.live-stats-recent li:nth-child(1) { animation-delay: .1s; }
.live-stats-recent li:nth-child(2) { animation-delay: .16s; }
.live-stats-recent li:nth-child(3) { animation-delay: .22s; }
.live-stats-recent li:nth-child(4) { animation-delay: .28s; }
@media (prefers-reduced-motion: reduce) {
    .live-stats-card, .live-stats-item, .live-stats-recent li { animation: none !important; }
}
.live-stats-header { display: flex; align-items: center; gap: .6rem; margin-bottom: var(--space-3); }
.live-stats-header h3 { margin: 0; }
.live-stats-pulse {
    width: 10px; height: 10px; border-radius: 50%;
    background: #5ac88c;
    box-shadow: 0 0 0 0 rgba(90,200,140,.6);
    animation: liveStatsPulse 2s infinite;
    flex-shrink: 0;
}
@keyframes liveStatsPulse {
    0% { box-shadow: 0 0 0 0 rgba(90,200,140,.6); }
    70% { box-shadow: 0 0 0 8px rgba(90,200,140,0); }
    100% { box-shadow: 0 0 0 0 rgba(90,200,140,0); }
}
.live-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-3);
    margin-bottom: var(--space-3);
}
.live-stats-item { text-align: center; }
.live-stats-value {
    font-family: var(--font-heading);
    font-size: 1.9rem;
    font-weight: 600;
    color: var(--color-accent-soft);
    transition: opacity .2s ease;
}
.live-stats-value.live-stats-updated { animation: liveStatsFlash .6s ease; }
@keyframes liveStatsFlash { 0% { opacity: .35; } 100% { opacity: 1; } }
.live-stats-label { color: var(--color-text-muted); font-size: .82rem; margin-top: .2rem; }
.live-stats-recent { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--color-surface-border); }
.live-stats-recent li {
    display: grid;
    grid-template-columns: 1fr 100px 90px;
    align-items: center;
    gap: .6rem;
    padding: .55rem 0;
    border-bottom: 1px solid var(--color-surface-border);
    font-size: .88rem;
}
.live-stats-recent li:last-child { border-bottom: none; }
.live-stats-recent span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-stats-recent strong { color: var(--color-accent-soft); text-align: right; }
.live-stats-recent time { color: var(--color-text-faint); font-size: .78rem; text-align: right; }
.live-stats-empty { display: block !important; text-align: center; color: var(--color-text-muted); }
@media (max-width: 480px) {
    .live-stats-recent li { grid-template-columns: 1fr 80px; }
    .live-stats-recent time { display: none; }
}
@media (max-width: 720px) {
    .live-stats-grid { grid-template-columns: repeat(2, 1fr); }
}
