/* Kanban Board Custom Styles */

:root {
  /* Background */
  --bg-primary: #0f0f0f;
  --bg-secondary: #1a1a1a;
  --bg-tertiary: #262626;
  --bg-card: #1e1e1e;
  
  /* Text */
  --text-primary: #ffffff;
  --text-secondary: #a3a3a3;
  --text-muted: #737373;
  
  /* Accent */
  --accent-primary: #3b82f6;
  --accent-success: #22c55e;
  --accent-warning: #f59e0b;
  --accent-danger: #ef4444;
  
  /* Priority Colors */
  --priority-high: #ef4444;
  --priority-medium: #f59e0b;
  --priority-low: #3b82f6;
  
  /* Borders */
  --border-subtle: #2e2e2e;
  --border-medium: #404040;
}

body {
  background-color: var(--bg-primary);
}

/* Task Card Styles */
.task-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: 0.75rem;
  padding: 1rem;
  cursor: grab;
  transition: all 0.2s ease;
}

.task-card:hover {
  border-color: var(--border-medium);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.task-card:active {
  cursor: grabbing;
}

.task-card.dragging {
  opacity: 0.5;
  transform: rotate(3deg);
}

/* SortableJS Drag States */
.task-ghost {
  opacity: 0.4;
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.task-chosen {
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
  transform: rotate(2deg) scale(1.02);
}

.task-drag {
  opacity: 0;
}

.task-card.sortable-ghost {
  opacity: 0.4;
  background: var(--accent-primary);
  border-color: var(--accent-primary);
}

.task-card.sortable-chosen {
  box-shadow: 0 8px 25px rgba(59, 130, 246, 0.3);
}

/* Priority Indicators */
.priority-high {
  border-left: 3px solid var(--priority-high);
}

.priority-medium {
  border-left: 3px solid var(--priority-medium);
}

.priority-low {
  border-left: 3px solid var(--priority-low);
}

/* Task List */
.task-list {
  min-height: 200px;
  transition: background-color 0.2s ease;
}

.task-list.sortable-drag {
  background-color: rgba(59, 130, 246, 0.1);
}

/* Toast Notifications */
.toast {
  animation: slideIn 0.3s ease-out;
}

.toast.removing {
  animation: slideOut 0.3s ease-in forwards;
}

@keyframes slideIn {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideOut {
  from {
    transform: translateX(0);
    opacity: 1;
  }
  to {
    transform: translateX(100%);
    opacity: 0;
  }
}

/* Empty State */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  color: var(--text-muted);
  text-align: center;
}

/* Smooth scrolling */
html {
  scroll-behavior: smooth;
}

/* Custom scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
  background: var(--bg-tertiary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--border-medium);
}

/* Focus styles */
*:focus-visible {
  outline: 2px solid var(--accent-primary);
  outline-offset: 2px;
}

/* Modal animations */
#task-modal,
#stats-modal {
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .task-card {
    padding: 0.75rem;
  }
}

/* Drop zone active state during drag */
.drop-zone-active {
  background-color: rgba(59, 130, 246, 0.05) !important;
  border: 2px dashed rgba(59, 130, 246, 0.3);
  border-radius: 0.5rem;
}

/* Body class during drag */
body.is-dragging {
  cursor: grabbing !important;
  user-select: none;
}

body.is-dragging * {
  cursor: grabbing !important;
}

/* Loading spinner animation */
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Line clamp for descriptions */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Modal backdrop blur */
#modal-backdrop,
#stats-backdrop {
  backdrop-filter: blur(4px);
}

/* Button hover states */
button {
  transition: all 0.15s ease;
}

/* Pulse animation for loading */
@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Card entrance animation */
.task-card {
  animation: cardSlideIn 0.2s ease-out;
}

@keyframes cardSlideIn {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Status column hover hint */
.column:hover .task-list {
  background-color: rgba(255, 255, 255, 0.02);
}

/* Select dropdown styling */
select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
  background-position: right 0.5rem center;
  background-repeat: no-repeat;
  background-size: 1.5em 1.5em;
  padding-right: 2.5rem;
}
