/* ==========================================================
   Team Task Management - Custom Stylesheet
   ========================================================== */

/* Custom Scrollbar for Kanban columns */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

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

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

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

/* Kanban Column Container */
.kanban-column {
  background-color: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 1rem;
  display: flex;
  flex-direction: column;
  height: calc(100vh - 280px);
  min-height: 480px;
  transition: all 0.2s ease-in-out;
}

.kanban-column.drag-over {
  background-color: #eff6ff;
  border-color: #3b82f6;
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.kanban-cards-wrapper {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Task Card Styling */
.task-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 0.75rem;
  padding: 0.875rem;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  cursor: grab;
  user-select: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  position: relative;
}

.task-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  border-color: #cbd5e1;
}

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

/* Dragging States */
.task-card.is-dragging {
  opacity: 0.4;
  transform: scale(0.98);
  box-shadow: none;
}

/* Deadline status styling */
.deadline-badge-normal {
  background-color: #f1f5f9;
  color: #475569;
  border: 1px solid #e2e8f0;
}

.deadline-badge-warning {
  background-color: #fffbeb;
  color: #b45309;
  border: 1px solid #fde68a;
  animation: pulse-border 2s infinite ease-in-out;
}

.deadline-badge-danger {
  background-color: #fef2f2;
  color: #b91c1c;
  border: 1px solid #fecaca;
  font-weight: 600;
}

@keyframes pulse-border {
  0%, 100% {
    border-color: #fde68a;
  }
  50% {
    border-color: #f59e0b;
  }
}

/* Card Accent Border according to deadline */
.task-card.card-overdue {
  border-left: 4px solid #ef4444;
}

.task-card.card-due-soon {
  border-left: 4px solid #f59e0b;
}

.task-card.card-normal {
  border-left: 4px solid #3b82f6;
}

.task-card.card-done {
  border-left: 4px solid #10b981;
}

/* Toast Notifications */
.toast {
  animation: slide-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
  pointer-events: auto;
}

.toast.hiding {
  animation: slide-out 0.25s ease-in forwards;
}

@keyframes slide-in {
  from {
    opacity: 0;
    transform: translateY(1rem) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slide-out {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
  to {
    opacity: 0;
    transform: translateY(1rem) scale(0.95);
  }
}

/* Modal Animation */
#task-modal > div,
#members-modal > div,
#firebase-modal > div {
  animation: modal-pop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modal-pop {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
