/* Issue Drag and Drop Styles */

/* Draggable issue cards */
.issue-card[draggable="true"] {
  cursor: grab;
  transition: all 0.2s ease;
}

.issue-card[draggable="true"]:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.issue-card.dragging {
  opacity: 0.8;
  transform: rotate(5deg);
  cursor: grabbing;
  z-index: 1000;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

/* Drop zones */
.drop-zone {
  min-height: 200px;
  border-radius: 8px;
  transition: all 0.3s ease;
  position: relative;
}

.drop-zone-active {
  background-color: rgba(59, 130, 246, 0.05);
  border: 2px dashed rgba(59, 130, 246, 0.3);
}

.drop-zone.drag-over {
  background-color: rgba(59, 130, 246, 0.1);
  border: 2px dashed rgba(59, 130, 246, 0.6);
  transform: scale(1.02);
}

/* Drop zone indicators */
.drop-zone-active::before {
  content: "Drop here to update status";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(59, 130, 246, 0.9);
  color: white;
  padding: 8px 16px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
  z-index: 10;
}

.drop-zone.drag-over::before {
  opacity: 1;
}

/* Status-specific drop zone colors */
.drop-zone[data-status="open"].drag-over {
  background-color: rgba(220, 38, 38, 0.1);
  border-color: rgba(220, 38, 38, 0.6);
}

.drop-zone[data-status="open"].drag-over::before {
  background: rgba(220, 38, 38, 0.9);
  content: "Drop to mark as Open";
}

.drop-zone[data-status="doing"].drag-over {
  background-color: rgba(245, 158, 11, 0.1);
  border-color: rgba(245, 158, 11, 0.6);
}

.drop-zone[data-status="doing"].drag-over::before {
  background: rgba(245, 158, 11, 0.9);
  content: "Drop to mark as In Progress";
}

.drop-zone[data-status="resolved"].drag-over {
  background-color: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.6);
}

.drop-zone[data-status="resolved"].drag-over::before {
  background: rgba(34, 197, 94, 0.9);
  content: "Drop to mark as Resolved";
}

/* Loading state for updating issues */
.issue-card.updating-status {
  position: relative;
  pointer-events: none;
}

.issue-card.updating-status::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-top: 2px solid #3498db;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Status update animation */
.issue-card.status-updated {
  animation: statusUpdate 0.3s ease;
}

@keyframes statusUpdate {
  0% {
    transform: scale(1);
    background-color: rgba(34, 197, 94, 0.1);
  }
  50% {
    transform: scale(1.05);
    background-color: rgba(34, 197, 94, 0.2);
  }
  100% {
    transform: scale(1);
    background-color: transparent;
  }
}

/* Notification styles */
.notification {
  position: fixed;
  top: 20px;
  right: 20px;
  padding: 12px 20px;
  border-radius: 6px;
  color: white;
  font-weight: 500;
  z-index: 10000;
  animation: slideIn 0.3s ease;
  max-width: 400px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification-success {
  background-color: #10b981;
}

.notification-error {
  background-color: #ef4444;
}

.notification-info {
  background-color: #3b82f6;
}

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

/* Empty drop zone styling */
.drop-zone:empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #6b7280;
  font-style: italic;
}

.drop-zone:empty::after {
  content: "No issues in this status";
  opacity: 0.6;
}

.drop-zone-active:empty::after {
  content: "Drop issues here";
  opacity: 1;
  font-weight: 500;
}

/* Resolved zone special styling */
.resolved-drop-zone {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: 8px;
}

.resolved-drop-zone h5 {
  color: #059669;
  margin-bottom: 1rem;
  margin-top: 0;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
  .drop-zone-active::before {
    font-size: 12px;
    padding: 6px 12px;
  }
  
  .notification {
    top: 10px;
    right: 10px;
    left: 10px;
    max-width: none;
  }
  
  .issue-card.dragging {
    transform: rotate(2deg);
  }
}

/* Touch device improvements */
@media (pointer: coarse) {
  .issue-card[draggable="true"] {
    cursor: default;
  }
  
  .drop-zone-active::before {
    opacity: 0.8;
  }
}
