/*======================================================================
# MEUS_PEDIDOS.CSS - Sidebar de Pedidos do Cliente
======================================================================*/

/*======================================================================
# OVERLAY E SIDEBAR BASE
======================================================================*/
.orders-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  z-index: 9998;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.orders-overlay.active {
  opacity: 1;
  visibility: visible;
}

.orders-sidebar {
  position: fixed;
  top: 0;
  right: -600px;
  width: 100%;
  max-width: 600px;
  height: 100vh;
  background: white;
  z-index: 9999;
  transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 24px rgba(0, 0, 0, 0.15);
}

.orders-sidebar.active {
  right: 0;
}

/*======================================================================
# HEADER
======================================================================*/
.orders-header {
  padding: 24px;
  background: linear-gradient(135deg, #6ac5ca, #4ba3a8);
  color: white;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.orders-header-content {
  flex: 1;
}

.orders-header-content h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 6px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.orders-header-content h3 i {
  font-size: 24px;
}

.orders-count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 14px;
  font-size: 14px;
  font-weight: 700;
}

.orders-header-subtitle {
  font-size: 13px;
  opacity: 0.9;
  margin: 0;
}

.orders-close {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.orders-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

/*======================================================================
# FILTROS
======================================================================*/
.orders-filters {
  padding: 16px 24px;
  background: #f8fafc;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  gap: 8px;
  overflow-x: auto;
}

.orders-filters::-webkit-scrollbar {
  height: 4px;
}

.orders-filters::-webkit-scrollbar-track {
  background: #e2e8f0;
}

.orders-filters::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 2px;
}

.filter-btn {
  padding: 8px 16px;
  border: 2px solid #e2e8f0;
  background: white;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 6px;
}

.filter-btn:hover {
  border-color: #6ac5ca;
  color: #6ac5ca;
}

.filter-btn.active {
  background: linear-gradient(135deg, #6ac5ca, #6ac5ca);
  color: white;
  border-color: #6ac5ca;
}

.filter-btn i {
  font-size: 12px;
}

/*======================================================================
# CONTEÚDO
======================================================================*/
.orders-content {
  flex: 1;
  overflow-y: auto;
  padding: 20px 24px;
}

.orders-content::-webkit-scrollbar {
  width: 8px;
}

.orders-content::-webkit-scrollbar-track {
  background: #f1f1f1;
}

.orders-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

.orders-content::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

/*======================================================================
# LISTA DE PEDIDOS
======================================================================*/
.orders-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.order-card {
  background: white;
  border: 2px solid #e5e7eb;
  border-radius: 16px;
  padding: 20px;
  transition: all 0.3s ease;
  cursor: pointer;
}

.order-card:hover {
  border-color: #6ac5ca;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.15);
  transform: translateY(-2px);
}

.order-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #f3f4f6;
}

.order-number {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-number i {
  color: #6ac5ca;
}

.order-status {
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Status Colors */
.order-status.pendente {
  background: #fef3c7;
  color: #92400e;
}

.order-status.processando {
  background: #dbeafe;
  color: #1e40af;
}

.order-status.enviado {
  background: #ddd6fe;
  color: #5b21b6;
}

.order-status.entregue {
  background: #d1fae5;
  color: #065f46;
}

.order-status.cancelado {
  background: #fee2e2;
  color: #991b1b;
}

.order-card-body {
  margin-bottom: 16px;
}

.order-info-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  font-size: 14px;
}

.order-info-label {
  color: #6b7280;
  display: flex;
  align-items: center;
  gap: 8px;
}

.order-info-label i {
  width: 20px;
  text-align: center;
  color: #6ac5ca;
}

.order-info-value {
  font-weight: 600;
  color: #1f2937;
}

.order-total {
  font-size: 18px;
  color: #6ac5ca;
  font-weight: 700;
}

.order-items-preview {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.order-item-thumb {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid #e5e7eb;
}

.order-items-more {
  width: 50px;
  height: 50px;
  border-radius: 8px;
  background: #f3f4f6;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #6b7280;
  border: 2px solid #e5e7eb;
}

.order-card-footer {
  display: flex;
  gap: 8px;
}

.order-action-btn {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid #e5e7eb;
  background: white;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 700;
  color: #374151;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.order-action-btn:hover {
  border-color: #6ac5ca;
  color: #6ac5ca;
  background: #eff6ff;
}

.order-action-btn.primary {
  background: linear-gradient(135deg, #6ac5ca, #6ac5ca);
  color: white;
  border-color: #6ac5ca;
}

.order-action-btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
}

/*======================================================================
# ESTADOS VAZIOS
======================================================================*/
.orders-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  text-align: center;
}

.orders-empty i {
  font-size: 80px;
  color: #cbd5e1;
  margin-bottom: 20px;
}

.orders-empty h4 {
  font-size: 20px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 12px 0;
}

.orders-empty p {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 24px 0;
  max-width: 300px;
}

.btn-start-shopping-orders {
  padding: 14px 32px;
  background: linear-gradient(135deg, #6ac5ca, #6ac5ca);
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn-start-shopping-orders:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
}

/*======================================================================
# LOADING
======================================================================*/
.orders-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 20px;
  color: #6b7280;
}

.orders-loading i {
  font-size: 48px;
  margin-bottom: 16px;
  animation: spin 1s linear infinite;
}

.orders-loading p {
  font-size: 14px;
  margin: 0;
}

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/*======================================================================
# DETALHES DO PEDIDO (Expansível)
======================================================================*/
.order-details-expanded {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 2px dashed #e5e7eb;
  animation: slideDown 0.3s ease;
}

@keyframes slideDown {
  from {
    opacity: 0;
    max-height: 0;
  }
  to {
    opacity: 1;
    max-height: 1000px;
  }
}

.order-items-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.order-item-detail {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #f9fafb;
  border-radius: 10px;
}

.order-item-detail img {
  width: 60px;
  height: 60px;
  border-radius: 8px;
  object-fit: cover;
  border: 2px solid #e5e7eb;
}

.order-item-info {
  flex: 1;
}

.order-item-name {
  font-size: 14px;
  font-weight: 600;
  color: #1f2937;
  margin-bottom: 4px;
}

.order-item-details {
  font-size: 12px;
  color: #6b7280;
  margin-bottom: 4px;
}

.order-item-price {
  font-size: 14px;
  font-weight: 700;
  color: #6ac5ca;
}

/*======================================================================
# TIMELINE DE RASTREAMENTO
======================================================================*/
.tracking-timeline {
  margin-top: 20px;
  padding: 20px;
  background: #f9fafb;
  border-radius: 12px;
}

.tracking-timeline h5 {
  font-size: 14px;
  font-weight: 700;
  color: #1f2937;
  margin: 0 0 16px 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tracking-timeline h5 i {
  color: #6ac5ca;
}

.timeline-step {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  position: relative;
}

.timeline-step:not(:last-child)::before {
  content: '';
  position: absolute;
  left: 15px;
  top: 32px;
  width: 2px;
  height: calc(100% - 8px);
  background: #e5e7eb;
}

.timeline-step.active::before {
  background: #6ac5ca;
}

.timeline-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #e5e7eb;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #6b7280;
  flex-shrink: 0;
  z-index: 1;
}

.timeline-step.active .timeline-icon {
  background: linear-gradient(135deg, #6ac5ca, #6ac5ca);
  color: white;
}

.timeline-step.completed .timeline-icon {
  background: #10b981;
  color: white;
}

.timeline-content {
  flex: 1;
  padding-top: 4px;
}

.timeline-title {
  font-size: 13px;
  font-weight: 700;
  color: #1f2937;
  margin-bottom: 2px;
}

.timeline-date {
  font-size: 12px;
  color: #6b7280;
}

/*======================================================================
# RESPONSIVE
======================================================================*/
@media (max-width: 768px) {
  .orders-sidebar {
    max-width: 100%;
    right: -100%;
  }
  
  .orders-content {
    padding: 16px;
  }
  
  .orders-filters {
    padding: 12px 16px;
  }
  
  .order-card {
    padding: 16px;
  }
  
  .order-card-footer {
    flex-direction: column;
  }
  
  .order-action-btn {
    width: 100%;
  }
}