/* status.css — стили для /status (public health page).
 * Подключается ПОСЛЕ legal.css, переопределяет/расширяет некоторые элементы. */

/* ── Hero status block ──────────────────────────────────────────────── */
.status-hero {
    margin: 18px 0 28px;
    padding: 18px 22px;
    border: 1px solid var(--border, rgba(124, 137, 246, 0.18));
    border-radius: 14px;
    background: rgba(15, 17, 25, 0.55);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: border-color .2s, background .2s;
}
.status-hero.is-ok      { border-color: rgba(74, 222, 128, 0.45); background: rgba(74, 222, 128, 0.05); }
.status-hero.is-degraded{ border-color: rgba(251, 191, 36, 0.45); background: rgba(251, 191, 36, 0.05); }
.status-hero.is-down    { border-color: rgba(248, 113, 113, 0.5);  background: rgba(248, 113, 113, 0.06); }

.status-hero-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #6b7280;
    box-shadow: 0 0 0 4px rgba(107, 114, 128, 0.18);
    transition: background .3s, box-shadow .3s;
}
.status-hero.is-ok       .status-hero-dot { background: #4ade80; box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.22); animation: status-pulse 2s ease-in-out infinite; }
.status-hero.is-degraded .status-hero-dot { background: #fbbf24; box-shadow: 0 0 0 6px rgba(251, 191, 36, 0.22); }
.status-hero.is-down     .status-hero-dot { background: #f87171; box-shadow: 0 0 0 6px rgba(248, 113, 113, 0.22); }

@keyframes status-pulse {
    0%, 100% { box-shadow: 0 0 0 6px rgba(74, 222, 128, 0.22); }
    50%      { box-shadow: 0 0 0 10px rgba(74, 222, 128, 0.10); }
}

.status-hero-text { flex: 1; min-width: 0; }
.status-hero-title { font-size: 18px; font-weight: 700; color: var(--text, #e2e2f0); margin-bottom: 2px; }
.status-hero-sub { font-size: 13px; color: var(--text-muted, rgba(255,255,255,0.55)); }

.status-hero-meta {
    text-align: right;
    padding-left: 14px;
    border-left: 1px solid var(--border, rgba(124, 137, 246, 0.15));
}
.status-hero-meta-label {
    display: block;
    font-size: 10.5px;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted, rgba(255,255,255,0.55));
}
.status-hero-meta-value {
    display: block;
    font-size: 16px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: var(--text, #e2e2f0);
}

/* ── Component list ─────────────────────────────────────────────────── */
.status-list { list-style: none; padding: 0; margin: 0 0 28px; }
.status-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border: 1px solid var(--border, rgba(124, 137, 246, 0.15));
    border-radius: 10px;
    margin-bottom: 8px;
    background: rgba(15, 17, 25, 0.45);
    font-size: 14px;
}
.status-row-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #6b7280;
}
.status-row-dot-pending { background: #6b7280; animation: status-blink 1.4s ease-in-out infinite; }
.status-row-dot-ok      { background: #4ade80; }
.status-row-dot-warn    { background: #fbbf24; }
.status-row-dot-down    { background: #f87171; }
@keyframes status-blink { 0%,100% { opacity: 1 } 50% { opacity: 0.35 } }

.status-row-name { flex: 1; min-width: 0; color: var(--text, #e2e2f0); }
.status-row-meta {
    font-size: 12.5px;
    color: var(--text-muted, rgba(255,255,255,0.55));
    font-variant-numeric: tabular-nums;
    text-align: right;
    flex-shrink: 0;
}
.status-row-meta-ok   { color: #4ade80; }
.status-row-meta-warn { color: #fbbf24; }
.status-row-meta-down { color: #f87171; }

/* ── Build info ─────────────────────────────────────────────────────── */
.status-build {
    background: rgba(15, 17, 25, 0.5);
    border: 1px solid var(--border, rgba(124, 137, 246, 0.15));
    border-radius: 10px;
    padding: 12px 16px;
    margin: 8px 0 28px;
}
.status-build-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13px;
}
.status-build-row + .status-build-row {
    border-top: 1px solid var(--border, rgba(124, 137, 246, 0.10));
}
.status-build-label { color: var(--text-muted, rgba(255,255,255,0.55)); }
.status-build-value {
    font-family: 'JetBrains Mono', monospace;
    color: var(--text, #e2e2f0);
    font-variant-numeric: tabular-nums;
}

/* ── Providers redundancy list ────────────────────────────────────────
 * Статичный список провайдеров — показываем, что у нас есть multi-provider
 * каскад. Никаких live-статусов: их обнажение помогало бы атакующим и
 * нервировало бы юзеров при коротких сбоях. */
.status-providers-intro {
    color: var(--text-muted, #9aa0b4);
    margin: 8px 0 14px;
    line-height: 1.55;
}
.status-providers {
    list-style: none;
    margin: 0 0 24px;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}
.status-providers li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    background: rgba(255,255,255,.03);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 10px;
    font-size: 13.5px;
    color: var(--text, #e2e2f0);
    line-height: 1.4;
}
.status-providers li b { color: var(--text, #e2e2f0); margin-right: 4px; }
.status-prov-dot {
    flex: 0 0 10px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    box-shadow: 0 0 8px currentColor;
    opacity: .9;
}
@media (max-width: 720px) {
    .status-providers { grid-template-columns: 1fr; }
}
body.light-theme .status-providers li { background: #f7f7fb; border-color: #e1e4ee; color: #1a1a2e; }
body.light-theme .status-providers li b { color: #1a1a2e; }

/* ── Light theme overrides ─────────────────────────────────────────── */
body.light-theme .status-hero,
body.light-theme .status-row,
body.light-theme .status-build {
    background: #ffffff;
}
body.light-theme .status-hero-title,
body.light-theme .status-row-name { color: #1a1a2e; }

/* ── Print ─────────────────────────────────────────────────────────── */
@media print {
    .status-hero, .status-row, .status-build { background: #fff !important; color: #000 !important; border-color: #999 !important; }
    .status-hero-dot, .status-row-dot { background: #555 !important; box-shadow: none !important; animation: none !important; }
}
