/* Order management specific styles */

/* Order status badges */
.badge-delivered {
  @apply badge-success;
}

.badge-confirmed {
  @apply badge-info;
}

.badge-pending {
  @apply badge-warning;
}

.badge-cancelled {
  @apply badge-error;
}

/* Order table enhancements */
.order-table {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.order-table thead {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.order-table tbody tr {
  transition: all 0.2s ease-in-out;
}

.order-table tbody tr:hover {
  background-color: rgba(103, 58, 183, 0.05);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Order card animations */
.order-card {
  transition: all 0.3s ease-in-out;
  border: 2px solid transparent;
}

.order-card:hover {
  border-color: rgba(103, 58, 183, 0.2);
  transform: translateY(-4px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.order-card.selected {
  border-color: #667eea;
  box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

/* Order details layout */
.order-details-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.order-info-card {
  background: linear-gradient(145deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid rgba(103, 58, 183, 0.1);
  transition: all 0.2s ease-in-out;
}

.order-info-card:hover {
  border-color: rgba(103, 58, 183, 0.3);
  box-shadow: 0 4px 12px rgba(103, 58, 183, 0.1);
}

/* Order timeline styles */
.order-timeline {
  position: relative;
  padding-left: 2rem;
}

.order-timeline::before {
  content: '';
  position: absolute;
  left: 0.75rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, #667eea, #764ba2);
}

.order-timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1rem;
}

.order-timeline-item::before {
  content: '';
  position: absolute;
  left: -0.5rem;
  top: 0.25rem;
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  background: #667eea;
  border: 3px solid white;
  box-shadow: 0 0 0 2px #667eea;
}

.order-timeline-item.completed::before {
  background: #10b981;
  box-shadow: 0 0 0 2px #10b981;
}

.order-timeline-item.current::before {
  background: #f59e0b;
  box-shadow: 0 0 0 2px #f59e0b;
  animation: pulse 2s infinite;
}

/* Search and filter enhancements */
.search-container {
  position: relative;
}

.search-container::before {
  content: '🔍';
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  opacity: 0.5;
  pointer-events: none;
}

.search-input {
  padding-left: 3rem;
  transition: all 0.2s ease-in-out;
}

.search-input:focus {
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
  border-color: #667eea;
}

/* Order actions */
.order-actions {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.order-actions .btn {
  transition: all 0.2s ease-in-out;
}

.order-actions .btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .order-details-grid {
    grid-template-columns: 1fr;
  }
  
  .order-actions {
    flex-direction: column;
  }
  
  .order-table {
    font-size: 0.875rem;
  }
  
  .order-card {
    margin-bottom: 1rem;
  }
}

/* Print styles */
@media print {
  .no-print,
  .order-actions,
  .btn,
  .search-container,
  .filter-container {
    display: none !important;
  }
  
  .order-card,
  .order-info-card {
    break-inside: avoid;
    border: 1px solid #ccc !important;
    box-shadow: none !important;
  }
  
  .order-table {
    box-shadow: none !important;
  }
}

/* Loading states */
.order-loading {
  opacity: 0.6;
  pointer-events: none;
  position: relative;
}

.order-loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid #f3f3f3;
  border-radius: 50%;
  border-top-color: #667eea;
  animation: spin 1s linear infinite;
}

/* Status indicators */
.status-indicator {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.status-indicator::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 0.5rem;
  background: currentColor;
}

.status-delivered::before {
  background: #10b981;
}

.status-confirmed::before {
  background: #3b82f6;
}

.status-pending::before {
  background: #f59e0b;
}

.status-cancelled::before {
  background: #ef4444;
}

/* Empty state enhancements */
.orders-empty-state {
  text-align: center;
  padding: 4rem 2rem;
}

.orders-empty-state .emoji {
  font-size: 4rem;
  margin-bottom: 1rem;
  opacity: 0.7;
  filter: grayscale(0.2);
}

.orders-empty-state h3 {
  margin-bottom: 1rem;
  color: #374151;
}

.orders-empty-state p {
  color: #6b7280;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* Accessibility improvements */
.order-card:focus,
.order-table tbody tr:focus {
  outline: 2px solid #667eea;
  outline-offset: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}