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

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/* Kanban column scrollbar */
.kanban-column::-webkit-scrollbar {
  width: 4px;
}

/* Drag and drop styles */
.task-card {
  cursor: grab;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

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

.kanban-column.drag-over {
  background-color: #fde4c4;
}

.drop-placeholder {
  border: 2px dashed #e06d10;
  border-radius: 0.5rem;
  background-color: #fef3e2;
  min-height: 80px;
  margin-bottom: 0.5rem;
}

/* Modal backdrop */
.modal-backdrop {
  animation: fadeIn 0.15s ease;
}

.modal-content {
  animation: slideUp 0.2s ease;
}

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

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Toast animations */
.toast {
  animation: slideInRight 0.3s ease;
}

.toast.hiding {
  animation: slideOutRight 0.3s ease forwards;
}

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

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

/* Priority colors */
.priority-low {
  background-color: #e2e8f0;
  color: #475569;
}

.priority-medium {
  background-color: #dbeafe;
  color: #1d4ed8;
}

.priority-high {
  background-color: #fef3c7;
  color: #b45309;
}

.priority-urgent {
  background-color: #fee2e2;
  color: #dc2626;
}

/* Status colors */
.status-todo {
  background-color: #f1f5f9;
  border-left: 3px solid #64748b;
}

.status-in_progress {
  background-color: #eff6ff;
  border-left: 3px solid #3b82f6;
}

.status-review {
  background-color: #fefce8;
  border-left: 3px solid #eab308;
}

.status-done {
  background-color: #f0fdf4;
  border-left: 3px solid #22c55e;
}

/* Avatar placeholder */
.avatar-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  text-transform: uppercase;
}

/* File type icons */
.file-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.file-icon.image { background-color: #dbeafe; color: #2563eb; }
.file-icon.video { background-color: #f3e8ff; color: #9333ea; }
.file-icon.audio { background-color: #fce7f3; color: #db2777; }
.file-icon.pdf { background-color: #fee2e2; color: #dc2626; }
.file-icon.doc { background-color: #dbeafe; color: #1d4ed8; }
.file-icon.sheet { background-color: #dcfce7; color: #16a34a; }
.file-icon.presentation { background-color: #ffedd5; color: #ea580c; }
.file-icon.archive { background-color: #fef3c7; color: #b45309; }
.file-icon.code { background-color: #e0e7ff; color: #4f46e5; }
.file-icon.text { background-color: #f1f5f9; color: #475569; }
.file-icon.other { background-color: #f1f5f9; color: #64748b; }

/* Checkbox custom styling */
.custom-checkbox {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.custom-checkbox:checked {
  background-color: #e06d10;
  border-color: #e06d10;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 16 16' fill='white' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M12.207 4.793a1 1 0 010 1.414l-5 5a1 1 0 01-1.414 0l-2-2a1 1 0 011.414-1.414L6.5 9.086l4.293-4.293a1 1 0 011.414 0z'/%3E%3C/svg%3E");
}

.custom-checkbox:hover {
  border-color: #e06d10;
}

/* Subtask completed style */
.subtask-completed .subtask-title {
  text-decoration: line-through;
  color: #94a3b8;
}

/* Progress bar */
.progress-bar {
  height: 4px;
  border-radius: 2px;
  background-color: #e2e8f0;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background-color: #22c55e;
  transition: width 0.3s ease;
}

/* Sidebar project color indicator */
.project-color-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

/* Due date warning */
.due-date-overdue {
  color: #dc2626;
}

.due-date-soon {
  color: #f59e0b;
}

/* Loading spinner */
.spinner {
  animation: spin 1s linear infinite;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* Button loading state */
.btn-loading {
  position: relative;
  color: transparent !important;
}

.btn-loading::after {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  top: 50%;
  left: 50%;
  margin-left: -8px;
  margin-top: -8px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  border-top-color: transparent;
  animation: spin 0.8s linear infinite;
}

/* Attachment preview */
.attachment-preview {
  max-width: 200px;
  max-height: 150px;
  object-fit: cover;
  border-radius: 8px;
}

/* Comment input focus */
.comment-input:focus {
  outline: none;
  box-shadow: 0 0 0 2px #e06d10;
}

/* Sidebar hover effect */
.sidebar-item {
  transition: background-color 0.15s ease;
}

.sidebar-item:hover {
  background-color: #f1f5f9;
}

.sidebar-item.active {
  background-color: #fde4c4;
  color: #c2570a;
}

/* Kanban header */
.kanban-header {
  position: sticky;
  top: 0;
  background-color: inherit;
  z-index: 10;
}

/* Empty state */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem;
  color: #64748b;
}

.empty-state svg {
  width: 48px;
  height: 48px;
  margin-bottom: 1rem;
  opacity: 0.5;
}

/* Responsive sidebar */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    left: -280px;
    top: 0;
    height: 100vh;
    z-index: 40;
    transition: left 0.3s ease;
  }

  .sidebar.open {
    left: 0;
  }
}

.sidebar-overlay {
  display: none;
}

.sidebar-overlay:not(.hidden) {
  display: block;
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 30;
}

/* Color picker */
.color-option {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  transition: transform 0.15s ease;
  border: 2px solid transparent;
}

.color-option:hover {
  transform: scale(1.1);
}

.color-option.selected {
  border-color: #1f2937;
}

/* Dropdown menu */
.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: 0.5rem;
  min-width: 160px;
  background-color: white;
  border-radius: 0.5rem;
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 50;
  animation: fadeIn 0.15s ease;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  color: #374151;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.dropdown-item:hover {
  background-color: #f3f4f6;
}

.dropdown-item.danger {
  color: #dc2626;
}

.dropdown-item.danger:hover {
  background-color: #fef2f2;
}

/* Chat typing animation */
.typing-dots::after {
  content: '';
  animation: typing-dots 1.5s infinite;
}

@keyframes typing-dots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
  100% { content: ''; }
}

/* Chat widget shadow */
#chat-window {
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}
