/* ===========================
   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: #8528A7;
  color: #fff;                 /* ðŸ‘ˆ FIX */
  border: none;
  padding: 6px 14px;           /* pill size */
  border-radius: 8px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}

  .sx-orders-table .button.view-details:hover {
  background: #9335B6;
  color: #fff;
}
}

/* =========================================
   Customer Dashboard → My Auctions (Mobile)
   Mirror Seller Products Card Layout
   ========================================= */

@media (max-width: 768px) {

  /* Target ONLY My Account auction table */
  .uagb-tabs-body__active .shop_table.shop_table_responsive {
    border: 0;
    width: 100%;
    border-collapse: collapse;
  }

  /* Hide header row (plugin uses first <tr> as header) */
  .uagb-tabs-body__active .shop_table.shop_table_responsive tr:first-child {
    display: none;
  }

  /* Card container */
  .uagb-tabs-body__active .shop_table.shop_table_responsive tr {
    display: block;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 12px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.05);
    padding: 10px;
  }

  /* Key–value rows */
  .uagb-tabs-body__active .shop_table.shop_table_responsive td {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    border: none;
    border-bottom: 1px solid #f5f5f5;
  }

  .uagb-tabs-body__active .shop_table.shop_table_responsive td:last-child {
    border-bottom: none;
  }

  /* Labels (manual because plugin has no data-labels) */
  .uagb-tabs-body__active .shop_table.shop_table_responsive td::before {
    font-weight: 600;
    color: #555;
    flex: 1;
    text-align: left;
    padding-right: 10px;
  }

  .uagb-tabs-body__active .shop_table.shop_table_responsive td:nth-child(1)::before { content: "Image"; }
  .uagb-tabs-body__active .shop_table.shop_table_responsive td:nth-child(2)::before { content: "Name"; }
  .uagb-tabs-body__active .shop_table.shop_table_responsive td:nth-child(3)::before { content: "Your Bid"; }
  .uagb-tabs-body__active .shop_table.shop_table_responsive td:nth-child(4)::before { content: "Current Bid"; }
  .uagb-tabs-body__active .shop_table.shop_table_responsive td:nth-child(5)::before { content: "Status"; }

  /* Image cell fix (mirror seller products) */
  .uagb-tabs-body__active .shop_table.shop_table_responsive tr td:first-child {
    display: block;
    padding: 8px 0;
  }

  .uagb-tabs-body__active .shop_table.shop_table_responsive tr td:first-child::before {
    content: none !important;
  }

  .uagb-tabs-body__active .shop_table.shop_table_responsive tr td:first-child img {
    display: block;
    margin: 0 auto;
    width: 56px !important;
    height: 56px !important;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 8px;
  }
  /* Hide empty auction rows injected by plugin */
.uagb-tabs-body__active .shop_table.shop_table_responsive tr:empty {
    display: none;
}

/* Also catch rows with only whitespace */
.uagb-tabs-body__active .shop_table.shop_table_responsive tr:not(:has(td)) {
    display: none;
}

}

/* Customer Dashboard → Orders (Mobile) — Image row fix */
@media (max-width: 768px) {

  /* Make image row block, not flex */
  .sx-orders-table tr td[data-label="Image"] {
    display: block;
    padding: 8px 0;
    text-align: center;
  }

  /* Remove "Image" label */
  .sx-orders-table tr td[data-label="Image"]::before {
    content: none !important;
  }

  /* Center the thumbnail */
  .sx-orders-table tr td[data-label="Image"] img {
    display: block;
    margin: 0 auto;
    width: 56px !important;
    height: 56px !important;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    border-radius: 8px;
  }
}

