/* ===== ORDER HISTORY STYLES ===== */

.order-history-container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem 1rem;
  min-height: 60vh;
}

.order-history-container h5 {
  color: var(--primary-color);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 0.5rem;
}

.order-history-container h1 {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 3rem;
  color: var(--text-color);
}

.order-history-container h1 span {
  color: var(--primary-color);
}

/* Empty Orders Message */
.empty-orders {
  text-align: center;
  padding: 4rem 2rem;
  background: var(--bg-color);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin: 2rem 0;
}

.empty-orders i {
  font-size: 4rem;
  color: var(--primary-color);
  margin-bottom: 1.5rem;
  opacity: 0.7;
}

.empty-orders h2 {
  font-size: 1.8rem;
  color: var(--text-color);
  margin-bottom: 1rem;
}

.empty-orders p {
  color: var(--text-muted);
  font-size: 1.1rem;
  margin-bottom: 2rem;
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

/* Orders Grid */
.orders-grid {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
}

/* Order Card */
.order-card {
  background: var(--bg-color);
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  padding: 1.5rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.order-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
}

.order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.order-id {
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--text-color);
}

.order-status {
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-delivered {
  background: #d4edda;
  color: #155724;
}

.status-pending {
  background: #fff3cd;
  color: #856404;
}

.status-cancelled {
  background: #f8d7da;
  color: #721c24;
}

.status-processing {
  background: #cce5ff;
  color: #004085;
}

.status-shipped {
  background: #e2d9f3;
  color: #432874;
}

.status-refunded {
  background: #e2e3e5;
  color: #383d41;
}

.order-timestamp {
  color: var(--text-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

/* Order Items */
.order-items {
  margin-bottom: 1rem;
}

.order-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border-color);
}

.order-item:last-child {
  border-bottom: none;
}

.order-item img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
}

.order-item-details {
  flex: 1;
}

.order-item-name {
  font-weight: 500;
  color: var(--text-color);
  margin-bottom: 0.25rem;
}

.order-item-quantity {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.order-item-price {
  font-weight: 600;
  color: var(--primary-color);
}

/* Order Total */
.order-total {
  text-align: right;
  padding-top: 1rem;
  border-top: 2px solid var(--border-color);
  margin-bottom: 1rem;
}

.order-total span {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-color);
}

/* Delivery Info */
.order-delivery-info {
  background: var(--bg-secondary);
  padding: 1rem;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.order-delivery-info h4 {
  margin-bottom: 0.75rem;
  color: var(--text-color);
  font-size: 1rem;
}

.order-delivery-info p {
  margin: 0.25rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.order-delivery-info p:first-of-type {
  font-weight: 600;
  color: var(--text-color);
}

.order-delivery-info p em {
  font-style: italic;
  color: var(--text-muted);
}

/* Responsive Design */
@media (max-width: 768px) {
  .order-history-container {
    padding: 1rem 0.5rem;
  }

  .order-history-container h1 {
    font-size: 2rem;
  }

  .orders-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .order-card {
    padding: 1rem;
  }

  .order-item {
    gap: 0.75rem;
  }

  .order-item img {
    width: 40px;
    height: 40px;
  }

  .order-item-name {
    font-size: 0.9rem;
  }

  .order-item-quantity {
    font-size: 0.8rem;
  }

  .order-item-price {
    font-size: 0.9rem;
  }
}

@media (max-width: 480px) {
  .order-history-container h1 {
    font-size: 1.8rem;
  }

  .order-card {
    padding: 0.75rem;
  }

  .order-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .order-status {
    align-self: flex-end;
  }

  .order-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .order-item-price {
    align-self: flex-end;
  }
}

/* Dark Theme Support */
[data-theme="dark"] .order-card {
  background: var(--bg-secondary);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .order-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .empty-orders {
  background: var(--bg-secondary);
}

[data-theme="dark"] .order-delivery-info {
  background: var(--bg-color);
}

[data-theme="dark"] .status-delivered {
  background: #1a3a25; color: #75c98a; 
}

[data-theme="dark"] .status-pending   { 
  background: #3a2f00; color: #ffc94d; 
}

[data-theme="dark"] .status-cancelled { 
  background: #3a0a0f; color: #f07070; 
}

[data-theme="dark"] .status-processing {
  background: #003366;
  color: #66b2ff;
}

[data-theme="dark"] .status-shipped {
  background: #2a1a4a;
  color: #c9a8f5;
}

[data-theme="dark"] .status-refunded {
  background: #2a2a2a;
  color: #b0b0b0;
}