/* /srv/monitor/monitoring/public/css/dashboard_vps_health.css */

.vps-health-bar {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 42px;
    margin: 0 0 12px 0;
    padding: 9px 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-left-width: 5px;
    border-radius: 12px;
    background: rgba(15, 23, 42, 0.04);
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
    color: #0f172a;
    text-decoration: none;
}

.vps-health-bar:hover,
.vps-health-bar:focus {
    color: #0f172a;
    text-decoration: none;
}

.vps-health-bar:focus-visible {
    outline: 3px solid rgba(59, 130, 246, 0.35);
    outline-offset: 2px;
}

.vps-health-main {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.vps-health-state {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    font-weight: 800;
}

.vps-health-dot {
    width: 14px;
    height: 14px;
    flex: 0 0 auto;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 3px rgba(148, 163, 184, 0.22);
}

.vps-health-title {
    letter-spacing: 0.02em;
}

.vps-health-message {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: 650;
}

.vps-health-meta {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex: 0 0 auto;
    gap: 6px;
    font-size: 12px;
    color: #475569;
}

.vps-health-meta span {
    display: inline-flex;
    align-items: center;
    min-height: 24px;
    padding: 3px 8px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(148, 163, 184, 0.26);
    color: inherit;
    text-decoration: none;
    white-space: nowrap;
}

.vps-health-ok {
    border-color: rgba(34, 197, 94, 0.45);
    border-left-color: #16a34a;
    background: rgba(34, 197, 94, 0.10);
}

.vps-health-ok .vps-health-dot {
    background: #16a34a;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22);
}

.vps-health-warn {
    border-color: rgba(245, 158, 11, 0.52);
    border-left-color: #f59e0b;
    background: rgba(245, 158, 11, 0.12);
}

.vps-health-warn .vps-health-dot {
    background: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.24);
}

.vps-health-failed {
    border-color: rgba(239, 68, 68, 0.52);
    border-left-color: #dc2626;
    background: rgba(239, 68, 68, 0.11);
}

.vps-health-failed .vps-health-dot {
    background: #dc2626;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.22);
}

.vps-health-unknown {
    border-color: rgba(100, 116, 139, 0.45);
    border-left-color: #64748b;
    background: rgba(100, 116, 139, 0.10);
}

.vps-health-unknown .vps-health-dot {
    background: #64748b;
    box-shadow: 0 0 0 3px rgba(100, 116, 139, 0.22);
}

.vps-health-tooltip {
    display: none;
    position: absolute;
    z-index: 80;
    left: 14px;
    right: 14px;
    top: calc(100% + 8px);
    max-height: 430px;
    overflow: auto;
    padding: 12px 14px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    border-radius: 12px;
    background: #0f172a;
    color: #f8fafc;
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.45;
    white-space: normal;
}

.vps-health-bar:hover .vps-health-tooltip,
.vps-health-bar:focus .vps-health-tooltip,
.vps-health-bar:focus-within .vps-health-tooltip {
    display: block;
}

@media (max-width: 1100px) {
    .vps-health-bar {
        align-items: stretch;
        flex-direction: column;
        gap: 7px;
    }

    .vps-health-main {
        align-items: flex-start;
        flex-direction: column;
        gap: 5px;
    }

    .vps-health-message {
        white-space: normal;
    }

    .vps-health-meta {
        justify-content: flex-start;
    }
}


/* Header-Ampelpunkt für den globalen VPS-Health-Status */
.vps-health-header-dot {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    margin: 0 10px 0 0;
    border-radius: 999px;
    text-decoration: none;
    flex: 0 0 auto;
}

.vps-health-header-dot:focus-visible {
    outline: 3px solid rgba(255, 255, 255, 0.42);
    outline-offset: 3px;
}

.vps-health-header-dot-inner {
    display: block;
    width: 13px;
    height: 13px;
    border-radius: 999px;
    background: #94a3b8;
    box-shadow: 0 0 0 4px rgba(148, 163, 184, 0.22);
}

.vps-health-header-dot-ok .vps-health-header-dot-inner {
    background: #16a34a;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.28);
}

.vps-health-header-dot-warn .vps-health-header-dot-inner {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.30);
}

.vps-health-header-dot-failed .vps-health-header-dot-inner {
    background: #dc2626;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.30);
}

.vps-health-header-dot-unknown .vps-health-header-dot-inner {
    background: #64748b;
    box-shadow: 0 0 0 4px rgba(100, 116, 139, 0.28);
}
