/* Task Management App - Additional Styles */

.task-done {
  text-decoration: line-through;
  color: #6b7280;
}

.task-item {
  transition: all 0.2s ease-in-out;
}

.task-item:hover {
  background-color: #f9fafb;
}

.btn-primary {
  @apply bg-blue-600 text-white px-4 py-2 rounded-lg hover:bg-blue-700 transition-colors;
}

.btn-secondary {
  @apply bg-gray-600 text-white px-4 py-2 rounded-lg hover:bg-gray-700 transition-colors;
}

.btn-danger {
  @apply bg-red-600 text-white px-4 py-2 rounded-lg hover:bg-red-700 transition-colors;
}

.btn-success {
  @apply bg-green-600 text-white px-4 py-2 rounded-lg hover:bg-green-700 transition-colors;
}

/* Loading spinner */
.spinner {
  border: 4px solid #f3f4f6;
  border-top: 4px solid #3b82f6;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 1s linear infinite;
}

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

/* Mobile-first responsive design */
@media (max-width: 640px) {
  /* Prevent horizontal scroll */
  body {
    overflow-x: hidden;
  }
  
  /* Mobile-friendly task input */
  .task-input-mobile {
    flex-direction: column !important;
  }
  
  /* Ensure buttons are touch-friendly */
  button {
    min-height: 44px;
    touch-action: manipulation;
    font-size: 16px; /* Prevent zoom on iOS */
  }
  
  /* Input fields mobile optimization */
  input[type="text"],
  input[type="email"], 
  input[type="date"] {
    min-height: 44px;
    font-size: 16px; /* Prevent zoom on iOS */
    -webkit-appearance: none; /* Remove iOS styling */
  }
  
  /* Better text wrapping for long task titles */
  .task-title {
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }
  
  /* Compact task list items on mobile */
  .task-item-mobile {
    padding: 12px 16px;
  }
  
  /* Stack filter buttons on small screens */
  .filter-buttons-mobile {
    flex-direction: column;
    width: 100%;
  }
  
  .filter-buttons-mobile button {
    width: 100%;
    margin-bottom: 8px;
  }
  
  /* Smaller gaps on mobile */
  .mobile-gap {
    gap: 0.75rem;
  }
  
  /* Responsive text sizes */
  h1 {
    font-size: 1.25rem;
  }
  
  h2 {
    font-size: 1.125rem;
  }
}

/* Extra small screens (< 480px) */
@media (max-width: 480px) {
  /* Hide non-essential text on very small screens */
  .xs\:hidden {
    display: none !important;
  }
  
  .xs\:inline {
    display: inline !important;
  }
  
  /* Compact header */
  header {
    padding: 0.5rem 0.75rem;
  }
  
  /* Reduced margins */
  .compact-mobile {
    margin: 0.5rem 0;
    padding: 0.75rem;
  }
}

/* Enhanced focus styles for accessibility */
input:focus, button:focus {
  outline: 2px solid #3b82f6;
  outline-offset: 2px;
}

/* Better touch targets */
@media (hover: none) and (pointer: coarse) {
  button, input[type="checkbox"] {
    min-height: 44px;
    min-width: 44px;
  }
}