/* TASKSBOT ENHANCED - Live Task Management */

.tasks-bot-enhanced {
  padding: 20px;
  background: var(--bg-secondary);
  border-radius: 8px;
}

.tasks-bot-enhanced h3 {
  margin-top: 0;
  color: var(--text-primary);
  margin-bottom: 15px;
}

.tasks-bot-enhanced h4 {
  color: var(--text-secondary);
  font-size: 0.95em;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 20px 0 10px 0;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 8px;
}

/* Task stats */
.task-stats {
  display: flex;
  gap: 20px;
  margin-bottom: 20px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
}

.task-stats .stat {
  color: var(--text-secondary);
  font-size: 0.9em;
}

.task-stats .stat strong {
  color: var(--accent-primary);
  font-size: 1.2em;
  font-weight: 700;
}

/* Add task section */
.add-task-section {
  margin-bottom: 25px;
  background: var(--bg-tertiary);
  padding: 15px;
  border-radius: 6px;
  border-left: 4px solid var(--accent-primary);
}

.add-task-section h4 {
  margin-top: 0;
  color: var(--text-primary);
}

.add-task-input {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.add-task-input input,
.add-task-input select {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 8px 12px;
  border-radius: 4px;
  font-size: 0.9em;
  transition: all 0.2s ease;
}

.add-task-input input {
  flex: 1;
  min-width: 200px;
}

.add-task-input input:focus,
.add-task-input select:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 4px rgba(59, 130, 246, 0.3);
}

.add-task-input button {
  background: var(--accent-primary);
  color: white;
  border: none;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: 600;
  transition: all 0.2s ease;
}

.add-task-input button:hover {
  background: #2563eb;
  transform: translateY(-2px);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.add-task-input button:active {
  transform: translateY(0);
}

/* Task section */
.task-section {
  margin-bottom: 25px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 40px;
  padding: 12px;
  background: var(--bg-tertiary);
  border-radius: 6px;
  border: 2px dashed transparent;
  transition: all 0.2s ease;
}

.task-list[data-drop-zone="pending"] {
  border-color: var(--border-color);
}

.task-list.drag-over {
  background: var(--drop-zone-bg);
  border-color: var(--accent-primary);
  box-shadow: inset 0 0 8px rgba(59, 130, 246, 0.2);
}

.task-list .empty {
  color: var(--text-tertiary);
  font-size: 0.85em;
  padding: 20px;
  text-align: center;
}

/* Task item */
.task-item {
  background: var(--bg-primary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 12px;
  cursor: move;
  transition: all 0.2s ease;
  border-left: 4px solid var(--border-color);
}

.task-item:hover {
  background: var(--bg-hover);
  border-color: var(--accent-primary);
  transform: translateX(2px);
}

.task-item.dragging {
  opacity: 0.5;
  transform: scale(0.95);
}

/* Priority badges */
.task-item.priority-p1 {
  border-left-color: #ef4444;
  background: rgba(239, 68, 68, 0.05);
}

.task-item.priority-p2 {
  border-left-color: #f59e0b;
  background: rgba(245, 158, 11, 0.05);
}

.task-item.priority-p3 {
  border-left-color: #6b7280;
  background: rgba(107, 114, 128, 0.05);
}

/* Status badges */
.task-item.running {
  border-left-color: #3b82f6;
}

.task-item.completed {
  border-left-color: #10b981;
  opacity: 0.7;
}

.completed-section .task-item {
  cursor: default;
}

/* Task header */
.task-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.priority-badge,
.status-badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.75em;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.3px;
  white-space: nowrap;
  min-width: 50px;
  text-align: center;
}

.priority-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.task-item.priority-p1 .priority-badge {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
}

.task-item.priority-p2 .priority-badge {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}

.task-item.priority-p3 .priority-badge {
  background: rgba(107, 114, 128, 0.2);
  color: #6b7280;
}

.status-badge {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}

.status-badge.running {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
  animation: pulse 2s infinite;
}

.status-badge.completed {
  background: rgba(16, 185, 129, 0.2);
  color: #10b981;
}

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

.task-name {
  flex: 1;
  color: var(--text-primary);
  font-weight: 500;
}

/* Task actions */
.task-actions {
  display: flex;
  gap: 4px;
}

.task-actions button {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  padding: 4px 8px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.85em;
  transition: all 0.2s ease;
}

.task-actions button:hover {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: white;
}

/* Task description */
.task-desc {
  color: var(--text-tertiary);
  font-size: 0.85em;
  margin: 6px 0;
  padding: 6px 0;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  padding-top: 8px;
}

/* Task metadata */
.task-meta {
  display: flex;
  gap: 15px;
  font-size: 0.75em;
  color: var(--text-tertiary);
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.task-meta span {
  display: inline-block;
}

/* Responsive */
@media (max-width: 768px) {
  .tasks-bot-enhanced {
    padding: 15px;
  }

  .task-stats {
    flex-direction: column;
    gap: 10px;
  }

  .task-header {
    flex-wrap: wrap;
  }

  .task-actions {
    order: 3;
    width: 100%;
    justify-content: flex-end;
  }
}
