/*
 * F1SYH_PSK_HEALTH_LOT3_4
 */

.psk-health-indicator {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9995;

    display: flex;
    align-items: center;
    gap: 9px;

    max-width: min(360px, calc(100vw - 36px));
    padding: 9px 13px;

    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 999px;

    background: rgba(15, 23, 42, 0.94);
    color: #f8fafc;

    font-size: 0.82rem;
    line-height: 1.25;

    box-shadow:
        0 12px 30px rgba(0, 0, 0, 0.25),
        0 2px 8px rgba(0, 0, 0, 0.18);

    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);

    cursor: default;
    user-select: none;

    transition:
        opacity 180ms ease,
        transform 180ms ease,
        border-color 180ms ease;
}

.psk-health-indicator:hover {
    transform: translateY(-2px);
}

.psk-health-indicator[hidden] {
    display: none;
}

.psk-health-dot {
    display: block;
    flex: 0 0 auto;

    width: 10px;
    height: 10px;

    border-radius: 50%;
    background: #94a3b8;

    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.14);
}

.psk-health-text {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.psk-health-indicator[data-state="live"] {
    border-color: rgba(34, 197, 94, 0.48);
}

.psk-health-indicator[data-state="live"] .psk-health-dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.17);
}

.psk-health-indicator[data-state="loading"] {
    border-color: rgba(59, 130, 246, 0.48);
}

.psk-health-indicator[data-state="loading"] .psk-health-dot {
    background: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.17);
    animation: psk-health-pulse 1.2s infinite ease-in-out;
}

.psk-health-indicator[data-state="retry"] {
    border-color: rgba(245, 158, 11, 0.52);
}

.psk-health-indicator[data-state="retry"] .psk-health-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.18);
    animation: psk-health-pulse 1.2s infinite ease-in-out;
}

.psk-health-indicator[data-state="fallback"] {
    border-color: rgba(249, 115, 22, 0.55);
}

.psk-health-indicator[data-state="fallback"] .psk-health-dot {
    background: #f97316;
    box-shadow: 0 0 0 4px rgba(249, 115, 22, 0.18);
}

.psk-health-indicator[data-state="error"] {
    border-color: rgba(239, 68, 68, 0.55);
}

.psk-health-indicator[data-state="error"] .psk-health-dot {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.18);
}

@keyframes psk-health-pulse {
    0%,
    100% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(0.72);
        opacity: 0.62;
    }
}

@media (max-width: 640px) {
    .psk-health-indicator {
        right: 10px;
        bottom: 10px;
        max-width: calc(100vw - 20px);
        padding: 8px 11px;
        font-size: 0.76rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .psk-health-indicator,
    .psk-health-dot {
        animation: none !important;
        transition: none !important;
    }
}
