/* ===========================
   Shared dashboard filter styles
   =========================== */

.seller-products-filters,
.vendor-orders-filters,
.customer-orders-filters {
  margin-bottom: 15px;
  display: flex;
  justify-content: flex-end; /* align right */
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.seller-products-filters select,
.seller-products-filters button,
.seller-products-filters a,
.vendor-orders-filters select,
.vendor-orders-filters button,
.vendor-orders-filters a,
.customer-orders-filters select,
.customer-orders-filters button,
.customer-orders-filters a {
  display: inline-block;
  width: auto;
  min-width: 120px;
  padding: 4px 6px;
  font-size: 14px;
}

.seller-products-filters button,
.vendor-orders-filters button,
.customer-orders-filters button {
  cursor: pointer;
}

/* =======================================
   Filters (same as seller dashboard)
   ======================================= */
.customer-orders-filters {
  margin-bottom: 15px;
  display: flex;
  justify-content: flex-end; /* align right on desktop */
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.customer-orders-filters select,
.customer-orders-filters button,
.customer-orders-filters a {
  display: inline-block;
  width: auto;
  min-width: 120px;
  padding: 6px 8px;
  font-size: 14px;
  border-radius: 6px;
  border: 1px solid #dcdcdc;
  background: #fff;
  color: #333;
  cursor: pointer;
}

.customer-orders-filters button {
  background: #8528A7;
  color: #fff;
  border: none;
  font-weight: 600;
  transition: background .2s ease;
}
.customer-orders-filters button:hover {
  background: #9335B6;
}

.customer-orders-filters a {
  text-decoration: none;
  color: #8528A7;
  font-weight: 600;
}

/* Mobile-friendly stacking */
@media (max-width: 768px) {
  .customer-orders-filters {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 10px;
  }

  .customer-orders-filters select,
  .customer-orders-filters button,
  .customer-orders-filters a {
    width: 100%;
  }

  .customer-orders-filters a {
    text-align: center;
  }
}

/* =======================================
   SX Customer Orders List
   ======================================= */
.sx-orders-table table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}
.sx-orders-table th,
.sx-orders-table td {
  padding: 12px 15px;
  border-bottom: 1px solid #eee;
  text-align: left;
}
.sx-orders-table th {
  background: #f8f9fc;
  font-weight: 600;
}
.sx-orders-table .button.view-details {
  background: #8528A7;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  color: #fff;
  padding: 6px 10px;
}
.sx-orders-table .button.view-details:hover {
  background: #9335B6;
}
.sx-order-details td {
  background: #fafafa;
}
.sx-order-card {
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
.sx-order-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 15px;
}
.sx-order-header h3 {
  margin: 0;
}
.badge {
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 12px;
  color: #fff;
  text-transform: capitalize;
}
.status-completed { background: #4caf50; }
.status-processing { background: #2196f3; }
.status-on-hold { background: #ff9800; }
.status-cancelled { background: #f44336; }
.sx-bill-ship {
  display: flex;
  gap: 40px;
  margin-bottom: 15px;
}
.sx-bill-ship > div {
  flex: 1;
}
.sx-items {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
}
.sx-items th,
.sx-items td {
  padding: 8px;
  border-bottom: 1px solid #eee;
}
.sx-total-box {
  margin-top: 15px;
}

/* =============== Responsive Table-to-Card =============== */
@media (max-width: 768px) {
  .sx-orders-table table,
  .sx-orders-table thead,
  .sx-orders-table tbody,
  .sx-orders-table th,
  .sx-orders-table td,
  .sx-orders-table tr {
    display: block;
  }

  .sx-orders-table thead {
    display: none;
  }

  .sx-orders-table tr.sx-order-row {
    background: #fff;
    margin-bottom: 14px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;  /* 👈 subtle border */
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
    overflow: hidden;
  }

  .sx-orders-table td {
    padding: 10px 15px;
    border: none;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
  }

  .sx-orders-table td:last-child {
    border-bottom: none;
  }

  .sx-orders-table td::before {
    content: attr(data-label);
    font-weight: 600;
    color: #555;
  }

  .sx-orders-table .button.view-details {
    background: none;
    color: #8528A7;
    border: none;
    padding: 0;
    font-weight: 600;
    text-decoration: underline;
    cursor: pointer;
  }

  .sx-orders-table .button.view-details:hover {
    color: #9335B6;
    text-decoration: none;
  }
}
