/* Painel de Filas - Estilos */

.queue-panel {
    position: fixed;
    top: 0;
    right: -400px;
    width: 400px;
    height: 100vh;
    background: #1a1a1a;
    border-left: 2px solid #333;
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.3);
}

.queue-panel.open {
    right: 0;
}

.queue-panel-header {
    background: #2d2d2d;
    padding: 20px;
    border-bottom: 1px solid #444;
    position: sticky;
    top: 0;
    z-index: 10;
}

.queue-panel-title {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 10px 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.queue-panel-title i {
    color: #4CAF50;
}

.queue-stats {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.queue-stat {
    text-align: center;
    flex: 1;
}

.queue-stat-number {
    display: block;
    font-size: 20px;
    font-weight: bold;
    color: #4CAF50;
}

.queue-stat-label {
    display: block;
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    margin-top: 2px;
}

.queue-panel-tabs {
    display: flex;
    border-bottom: 1px solid #444;
    background: #2d2d2d;
}

.queue-tab-btn {
    flex: 1;
    background: none;
    border: none;
    color: #999;
    padding: 15px 10px;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.queue-tab-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.05);
}

.queue-tab-btn.active {
    color: #4CAF50;
    background: rgba(76, 175, 80, 0.1);
    border-bottom: 2px solid #4CAF50;
}

.queue-tab-btn i {
    font-size: 14px;
}

.queue-panel-content {
    flex: 1;
    overflow-y: auto;
}

.queue-tab-content {
    display: none;
    padding: 20px;
}

.queue-tab-content.active {
    display: block;
}

.queue-section {
    margin-bottom: 30px;
}

.queue-section-title {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.queue-section-title i {
    font-size: 12px;
    color: #4CAF50;
}

.queue-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.queue-job-item {
    background: #2d2d2d;
    border-radius: 8px;
    padding: 15px;
    border-left: 4px solid #4CAF50;
    transition: all 0.2s ease;
}

.queue-job-item:hover {
    background: #333;
    transform: translateX(2px);
}

.queue-job-item.status-running {
    border-left-color: #2196F3;
    animation: pulse 2s infinite;
}

.queue-job-item.status-paused {
    border-left-color: #FF9800;
}

.queue-job-item.status-failed {
    border-left-color: #f44336;
}

.queue-job-item.status-completed {
    border-left-color: #4CAF50;
    opacity: 0.7;
}

.queue-job-item.status-cancelled {
    border-left-color: #9E9E9E;
    opacity: 0.6;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(33, 150, 243, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(33, 150, 243, 0); }
    100% { box-shadow: 0 0 0 0 rgba(33, 150, 243, 0); }
}

.queue-job-header {
    display: flex;
    justify-content: between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.queue-job-info {
    flex: 1;
}

.queue-job-site {
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    margin-bottom: 4px;
}

.queue-job-status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.queue-job-status.pending {
    background: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
}

.queue-job-status.running {
    background: rgba(33, 150, 243, 0.2);
    color: #2196F3;
}

.queue-job-status.paused {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.queue-job-status.completed {
    background: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
}

.queue-job-status.failed {
    background: rgba(244, 67, 54, 0.2);
    color: #f44336;
}

.queue-job-status.cancelled {
    background: rgba(158, 158, 158, 0.2);
    color: #9E9E9E;
}

.queue-job-progress {
    margin: 10px 0;
}

.queue-progress-bar {
    width: 100%;
    height: 6px;
    background: #444;
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: 5px;
}

.queue-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #4CAF50, #66BB6A);
    border-radius: 3px;
    transition: width 0.3s ease;
}

.queue-progress-text {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #999;
}

.queue-job-controls {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.queue-control-btn {
    background: #444;
    border: none;
    color: #fff;
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.queue-control-btn:hover {
    background: #555;
    transform: translateY(-1px);
}

.queue-control-btn.play {
    background: #4CAF50;
}

.queue-control-btn.play:hover {
    background: #66BB6A;
}

.queue-control-btn.pause {
    background: #FF9800;
}

.queue-control-btn.pause:hover {
    background: #FFB74D;
}

.queue-control-btn.stop {
    background: #f44336;
}

.queue-control-btn.stop:hover {
    background: #EF5350;
}

.queue-control-btn.delete {
    background: #9E9E9E;
}

.queue-control-btn.delete:hover {
    background: #BDBDBD;
}

.queue-control-btn.edit {
    background: #2196F3;
}

.queue-control-btn.edit:hover {
    background: #42A5F5;
}

.queue-control-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.queue-job-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid #444;
    font-size: 11px;
    color: #999;
}

.queue-job-time {
    display: flex;
    justify-content: space-between;
    margin-bottom: 5px;
}

.queue-job-results {
    display: flex;
    gap: 15px;
}

.queue-result-item {
    display: flex;
    align-items: center;
    gap: 4px;
}

.queue-result-item i {
    font-size: 10px;
}

.queue-result-item.success i {
    color: #4CAF50;
}

.queue-result-item.error i {
    color: #f44336;
}

.queue-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #666;
}

.queue-empty-state i {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.5;
}

.queue-empty-state h3 {
    margin: 0 0 10px 0;
    font-size: 16px;
}

.queue-empty-state p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
}

.queue-toggle-btn {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #4CAF50;
    color: white;
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    z-index: 999;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.queue-toggle-btn:hover {
    background: #66BB6A;
    transform: scale(1.1);
}

.queue-toggle-btn.has-active {
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

.queue-notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: #2d2d2d;
    color: white;
    padding: 15px 20px;
    border-radius: 8px;
    border-left: 4px solid #4CAF50;
    z-index: 1001;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 300px;
}

.queue-notification.show {
    transform: translateX(0);
}

.queue-notification.error {
    border-left-color: #f44336;
}

.queue-notification.warning {
    border-left-color: #FF9800;
}

.queue-notification.info {
    border-left-color: #2196F3;
}

/* Responsividade */
@media (max-width: 768px) {
    .queue-panel {
        width: 100%;
        right: -100%;
    }
    
    .queue-toggle-btn {
        top: 10px;
        right: 10px;
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
}

/* Scrollbar personalizada */
.queue-panel::-webkit-scrollbar {
    width: 6px;
}

.queue-panel::-webkit-scrollbar-track {
    background: #1a1a1a;
}

.queue-panel::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 3px;
}

.queue-panel::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Estilos específicos para agendamentos */
.scheduled-item {
    border-left-color: #FF9800 !important;
}

.queue-job-status.scheduled {
    background: rgba(255, 152, 0, 0.2);
    color: #FF9800;
}

.scheduled-details {
    margin: 10px 0;
    font-size: 12px;
    color: #ccc;
}

.scheduled-details > div {
    margin-bottom: 5px;
}

.scheduled-details strong {
    color: #fff;
}

.scheduled-topic {
    color: #4CAF50;
}

.scheduled-category {
    color: #2196F3;
}

.scheduled-time {
    color: #FF9800;
}

.time-until {
    font-style: italic;
    color: #999;
    margin-left: 10px;
    font-size: 11px;
}
