/**
 * TasksBot Styles
 * Task management, drag-drop, and priority reordering
 */

/* TasksBot Section */
.tasksbot-section {
  padding: 20px;
  background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
  border-radius: 12px;
  margin: 20px 0;
  border-left: 4px solid #00d4ff;
}

.tasksbot-section h2 {
  color: #00d4ff;
  margin-bottom: 20px;
  font-size: 1.8em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tasksbot-section h3 {
  color: #a8e6cf;
  margin: 20px 0 15px 0;
  font-size: 1.2em;
}

/* Stats Cards */
.tasksbot-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 15px;
  margin-bottom: 25px;
}

.stat-card {
  background: rgba(0, 212, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.3);
  border-radius: 8px;
  padding: 15px;
  text-align: center;
  transition: all 0.3s ease;
}

.stat-card:hover {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.5);
  transform: translateY(-2px);
}

.stat-icon {
  font-size: 1.5em;
  display: block;
  margin-bottom: 8px;
}

.stat-label {
  color: #888;
  font-size: 0.85em;
  text-transform: uppercase;
  letter-spacing: 1px;
  display: block;
  margin-bottom: 5px;
}

.stat-value {
  color: #00d4ff;
  font-size: 1.8em;
  font-weight: bold;
}

/* Input Section */
.tasksbot-input-section {
  background: rgba(10, 10, 20, 0.5);
  padding: 15px;
  border-radius: 8px;
  margin-bottom: 20px;
  border: 1px solid rgba(0, 212, 255, 0.2);
}

.input-group {
  display: flex;
  gap: 10px;
}

.task-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(0, 212, 255, 0.3);
  color: #fff;
  padding: 12px 15px;
  border-radius: 6px;
  font-size: 1em;
  transition: all 0.3s ease;
}

.task-input:focus {
  outline: none;
  border-color: #00d4ff;
  background: rgba(0, 212, 255, 0.05);
  box-shadow: 0 0 10px rgba(0, 212, 255, 0.2);
}

.task-input::placeholder {
  color: #666;
}

.add-task-button {
  background: linear-gradient(135deg, #00d4ff 0%, #0099cc 100%);
  border: none;
  color: #000;
  padding: 12px 20px;
  border-radius: 6px;
  font-weight: bold;
  cursor: pointer;
  transition: all 0.3s ease;
  font-size: 1em;
}

.add-task-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(0, 212, 255, 0.4);
}

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

/* Task List */
.tasksbot-list-section {
  margin-bottom: 30px;
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 60px;
  background: rgba(10, 10, 20, 0.3);
  padding: 15px;
  border-radius: 8px;
  border: 1px dashed rgba(0, 212, 255, 0.2);
}

.task-list.drag-over {
  background: rgba(0, 212, 255, 0.1);
  border-color: rgba(0, 212, 255, 0.5);
}

/* Task Item */
.task-item {
  display: flex;
  align-items: center;
  gap: 12px;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.05), rgba(168, 230, 207, 0.05));
  border: 1px solid rgba(0, 212, 255, 0.2);
  border-radius: 8px;
  padding: 12px 15px;
  transition: all 0.3s ease;
  cursor: grab;
}

.task-item:hover {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(168, 230, 207, 0.1));
  border-color: rgba(0, 212, 255, 0.4);
  transform: translateX(5px);
}

.task-item.dragging {
  opacity: 0.5;
  background: rgba(255, 100, 100, 0.2);
  border-color: rgba(255, 100, 100, 0.5);
}

.task-drag-handle {
  color: #666;
  font-size: 0.9em;
  flex-shrink: 0;
  cursor: grab;
  user-select: none;
}

.task-drag-handle:active {
  cursor: grabbing;
}

.task-content {
  flex: 1;
  min-width: 0;
}

.task-title {
  color: #fff;
  font-weight: 500;
  margin-bottom: 5px;
  word-break: break-word;
}

.task-meta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  font-size: 0.85em;
}

.task-date {
  color: #888;
}

.task-status {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 500;
}

.task-status.pending {
  background: rgba(255, 165, 0, 0.2);
  color: #ffa500;
}

.task-notes {
  color: #aaa;
  font-size: 0.9em;
  margin-top: 8px;
  padding-left: 10px;
  border-left: 2px solid rgba(0, 212, 255, 0.3);
  font-style: italic;
}

/* Task Actions */
.task-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.task-btn {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
}

.task-btn:hover {
  border-color: #fff;
  transform: scale(1.1);
}

.complete-btn:hover {
  background: rgba(0, 212, 100, 0.2);
  border-color: #00d464;
  color: #00d464;
}

.delete-btn:hover {
  background: rgba(255, 100, 100, 0.2);
  border-color: #ff6464;
  color: #ff6464;
}

/* Completed Tasks Section */
.tasksbot-completed-section {
  background: rgba(10, 10, 20, 0.3);
  padding: 15px;
  border-radius: 8px;
  border: 1px solid rgba(168, 230, 207, 0.2);
}

.completed-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 400px;
  overflow-y: auto;
}

.completed-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: rgba(0, 212, 100, 0.05);
  border-left: 3px solid #00d464;
  padding: 12px 15px;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.completed-item:hover {
  background: rgba(0, 212, 100, 0.1);
}

.completed-content {
  flex: 1;
  min-width: 0;
}

.completed-title {
  color: #a8e6cf;
  font-weight: 500;
  text-decoration: line-through;
  opacity: 0.9;
  word-break: break-word;
}

.completed-meta {
  color: #666;
  font-size: 0.85em;
  margin-top: 5px;
}

/* Empty State */
.empty-state {
  color: #666;
  text-align: center;
  padding: 20px;
  font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
  .tasksbot-stats {
    grid-template-columns: repeat(2, 1fr);
  }

  .input-group {
    flex-direction: column;
  }

  .task-item {
    flex-direction: column;
    align-items: flex-start;
  }

  .task-actions {
    width: 100%;
    margin-left: 40px;
  }
}

/* Scrollbar Styling */
.completed-list::-webkit-scrollbar {
  width: 6px;
}

.completed-list::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
  border-radius: 3px;
}

.completed-list::-webkit-scrollbar-thumb {
  background: rgba(0, 212, 255, 0.3);
  border-radius: 3px;
}

.completed-list::-webkit-scrollbar-thumb:hover {
  background: rgba(0, 212, 255, 0.5);
}
