/**
 * Order Tracking page — order details table and address blocks.
 *
 * @package element47-aesop
 */

.e47-order-tracking-page .woocommerce-order-details,
.e47-order-tracking-page .woocommerce-customer-details {
  margin-top: 1.5rem;
}

.e47-order-tracking-page .woocommerce-order-details__title,
.e47-order-tracking-page .woocommerce-column__title {
  margin: 0 0 1rem;
  font-family: var(--e47-font-heading);
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--e47-color-text-strong);
}

.e47-order-tracking-page .woocommerce-order-details {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.e47-order-tracking-page table.shop_table,
.e47-order-tracking-page table.order_details {
  width: 100%;
  min-width: 28rem;
  display: table;
  table-layout: fixed;
  border-collapse: collapse;
  border: 1px solid var(--e47-color-border, #ddd5c8);
  background: var(--e47-color-bg-card, #fffdf9);
}

.e47-order-tracking-page table.shop_table thead,
.e47-order-tracking-page table.shop_table tbody,
.e47-order-tracking-page table.shop_table tfoot {
  display: table-row-group;
}

.e47-order-tracking-page table.shop_table thead {
  display: table-header-group;
}

.e47-order-tracking-page table.shop_table tr {
  display: table-row;
}

.e47-order-tracking-page table.shop_table th,
.e47-order-tracking-page table.shop_table td {
  display: table-cell;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--e47-color-border-subtle, #ebe6dc);
  text-align: left;
  vertical-align: top;
}

.e47-order-tracking-page table.shop_table thead th {
  font-size: var(--e47-text-sm);
  letter-spacing: var(--e47-tracking-label);
  text-transform: uppercase;
  color: var(--e47-color-text-muted);
  background: var(--e47-color-bg-cream);
  font-weight: var(--e47-weight-medium);
}

.e47-order-tracking-page table.shop_table .product-name {
  width: 68%;
  word-break: break-word;
}

.e47-order-tracking-page table.shop_table .product-total,
.e47-order-tracking-page table.shop_table td.product-total {
  width: 32%;
  text-align: right;
  white-space: nowrap;
}

.e47-order-tracking-page table.shop_table .product-quantity {
  font-weight: 600;
}

.e47-order-tracking-page table.shop_table tfoot th {
  font-weight: 600;
  color: var(--e47-color-text-strong);
}

.e47-order-tracking-page table.shop_table tfoot td {
  text-align: right;
  white-space: nowrap;
}

.e47-order-tracking-page table.shop_table tfoot tr:last-child th,
.e47-order-tracking-page table.shop_table tfoot tr:last-child td {
  border-bottom: 0;
}

.e47-order-tracking-page table.shop_table .order-actions-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.25rem;
  padding: 0.45rem 0.9rem;
  white-space: nowrap;
}

.e47-order-tracking-page .woocommerce-customer-details .woocommerce-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.25rem;
  margin-top: 1.5rem;
}

.e47-order-tracking-page .woocommerce-customer-details .woocommerce-column {
  padding: 1.1rem 1.2rem;
  background: var(--e47-color-bg-card, #fffdf9);
  border: 1px solid var(--e47-color-border, #ddd5c8);
}

.e47-order-tracking-page .woocommerce-customer-details address {
  margin: 0;
  font-style: normal;
  line-height: 1.6;
  color: var(--e47-color-text);
}

.e47-order-tracking-page .woocommerce-customer-details--phone,
.e47-order-tracking-page .woocommerce-customer-details--email {
  margin: 0.65rem 0 0;
}

@media (max-width: 767px) {
  .e47-order-tracking-page .woocommerce-customer-details .woocommerce-columns {
    grid-template-columns: 1fr;
  }

  .e47-order-tracking-page table.shop_table,
  .e47-order-tracking-page table.order_details {
    min-width: 32rem;
  }
}
