/* =================================== */
/* WEBSOCKET NOTIFICATIONS */
/* =================================== */

/* Notification Container (Updated) */
.notification-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
    pointer-events: none;
}

/* Notification Styles (Updated) */
.notification {
    pointer-events: auto;
    background: rgb(var(--card));
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
    padding: 0;
    animation: slideIn 0.3s ease-out;
    position: relative;
    overflow: hidden;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: rgb(var(--muted) / 0.5);
    border-bottom: 1px solid rgb(var(--border));
}

.notification-header strong {
    font-size: 0.9rem;
    color: rgb(var(--foreground));
}

.notification-close {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: rgb(var(--muted-foreground));
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.notification-close:hover {
    color: rgb(var(--foreground));
}

.notification-body {
    padding: 12px 15px;
    color: rgb(var(--foreground));
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Notification Types with left border */
.notification-info {
    border-left: 4px solid rgb(var(--info));
}

.notification-success {
    border-left: 4px solid rgb(var(--success));
}

.notification-warning {
    border-left: 4px solid rgb(var(--warning));
}

.notification-error {
    border-left: 4px solid rgb(var(--destructive));
}

/* Notification animation */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* WebSocket Connection Status */
.ws-connection-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 10px;
    transition: all 0.3s ease;
}

.ws-connection-indicator.connected {
    background-color: rgb(var(--success));
    box-shadow: 0 0 0 2px rgb(var(--success) / 0.3);
}

.ws-connection-indicator.disconnected {
    background-color: rgb(var(--destructive));
    animation: blink 1s infinite;
}

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

/* MCP Router Status Indicator in UI */
.mcp-router-status {
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
}

.mcp-router-status.running {
    background-color: rgb(var(--success) / 0.1);
    border: 1px solid rgb(var(--success) / 0.3);
    color: rgb(var(--success-text));
}

.mcp-router-status.stopped {
    background-color: rgb(var(--destructive) / 0.1);
    border: 1px solid rgb(var(--destructive) / 0.3);
    color: rgb(var(--destructive-text));
}

.proxy-status-text {
    font-weight: 600;
    font-size: 0.9rem;
}

.proxy-failure-count {
    font-size: 0.8rem;
    opacity: 0.8;
    margin-left: 10px;
}

/* Mobile responsive notifications */
@media (max-width: 768px) {
    .notification-container {
        top: 60px;
        right: 10px;
        left: 10px;
        max-width: none;
    }
    
    .notification {
        margin-bottom: 8px;
    }
    
    @keyframes slideIn {
        from {
            transform: translateY(-20px);
            opacity: 0;
        }
        to {
            transform: translateY(0);
            opacity: 1;
        }
    }
}

/* =================================== */
/* UPLOAD AREA STYLES */
/* =================================== */

/* Upload area (drag & drop zone) */
.upload-area,
.drop-zone {
    border: 2px dashed rgb(var(--border));
    border-radius: var(--radius);
    padding: 3rem;
    text-align: center;
    background: rgb(var(--card));
    cursor: pointer;
    transition: all 0.3s ease;
}

.upload-area:hover,
.upload-area.dragover,
.drop-zone:hover,
.drop-zone.dragover {
    border-color: rgb(var(--primary));
    background: rgb(var(--primary) / 0.05);
}

/* Dark mode specific styles for upload area */
[data-theme="dark"] .upload-area,
[data-theme="dark"] .drop-zone {
    background: rgb(var(--card));
    border-color: rgb(var(--border));
}

[data-theme="dark"] .upload-area:hover,
[data-theme="dark"] .upload-area.dragover,
[data-theme="dark"] .drop-zone:hover,
[data-theme="dark"] .drop-zone.dragover {
    background: rgb(var(--primary) / 0.1);
    border-color: rgb(var(--primary));
}

/* Auto theme detection for upload area */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme]) .upload-area,
    :root:not([data-theme]) .drop-zone {
        background: rgb(var(--card));
        border-color: rgb(var(--border));
    }
    
    :root:not([data-theme]) .upload-area:hover,
    :root:not([data-theme]) .upload-area.dragover,
    :root:not([data-theme]) .drop-zone:hover,
    :root:not([data-theme]) .drop-zone.dragover {
        background: rgb(var(--primary) / 0.1);
        border-color: rgb(var(--primary));
    }
}

/* =================================== */
/* ADDITIONAL COMPONENTS */
/* =================================== */

/* Logs statistics */
.logs-stats .stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.5rem;
    background-color: rgb(var(--muted) / 0.3);
    border-radius: 0.5rem;
    border: 1px solid rgb(var(--border));
    min-width: 80px;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: rgb(var(--foreground));
    line-height: 1;
}

.stat-label {
    font-size: 0.7rem;
    color: rgb(var(--muted-foreground));
    text-align: center;
    margin-top: 0.25rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Additional task card animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.execution-card.new-task {
    animation: fadeIn 0.5s ease-out;
}

/* Dark mode sidebar adjustments */
[data-theme="dark"] .sidebar {
    background-color: rgb(var(--card));
    border-right-color: rgb(var(--border));
}

[data-theme="dark"] .top-bar {
    background-color: rgb(var(--card));
    border-bottom-color: rgb(var(--border));
}
