/**
 * Лента аптайма — 3D-сферы по дням (лендинг + страница статуса)
 */

.uptime-timeline--spheres {
    position: relative;
    display: flex;
    align-items: center;
    gap: 1px;
    height: 2.75rem;
    padding: 0.45rem 0.55rem;
    background: var(--t4w-bg, #0f172a);
    border: 1px solid var(--t4w-border, #334155);
    border-radius: 7px;
    box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.uptime-spheres__rail {
    position: absolute;
    left: 0.55rem;
    right: 0.55rem;
    top: 50%;
    height: 1px;
    margin-top: -0.5px;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(148, 163, 184, 0.28) 8%,
        rgba(148, 163, 184, 0.38) 50%,
        rgba(148, 163, 184, 0.28) 92%,
        transparent
    );
    pointer-events: none;
}

.uptime-spheres__cell {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
    position: relative;
}

/* Одинаковый размер и центр — без смещения вверх/вниз по статусу */
.uptime-spheres__cell::after {
    content: '';
    display: block;
    flex-shrink: 0;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    transform: none;
    background:
        radial-gradient(circle at 32% 26%, rgba(255, 255, 255, 0.72) 0%, rgba(255, 255, 255, 0.2) 18%, transparent 42%),
        radial-gradient(circle at 58% 68%, rgba(0, 0, 0, 0.35) 0%, transparent 55%),
        radial-gradient(circle at 50% 55%, #94a3b8 0%, #64748b 55%, #475569 100%);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.55),
        0 2px 4px rgba(0, 0, 0, 0.25);
}

.uptime-spheres__cell--up::after {
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0.25) 16%, transparent 40%),
        radial-gradient(circle at 62% 72%, rgba(0, 0, 0, 0.4) 0%, transparent 50%),
        radial-gradient(circle at 48% 52%, #86efac 0%, #22c55e 48%, #15803d 100%);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.5),
        0 2px 5px rgba(0, 0, 0, 0.3),
        0 0 7px rgba(34, 197, 94, 0.45);
}

.uptime-spheres__cell--down::after {
    background:
        radial-gradient(circle at 28% 22%, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.3) 14%, transparent 38%),
        radial-gradient(circle at 64% 74%, rgba(0, 0, 0, 0.45) 0%, transparent 52%),
        radial-gradient(circle at 50% 54%, #fca5a5 0%, #ef4444 46%, #991b1b 100%);
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.55),
        0 3px 6px rgba(0, 0, 0, 0.35),
        0 0 9px rgba(239, 68, 68, 0.55);
}

.uptime-spheres__cell--degraded::after {
    background:
        radial-gradient(circle at 30% 24%, rgba(255, 255, 255, 0.8) 0%, rgba(255, 255, 255, 0.22) 16%, transparent 40%),
        radial-gradient(circle at 62% 72%, rgba(0, 0, 0, 0.38) 0%, transparent 50%),
        radial-gradient(circle at 48% 52%, #fde047 0%, #eab308 48%, #a16207 100%);
    box-shadow:
        0 1px 2px rgba(0, 0, 0, 0.5),
        0 2px 5px rgba(0, 0, 0, 0.28),
        0 0 7px rgba(234, 179, 8, 0.42);
}

.uptime-spheres__cell--unknown::after {
    width: 6px;
    height: 6px;
    opacity: 0.55;
    background:
        radial-gradient(circle at 32% 28%, rgba(255, 255, 255, 0.35) 0%, transparent 38%),
        radial-gradient(circle at 58% 68%, rgba(0, 0, 0, 0.25) 0%, transparent 52%),
        radial-gradient(circle at 50% 55%, #94a3b8 0%, #64748b 60%, #475569 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
}

/* Легенда цветов */
.uptime-spheres-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin: 0.65rem 0 0;
    padding: 0;
    list-style: none;
}

.uptime-spheres-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.7rem;
    line-height: 1.3;
    color: var(--t4w-muted, #94a3b8);
}

.uptime-spheres-legend__text strong {
    font-weight: 600;
    color: var(--t4w-text, #e2e8f0);
}

.uptime-spheres-legend__sphere {
    flex: none;
    width: 7px;
    height: 7px;
    min-width: 7px;
    min-height: 7px;
}

.uptime-spheres-legend__sphere::after {
    width: 7px !important;
    height: 7px !important;
    transform: none !important;
}

.uptime-spheres-legend__sphere.uptime-spheres__cell--unknown::after {
    width: 6px !important;
    height: 6px !important;
}
