/*
 * my-account.css — My Account page styles
 * Loaded on is_account_page()
 * TODO: Extract from primotaglio-theme.css sections:
 * - Lines 506-520 (my account)
 * - Lines 1142-1195 (MyAccount-content)
 * - Lines 1366-1548 (account profile card, nav icons)
 * - Lines 1723-1800 (Phase 5 my account fix-ups)
 */

/* ─── Recent orders on My Account dashboard ─────────────────────────────── */
.pt-dashboard-recent-orders {
  margin-top: 1.8rem;
}
.pt-recent-orders-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: .75rem;
}
.pt-recent-orders-title {
  font-family: var(--font-sans, 'Nunito', sans-serif);
  font-size: .82rem;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--testo3, #9a8f7e);
  margin: 0;
}
.pt-recent-orders-all {
  font-size: .78rem;
  font-weight: 700;
  color: var(--verde, #2d6a4f);
  text-decoration: none;
}
.pt-recent-orders-all:hover { text-decoration: underline; }
.pt-recent-orders-table {
  width: 100%;
  border-collapse: collapse;
}
.pt-recent-orders-table th {
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--testo3, #9a8f7e);
  padding: .6rem .75rem;
  text-align: left;
  border-bottom: 2px solid var(--avorio, #e8e0d0);
}
.pt-recent-orders-table td {
  padding: .7rem .75rem;
  border-bottom: 1px solid var(--crema3, #ede7dc);
  font-size: .86rem;
  color: var(--testo2, #4a3f30);
  vertical-align: middle;
}
.pt-recent-orders-table tbody tr:last-child td { border-bottom: none; }
.pt-recent-orders-table tbody tr:hover { background: var(--crema2, #f5f1ea); }
/* Inherit number/total styling from primotaglio-theme.css woocommerce-orders-table rules */

/* Mobile: make orders tables horizontally scrollable instead of hiding columns */
@media (max-width: 600px) {
  /* Dashboard header/intro readability */
  .pt-dashboard-title {
    font-size: 1.35rem !important;
    line-height: 1.2 !important;
  }

  .pt-dashboard-welcome {
    font-size: .86rem !important;
    line-height: 1.6 !important;
  }

  /* Dashboard stat cards: stack cleanly */
  .pt-dashboard-stats {
    grid-template-columns: 1fr !important;
    gap: .7rem !important;
  }

  .pt-stat-card {
    padding: .9rem !important;
  }

  .pt-recent-orders-header {
    flex-direction: column;
    align-items: flex-start;
    gap: .35rem;
  }

  /* enable native horizontal scrolling for recent orders block */
  .pt-dashboard-recent-orders {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* give the table a minimum width so columns stay readable */
  .pt-recent-orders-table {
    min-width: 720px;
  }

  .pt-recent-orders-table th,
  .pt-recent-orders-table td {
    white-space: nowrap;
  }

  /* general account orders table (WC core) */
  .woocommerce-account .woocommerce-MyAccount-content .woocommerce-orders-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .woocommerce-orders-table {
    min-width: 720px;
  }
  .woocommerce-orders-table th,
  .woocommerce-orders-table td {
    white-space: nowrap;
  }

  /* order details table (view-order) */
  .woocommerce-order {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .woocommerce-order > p {
    font-size: .85rem;
    line-height: 1.55;
    margin-bottom: .8rem;
  }

  .woocommerce-order mark {
    word-break: break-word;
  }

  .woocommerce-order .woocommerce-table--order-details {
    min-width: 640px;
  }
  .woocommerce-order .woocommerce-table--order-details th,
  .woocommerce-order .woocommerce-table--order-details td {
    white-space: nowrap;
  }
}
