/**
 * Global Job Queue Widget Styles
 */

.job-queue-widget {
    position: fixed;
    bottom: 0;
    right: 20px;
    width: 400px;
    max-height: 500px;
    background: white;
    border: 1px solid #dee2e6;
    border-bottom: none;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    transition: transform 0.3s ease, opacity 0.3s ease;
    transform: translateY(100%);
    opacity: 0;
    font-size: 14px;
}

.job-queue-widget.visible {
    transform: translateY(0);
    opacity: 1;
}

.job-queue-widget.minimized {
    max-height: 50px;
    overflow: hidden;
}

.job-queue-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px 8px 0 0;
    cursor: pointer;
    user-select: none;
}

.job-queue-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    font-size: 14px;
}

.job-count-badge {
    background: rgba(255, 255, 255, 0.3);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
    display: none;
}

.job-queue-controls {
    display: flex;
    gap: 8px;
}

.job-queue-controls button {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.job-queue-controls button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.job-queue-body {
    max-height: 450px;
    overflow-y: auto;
    padding: 12px;
    background: #f8f9fa;
}

.job-queue-section {
    margin-bottom: 16px;
}

.job-queue-section h6 {
    font-size: 12px;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.jobs-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.no-jobs {
    text-align: center;
    padding: 16px;
    color: #adb5bd;
    font-style: italic;
    font-size: 13px;
}

.job-item {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 12px;
    transition: box-shadow 0.2s;
}

.job-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.job-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.job-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 500;
    color: #495057;
}

.job-title i {
    font-size: 14px;
}

.job-status-badge {
    font-size: 11px;
    padding: 3px 8px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending .job-status-badge {
    background: #fff3cd;
    color: #856404;
}

.status-running .job-status-badge {
    background: #cfe2ff;
    color: #084298;
}

.status-completed .job-status-badge {
    background: #d1e7dd;
    color: #0f5132;
}

.status-failed .job-status-badge {
    background: #f8d7da;
    color: #842029;
}

.status-cancelled .job-status-badge {
    background: #e2e3e5;
    color: #41464b;
}

.job-progress {
    margin: 8px 0;
}

.job-progress .progress {
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
}

.job-progress .progress-bar {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    transition: width 0.3s ease;
    font-size: 10px;
    line-height: 6px;
    color: transparent;
}

.job-meta {
    margin-top: 8px;
    font-size: 11px;
}

.job-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}

.job-actions .btn {
    font-size: 11px;
    padding: 4px 12px;
}

/* Scrollbar styling */
.job-queue-body::-webkit-scrollbar {
    width: 6px;
}

.job-queue-body::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.job-queue-body::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 3px;
}

.job-queue-body::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Status icons */
.status-running .job-title i {
    color: #0d6efd;
}

.status-completed .job-title i {
    color: #198754;
}

.status-failed .job-title i {
    color: #dc3545;
}

.status-pending .job-title i {
    color: #ffc107;
}

.status-cancelled .job-title i {
    color: #6c757d;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .job-queue-widget {
        right: 10px;
        width: calc(100% - 20px);
        max-width: 400px;
    }
}
