/**
 * Domen Hub — Domain Health Check CSS
 * Visual system adhering strictly to frozen Domen Hub tokens.
 * Zero horizontal overflow guaranteed on viewports 320px to 1440px+.
 */

.health-container {
    max-width: 1040px;
    margin: 0 auto 48px;
    padding: 0 16px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

/* Overall Status Banner */
.health-banner {
    background: #FFFFFF;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 2px 8px rgba(11, 29, 51, 0.04);
    padding: 24px;
    margin-bottom: 24px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.health-banner-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}

.health-domain-title {
    font-size: 22px;
    font-weight: 800;
    color: var(--brand-primary, #0B1D33);
    word-break: break-all;
    overflow-wrap: anywhere;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.health-domain-subtitle {
    font-size: 13px;
    color: var(--brand-text-muted, #627D98);
    font-family: var(--font-mono, monospace);
    word-break: break-all;
}

.health-summary-text {
    font-size: 15px;
    line-height: 1.5;
    color: var(--brand-text, #102A43);
    margin-bottom: 16px;
}

.health-counts-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 14px;
    border-top: 1px solid var(--brand-border, #E2E8F0);
}

.health-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
}

.health-count-ok {
    background: rgba(0, 200, 150, 0.1);
    color: #008764;
    border: 1px solid rgba(0, 200, 150, 0.25);
}

.health-count-attention {
    background: rgba(245, 158, 11, 0.1);
    color: #B45309;
    border: 1px solid rgba(245, 158, 11, 0.25);
}

.health-count-problem {
    background: rgba(239, 68, 68, 0.1);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.25);
}

.health-count-unknown {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
}

.health-timing-meta {
    font-size: 12px;
    color: var(--brand-text-muted, #627D98);
    margin-left: auto;
}

/* Partial warning banner */
.health-partial-note {
    background: #F8FAFC;
    border: 1px solid #CBD5E1;
    border-left: 4px solid #64748B;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 24px;
    font-size: 13.5px;
    color: #334155;
    display: flex;
    align-items: center;
    gap: 10px;
    line-height: 1.4;
}

/* Severity Badges */
.health-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 8px;
    line-height: 1.2;
    white-space: nowrap;
    flex-shrink: 0;
}

.health-badge-ok {
    background: rgba(0, 200, 150, 0.15);
    color: #008764;
    border: 1px solid rgba(0, 200, 150, 0.35);
}

.health-badge-attention {
    background: rgba(245, 158, 11, 0.15);
    color: #B45309;
    border: 1px solid rgba(245, 158, 11, 0.35);
}

.health-badge-problem {
    background: rgba(239, 68, 68, 0.15);
    color: #DC2626;
    border: 1px solid rgba(239, 68, 68, 0.35);
}

.health-badge-unknown {
    background: #F1F5F9;
    color: #475569;
    border: 1px solid #CBD5E1;
}

/* Component Grid */
.health-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    width: 100%;
    box-sizing: border-box;
    min-width: 0;
}

.health-card {
    background: #FFFFFF;
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-lg, 12px);
    box-shadow: 0 1px 3px rgba(11, 29, 51, 0.04);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-width: 0;
    width: 100%;
    box-sizing: border-box;
}

.health-card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--brand-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    background: #FAFCFE;
}

.health-card-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--brand-primary, #0B1D33);
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.health-card-body {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.health-field-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.health-field-item {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    font-size: 13.5px;
    line-height: 1.4;
}

.health-field-label {
    color: var(--brand-text-muted, #627D98);
    flex-shrink: 0;
}

.health-field-value {
    color: var(--brand-text, #102A43);
    font-weight: 600;
    text-align: right;
    word-break: normal;
    overflow-wrap: break-word;
}

.health-val-break {
    word-break: break-all;
    overflow-wrap: anywhere;
}

.health-card-footer {
    padding: 14px 20px;
    border-top: 1px solid var(--brand-border, #E2E8F0);
    background: #FAFCFE;
    display: flex;
    justify-content: flex-end;
}

/* Empty State Cards */
.health-empty-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-top: 32px;
}

.health-empty-feature {
    background: #FFFFFF;
    border: 1px solid var(--brand-border);
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(11, 29, 51, 0.03);
}

.health-empty-icon {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: rgba(20, 125, 245, 0.08);
    color: var(--brand-accent, #147DF5);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    margin: 0 auto 12px;
}

.health-empty-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--brand-primary, #0B1D33);
    margin-bottom: 6px;
}

.health-empty-desc {
    font-size: 12.5px;
    color: var(--brand-text-muted, #627D98);
    line-height: 1.4;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .health-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .health-empty-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    
    .health-banner {
        padding: 18px 16px;
    }
    
    .health-timing-meta {
        margin-left: 0;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .health-empty-grid {
        grid-template-columns: 1fr;
    }
    
    .health-field-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 2px;
    }
    
    .health-field-value {
        text-align: left;
    }
}
