/* Custom styles for K8s Log Streamer */

:root {
    --primary: #3B82F6;
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --bg: #F9FAFB;
    --text: #111827;
}

* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Lucide icon sizing */
.lucide {
    width: 1.25rem;
    height: 1.25rem;
    display: inline-block;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-success {
    background-color: #D1FAE5;
    color: #065F46;
}

.badge-warning {
    background-color: #FEF3C7;
    color: #92400E;
}

.badge-error {
    background-color: #FEE2E2;
    color: #991B1B;
}

.badge-info {
    background-color: #DBEAFE;
    color: #1E40AF;
}

.badge-gray {
    background-color: #F3F4F6;
    color: #374151;
}

/* Log viewer */
.log-viewer {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', 'Consolas', monospace;
    font-size: 0.875rem;
    line-height: 1.5;
    background-color: #1E293B;
    color: #E2E8F0;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    max-height: calc(100vh - 300px);
    overflow-y: auto;
}

.log-line {
    white-space: pre-wrap;
    word-break: break-all;
    padding: 0.125rem 0;
}

.log-line:hover {
    background-color: #334155;
}

.log-line.highlight {
    background-color: #FEF3C7;
    color: #92400E;
}

/* Loading spinner */
.spinner {
    border: 2px solid #f3f3f3;
    border-top: 2px solid var(--primary);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Pulse animation for loading states */
.pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Card hover effect */
.card-hover {
    transition: transform 0.2s, box-shadow 0.2s;
}

.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* Connection status indicator */
.status-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 0.5rem;
}

.status-indicator.connected {
    background-color: var(--success);
    box-shadow: 0 0 8px var(--success);
}

.status-indicator.disconnected {
    background-color: var(--error);
}

/* Responsive utilities */
@media (max-width: 768px) {
    .log-viewer {
        font-size: 0.75rem;
        max-height: calc(100vh - 400px);
    }
}
