/* Trang đơn hàng — layout/bảng desktop từ products + card mobile */
@import url('../../products/assets/styles.css');

/* --- Bộ lọc nhanh: in đơn --- */
.hny-orders-print-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1rem;
}

.hny-orders-print-filter__btn {
  appearance: none;
  border: 1px solid var(--color-gray-200);
  background: var(--color-white);
  color: var(--color-gray-700);
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hny-orders-print-filter__btn:hover {
  border-color: var(--color-gray-300);
  background: #f8fafc;
}

.hny-orders-print-filter__btn.is-active {
  border-color: #1b77ee;
  background: #eff6ff;
  color: #1b4fd8;
}

@media (min-width: 768px) {
  .product-table-container--orders .hny-orders-col--order {
    width: 14%;
  }

  .product-table-container--orders .hny-orders-col--customer {
    width: 12%;
  }

  .product-table-container--orders .hny-orders-col--tracking {
    width: 24%;
  }
}

.product-table-container--orders .hny-orders-cell--tracking {
  max-width: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
  hyphens: auto;
  font-size: 0.8125rem;
  line-height: 1.35;
}

.product-table-container--orders .product-table__cell--product .product-table__product-name {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  font-size: 0.8125rem;
}

/* --- Mobile: danh sách dạng thẻ, không phân trang (JS bỏ off-page) --- */
@media (max-width: 767px) {
  .product-table-container--orders .hny-orders-table {
    display: none !important;
  }

  .product-table-container--orders .js-order-pager {
    display: none !important;
  }

  .product-table-container--orders .hny-orders-cards {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0 0 1.25rem;
  }

  .products-page__card .products-page__toolbar {
    margin-bottom: 0.5rem;
  }
}

@media (min-width: 768px) {
  .product-table-container--orders .hny-orders-cards {
    display: none !important;
  }
}

/* Bảng desktop: trạng thái in (pill) — pill nằm trong span, không đặt display:inline-block lên <td> */
.product-table-container--orders .hny-order-print-cell {
  text-align: center;
  vertical-align: middle;
}

.product-table-container--orders .hny-order-print {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  line-height: 1.3;
}

.product-table-container--orders .hny-order-print--yes {
  background: #d1fae5;
  color: #047857;
}

.product-table-container--orders .hny-order-print--no {
  background: #fef08a;
  color: #854d0e;
}

.hny-orders-cards__empty {
  margin: 0;
  padding: 2rem 1rem;
  text-align: center;
  color: var(--color-gray-500);
  font-size: 0.9375rem;
}

.hny-order-card {
  background: var(--color-white);
  border-radius: 0.75rem;
  border: 1px solid var(--color-gray-200);
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  padding: 0.875rem 1rem 1rem;
  text-align: left;
}

.hny-order-card--filtered,
.hny-order-card--off-page {
  display: none !important;
}

.hny-order-card__head {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.hny-order-card__print-badge {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  line-height: 1.3;
}

.hny-order-card__print-badge--yes {
  background: #d1fae5;
  color: #047857;
}

.hny-order-card__print-badge--no {
  background: #fef08a;
  color: #854d0e;
}

.hny-order-card__id {
  flex: 1;
  min-width: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--color-gray-800);
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hny-order-card__dropdown {
  flex: 0 0 auto;
  width: auto;
  margin-left: auto;
}

.hny-order-card__kebab {
  min-width: 2.25rem;
}

.hny-order-card__products {
  margin: 0 0 0.75rem;
  font-size: 0.9375rem;
  color: var(--color-gray-900);
  line-height: 1.45;
}

.hny-order-card__contact {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.625rem 0.75rem;
  margin: 0 0 0.75rem;
  border: 1px solid var(--color-gray-200);
  border-radius: 0.625rem;
  background: #f8fafc;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background 0.15s ease;
}

.hny-order-card__contact:active {
  background: #f1f5f9;
}

.hny-order-card__avatar {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #dbeafe 0%, #bfdbfe 100%);
  color: #1d4ed8;
  font-weight: 700;
  font-size: 0.875rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hny-order-card__contact-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.hny-order-card__contact-name {
  font-weight: 700;
  font-size: 0.875rem;
  color: var(--color-gray-900);
}

.hny-order-card__contact-addr {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hny-order-card__chev {
  flex-shrink: 0;
  font-size: 1.25rem;
  color: var(--color-gray-400);
  font-weight: 300;
  line-height: 1;
}

.hny-order-card__pay-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.25rem;
  border-top: 1px solid var(--color-gray-100);
}

.hny-order-card__pay-lbl {
  font-size: 0.8125rem;
  color: var(--color-gray-500);
}

.hny-order-card__pay-val {
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--color-gray-900);
}
