/**
 * Slonana Dashboard - Component Styles
 * SSH-Free Debugging UI Components
 */

/* Global Alerts Banner */
.global-alerts {
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* System Resources Panel */
.resources-panel {
    background: #f9f9f9;
    border: 3px solid #000;
    padding: 20px;
    margin-bottom: 20px;
}

.resource-card {
    background: #fff;
    border: 2px solid #000;
    padding: 15px;
    transition: all 0.2s;
}

.resource-card:hover {
    box-shadow: 4px 4px 0 #000;
    transform: translate(-2px, -2px);
}

/* Error Tracking */
.error-tracking-panel {
    background: #fff;
    border: 3px solid #000;
    padding: 20px;
    margin-bottom: 20px;
}

.error-group {
    border-left: 4px solid #e74c3c;
    padding: 12px;
    margin-bottom: 12px;
    background: #ffebee;
    transition: all 0.2s;
}

.error-group:hover {
    background: #ffcdd2;
}

/* Auto-refresh Indicator */
.auto-refresh-indicator {
    box-shadow: 0 4px 6px rgba(0,0,0,0.3);
}

/* Diagnostic Actions */
.diagnostic-btn {
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.diagnostic-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
}

.diagnostic-btn:active {
    transform: translateY(0);
    box-shadow: none;
}

/* Status Badges */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.healthy {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-badge.warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.status-badge.critical {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Real-time Indicators */
.realtime-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
    animation: blink 2s infinite;
}

.realtime-dot.active {
    background: #27ae60;
}

.realtime-dot.inactive {
    background: #95a5a6;
}

@keyframes blink {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.3;
    }
}

/* Metric Trends */
.metric-trend {
    font-size: 11px;
    margin-top: 6px;
    font-weight: 600;
}

.metric-trend.up {
    color: #27ae60;
}

.metric-trend.down {
    color: #e74c3c;
}

.metric-trend.stable {
    color: #3498db;
}

.metric-trend::before {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    margin-right: 5px;
}

.metric-trend.up::before {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #27ae60;
}

.metric-trend.down::before {
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid #e74c3c;
}

/* Loading States */
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #000;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive Design */
@media (max-width: 768px) {
    .resource-card {
        padding: 10px;
    }

    .error-group {
        padding: 8px;
    }

    .auto-refresh-indicator {
        bottom: 10px;
        right: 10px;
        font-size: 9px;
        padding: 6px 10px;
    }
}
