/* ============================================================
   WooPay My Account — Stylesheet v1.49
   Scoped under .woocommerce-account
   Design tokens sourced from design-tokens.css (WooPay design
   system, single source of truth) — loaded as a dependency.
   ============================================================ */

/* ── Local aliases → canonical --wpds-* tokens ──────────────
   Keeps existing markup (.wma-*) unchanged while every value
   traces back to the shared design system. Blue/neutral have no
   --wpds-* equivalent (WooPay My Account-specific accents for
   tracking/role badges) so they stay locally defined. */
:root {
  --wma-black:      var(--wpds-color-accent);
  --wma-white:      var(--wpds-color-on-accent);
  --wma-text:       var(--wpds-color-text);
  --wma-text-2:     var(--wpds-color-text-muted);
  --wma-text-3:     var(--wpds-color-text-subtle);
  --wma-text-4:     #a7a6a2;
  --wma-card:       var(--wpds-color-surface);
  --wma-card-border: var(--wpds-color-border);
  --wma-subtle:     var(--wpds-color-bg);
  --wma-input:      var(--wpds-color-surface-soft);
  --wma-divider:    var(--wpds-color-border);
  --wma-border:     var(--wpds-color-border-strong);
  --wma-border-l:   #ecebe7;
  --wma-green:      var(--wpds-color-success-alt);
  --wma-green-bg:   #e3f5ea;
  --wma-amber:      var(--wpds-color-warning-fg);
  --wma-amber-bg:   var(--wpds-color-warning-bg);
  --wma-blue:       #2a5db0;
  --wma-blue-bg:    #e6eefb;
  --wma-neutral:    #6f6e6b;
  --wma-neutral-bg: #f1f0ed;
  --wma-r-card:     var(--wpds-radius-lg);
  --wma-r-btn:      var(--wpds-radius-md);
  --wma-r-input:    var(--wpds-radius-md);
  --wma-r-badge:    var(--wpds-radius-lg);
}

.woocommerce-account {
  font-family: var(--wpds-font-sans);
}

/* ── Kill the default WC navigation & theme account title ──── */
.woocommerce-account .woocommerce-MyAccount-navigation,
.woocommerce-account .woocommerce-MyAccount-navigation + *:empty {
  display: none !important;
}

/* Hide theme page title elements (covers most themes incl. Woodmart) */
.woocommerce-account .entry-header,
.woocommerce-account .page-header,
.woocommerce-account h1.entry-title,
.woocommerce-account h1.page-title,
.woocommerce-account .wd-page-title,
.woocommerce-account .woodmart-page-title,
.woocommerce-account .title-with-breadcrumbs,
.woocommerce-account .woocommerce-MyAccount-title.entry-title {
  display: none !important;
}

/* Woodmart wraps My Account content in a CSS grid; force block so our
   single-column layout (float:none, width:100%) isn't fighting a grid parent. */
.woocommerce-account .wd-my-account-wrapper.wd-grid-g {
  display: block !important;
}

/* ── Reset & base ───────────────────────────────────────────── */
.woocommerce-account *,
.woocommerce-account *::before,
.woocommerce-account *::after { box-sizing: border-box; }

.woocommerce-account {
  color: var(--wma-text);
  font-size: var(--wpds-fs-base);
  line-height: var(--wpds-lh-normal);
}

/* Full-width single-column content (nav is gone) */
.woocommerce-account .woocommerce {
  display: block !important;
}
.woocommerce-account .woocommerce-MyAccount-content {
  width: 100% !important;
  float: none !important;
  padding: 0 !important;
  margin: 0 !important;
}

/* ── Focus visibility (a11y) ────────────────────────────────── */
.woocommerce-account a:focus-visible,
.woocommerce-account button:focus-visible,
.woocommerce-account input:focus-visible,
.woocommerce-account select:focus-visible,
.woocommerce-account textarea:focus-visible {
  outline: 2px solid var(--wma-black);
  outline-offset: 2px;
}

/* SVG icon baseline alignment */
.woocommerce-account svg {
  display: inline-block;
  vertical-align: middle;
  flex-shrink: 0;
}

/* ── WC notices ─────────────────────────────────────────────── */
.woocommerce-account .woocommerce-message,
.woocommerce-account .woocommerce-error,
.woocommerce-account .woocommerce-info {
  border-radius: var(--wma-r-card);
  font-size: var(--wpds-fs-base);
  margin-bottom: 16px;
}

/* ════════════════════════════════════════════════════════════
   SHARED COMPONENTS
   ════════════════════════════════════════════════════════════ */

/* ── Generic card ───────────────────────────────────────────── */
.wma-card {
  background: var(--wma-card);
  border: 1px solid var(--wma-card-border);
  border-radius: var(--wma-r-card);
  padding: 18px;
}

/* All named card components share the same background + border token */
.wma-hero-card,
.wma-order-card,
.wma-quick-item,
.wma-support-card,
.wma-order-row,
.wma-info-card,
.wma-empty-state {
  border: 1px solid var(--wma-card-border);
}

/* ── Badges ─────────────────────────────────────────────────── */
.wma-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: var(--wpds-fs-caption);
  font-weight: 600;
  padding: 6px 9px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1;
}
.wma-badge svg { width: 13px; height: 13px; flex: 0 0 auto; }

/* Semantic mapping onto design-system state colors: warning = awaiting
   action, accent = actively processing (not a state color), success = done,
   error = cancelled/failed. Refunded has no system token; kept as the
   nearest neutral-adjacent hue. */
.badge-pending,
.badge-on-hold    { color: var(--wpds-color-warning-fg); background: var(--wpds-color-warning-bg); border: 1px solid var(--wpds-color-warning); }
.badge-processing { color: var(--wma-blue); background: var(--wma-blue-bg); border: 1px solid rgba(42,93,176,.25); }
.badge-completed  { color: var(--wpds-color-success-alt); background: var(--wpds-color-success-bg); border: 1px solid rgba(31,122,69,.25); }
.badge-cancelled,
.badge-failed     { color: var(--wpds-color-error); background: var(--wpds-color-error-bg); border: 1px solid rgba(179,38,30,.25); }
.badge-refunded   { color: #6d28d9; background: #f5f3ff; border: 1px solid #ddd6fe; }
.badge-neutral    { color: var(--wma-neutral); background: var(--wma-neutral-bg); border: 1px solid var(--wma-border); }

/* ── Black CTA button / link ────────────────────────────────── */
.wma-btn-black,
a.wma-btn-black {
  display: block;
  width: 100%;
  background: var(--wma-black);
  color: #fff !important;
  border: none;
  border-radius: var(--wma-r-btn);
  padding: 13px 20px;
  font-size: var(--wpds-fs-base);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  line-height: 1.3;
  transition: opacity .15s;
  margin-top: 16px;
}
.wma-btn-black:hover { opacity: .88; color: #fff !important; }

/* ── WooCommerce native <button> normalisation ──────────────── */
.woocommerce-account button.woocommerce-Button.button,
.woocommerce-account button.button {
  display: block !important;
  width: 100% !important;
  min-height: 44px !important;
  background: var(--wma-black) !important;
  color: #ffffff !important;
  border: 1px solid var(--wma-black) !important;
  border-radius: 10px !important;
  padding: 14px 16px !important;
  font-size: var(--wpds-fs-base) !important;
  font-weight: 500 !important;
  line-height: 1.3 !important;
  text-align: center !important;
  text-decoration: none !important;
  cursor: pointer !important;
  margin-top: 10px !important;
  margin-bottom: 10px !important;
  transition: background .2s ease, border-color .2s ease !important;
  box-shadow: none !important;
  outline: none !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}
.woocommerce-account button.woocommerce-Button.button:hover,
.woocommerce-account button.button:hover {
  background: #000000 !important;
  border-color: #000000 !important;
  color: #ffffff !important;
  opacity: 1 !important;
}

/* ── Section label ──────────────────────────────────────────── */
.wma-section-label {
  font-size: var(--wpds-fs-heading);
  font-weight: 600;
  margin: 0;
  padding: 0 0 0 5px;
  display: block;
}

/* ── Section row (label + right link) ──────────────────────── */
.wma-section-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

/* ── Muted link (e.g. "แก้ไข", "ดูทั้งหมด") ─────────────────── */
.wma-link-muted,
a.wma-link-muted {
  font-size: var(--wpds-fs-sm);
  color: var(--wma-text-2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: color .15s;
}
.wma-link-muted:hover { color: var(--wma-text); }

/* ── View-all link (slightly smaller) ──────────────────────── */
.wma-view-all {
  font-size: var(--wpds-fs-meta);
  color: var(--wma-text-2);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  transition: color .15s;
}
.wma-view-all:hover { color: var(--wma-text); }

/* ── Divider ────────────────────────────────────────────────── */
.wma-divider {
  border: none;
  border-top: 1px solid var(--wma-divider);
  margin: 16px 0;
}

/* ── Empty state ────────────────────────────────────────────── */
.wma-empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 40px 20px;
  background: var(--wma-card);
  border-radius: var(--wma-r-card);
  color: var(--wma-text-3);
  font-size: var(--wpds-fs-base);
  margin-bottom: 14px;
}

/* ── Back bar ───────────────────────────────────────────────── */
/* 1fr | title (auto) | 1fr  →  title is always truly centered */
.wma-back-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
/* third child (right action button, if present) aligns to end */
.wma-back-bar > :nth-child(3) { justify-self: end; }

.wma-back-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wma-card);
  color: var(--wma-text);
  text-decoration: none;
  transition: background .15s;
}
.wma-back-btn:hover { background: var(--wma-border-l); }
.wma-page-title {
  font-size: var(--wpds-fs-title);
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0;
  text-align: center;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ── Muted text ─────────────────────────────────────────────── */
.wma-muted { color: var(--wma-text-3); font-size: var(--wpds-fs-sm); }

/* ── Generic section wrapper spacing ───────────────────────── */
.wma-section { display: flex; flex-direction: column; }

/* ════════════════════════════════════════════════════════════
   DASHBOARD
   ════════════════════════════════════════════════════════════ */
.wma-dashboard {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding: 0;
}

/* ── Greeting card ──────────────────────────────────────────── */
.wma-hero-card {
  position: relative;
  display: flex;
  gap: 14px;
  align-items: center;
  background: var(--wma-card);
  border-radius: var(--wma-r-card);
  padding: 18px;
  margin-bottom: 24px;
}
.wma-role-badge {
  position: absolute;
  top: 14px;
  right: 14px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px 5px 7px;
  border-radius: 20px;
  font-size: var(--wpds-fs-caption);
  font-weight: 600;
  white-space: nowrap;
  line-height: 1;
  pointer-events: none;
  /* default / subscriber / unknown */
  background: var(--wma-neutral-bg);
  border: 1px solid rgba(0,0,0,0.07);
  color: var(--wma-neutral);
}
.wma-role-badge svg { flex-shrink: 0; }

/* Administrator — gold/amber premium */
.wma-role-administrator {
  background: linear-gradient(135deg, #fef8e3 0%, #fdf3cc 100%);
  border-color: rgba(154,106,0,.22);
  color: #8a5f00;
}
/* Shop manager — blue professional */
.wma-role-shop-manager {
  background: linear-gradient(135deg, #eaf0fb 0%, #dce8f9 100%);
  border-color: rgba(42,93,176,.22);
  color: var(--wma-blue);
}
/* Customer — green active */
.wma-role-customer {
  background: linear-gradient(135deg, #e5f6ec 0%, #d5f0e0 100%);
  border-color: rgba(31,122,69,.22);
  color: var(--wma-green);
}
/* Subscriber — default neutral (inherits base) */
.wma-avatar {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: var(--wma-border-l);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #8a8985;
}
.wma-hero-text { flex: 1; min-width: 0; }
.wma-greeting {
  font-size: var(--wpds-fs-lg);
  font-weight: 700;
  margin: 0 0 3px;
  color: var(--wma-text);
}
.wma-subtitle {
  font-size: var(--wpds-fs-meta);
  color: var(--wma-text-2);
  margin: 0;
  line-height: 1.45;
}

/* ── Latest order card ──────────────────────────────────────── */
.wma-order-card {
  background: var(--wma-card);
  border-radius: var(--wma-r-card);
  padding: 18px;
  margin-bottom: 18px;
}
.wma-order-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}
.wma-order-id { font-size: var(--wpds-fs-lg); font-weight: 700; font-variant-numeric: var(--wpds-numeric); }
.wma-order-meta {
  font-size: var(--wpds-fs-strong);
  color: var(--wma-text-2);
  margin: 0 0 4px;
}
.wma-order-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--wma-text-3);
  font-size: var(--wpds-fs-meta);
  padding: 28px 18px;
}

/* ── Quick grid ─────────────────────────────────────────────── */
.wma-quick-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 18px;
}
.wma-quick-item {
  background: var(--wma-card);
  border-radius: var(--wma-r-card);
  padding: 20px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  font-size: var(--wpds-fs-sm);
  font-weight: 500;
  color: var(--wma-text);
  text-decoration: none;
  text-align: center;
  transition: background .15s;
}
.wma-quick-item:hover { background: #edece9; color: var(--wma-text); }
.wma-quick-item span { display: block; }

/* ── Support card ───────────────────────────────────────────── */
.wma-support-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--wma-card);
  border-radius: var(--wma-r-card);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}
a.wma-support-card:hover { background: #edece9; }
.wma-support-title {
  font-size: var(--wpds-fs-base);
  font-weight: 600;
  margin: 0 0 3px;
}
.wma-support-sub {
  font-size: var(--wpds-fs-meta);
  color: var(--wma-text-2);
  margin: 0;
}
.wma-support-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--wma-border-l);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: var(--wma-text);
}

/* ════════════════════════════════════════════════════════════
   ORDERS LIST
   ════════════════════════════════════════════════════════════ */
.wma-section {
  padding: 0;
}

/* ── Tabs ───────────────────────────────────────────────────── */
.wma-tabs {
  display: flex;
  border-bottom: 1px solid var(--wma-divider);
  margin-bottom: 18px;
  overflow-x: auto;
  scrollbar-width: none;
}
.wma-tabs::-webkit-scrollbar { display: none; }
.wma-tab {
  padding: 10px 14px;
  font-size: var(--wpds-fs-sm);
  font-weight: 500;
  color: var(--wma-text-3);
  text-decoration: none;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  transition: color .15s;
}
.wma-tab:hover { color: var(--wma-text); }
.wma-tab.is-active {
  color: var(--wma-text);
  font-weight: 600;
  border-bottom-color: var(--wma-black);
}

/* ── Order rows ─────────────────────────────────────────────── */
.wma-order-list { display: flex; flex-direction: column; gap: 12px; }

.wma-order-row {
  display: block;
  background: var(--wma-card);
  border-radius: var(--wma-r-card);
  padding: 18px;
  text-decoration: none;
  color: inherit;
  transition: background .15s;
}
.wma-order-row:hover { background: #edece9; }

.wma-order-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wma-order-date   { font-size: var(--wpds-fs-meta); color: var(--wma-text-2); }
.wma-order-amount-row { display: flex; align-items: center; gap: 8px; }
.wma-order-amount { font-size: var(--wpds-fs-strong); font-weight: 700; font-variant-numeric: var(--wpds-numeric); }
.wma-chevron      { color: var(--wma-text-4); }

/* ── Pagination ─────────────────────────────────────────────── */
.wma-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
}
.wma-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--wma-card);
  color: var(--wma-text);
  text-decoration: none;
  transition: background .15s;
}
.wma-page-btn:hover { background: var(--wma-border-l); }
.wma-page-num { font-size: var(--wpds-fs-base); font-weight: 600; }

/* ════════════════════════════════════════════════════════════
   ORDER PROGRESS BAR
   ════════════════════════════════════════════════════════════ */
.wma-progress-card { padding: 0; margin-bottom: 22px; }

.wma-progress-steps {
  display: flex;
  align-items: flex-start;
}
.wma-progress-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  position: relative;
}
/* Connecting line: drawn through each step, hidden on the first */
.wma-progress-step::before {
  content: '';
  position: absolute;
  top: 11px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: var(--wma-border-l);
  z-index: 0;
}
.wma-progress-step:first-child::before { display: none; }
.wma-progress-step.is-done::before,
.wma-progress-step.is-active::before { background: var(--wma-black); }

.wma-progress-dot {
  position: relative;
  z-index: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--wma-card);
  border: 2px solid var(--wma-border-l);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 8px;
}
.wma-progress-step.is-done .wma-progress-dot {
  background: var(--wma-black);
  border-color: var(--wma-black);
}
.wma-progress-step.is-active .wma-progress-dot {
  background: var(--wma-card);
  border-color: var(--wma-black);
  box-shadow: 0 0 0 3px rgba(22,22,22,.12);
}
.wma-progress-step.is-active .wma-progress-dot::after {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--wma-black);
}

.wma-progress-label {
  font-size: var(--wpds-fs-caption);
  color: var(--wma-text-3);
  line-height: 1.3;
  max-width: 80px;
}
.wma-progress-step.is-done .wma-progress-label,
.wma-progress-step.is-active .wma-progress-label {
  color: var(--wma-text);
  font-weight: 600;
}

/* ── Failed state: full-width red bar replaces the stepper ─── */
.wma-progress-failed {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #b91c1c;
  font-size: var(--wpds-fs-base);
  font-weight: 600;
}

/* ════════════════════════════════════════════════════════════
   ORDER DETAILS
   ════════════════════════════════════════════════════════════ */

/* Space between a standalone section label and the card below it */
.wma-section > .wma-section-label { margin-bottom: 12px; }

/* Divider inside a flex card — let gap handle spacing, zero out its own margin */
.wma-info-card .wma-divider { margin: 0; }

.wma-info-card {
  background: var(--wma-card);
  border-radius: var(--wma-r-card);
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 22px;
}
.wma-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.wma-info-label { font-size: var(--wpds-fs-sm); color: var(--wma-text-2); }
.wma-info-val   { font-size: var(--wpds-fs-sm); font-weight: 500; text-align: right; max-width: 60%; }

.wma-product-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 8px 0;
}
.wma-product-thumb {
  width: 54px;
  height: 54px;
  border-radius: 9px;
  background: var(--wma-border-l);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #8a8985;
  overflow: hidden;
}
.wma-product-img { width: 100%; height: 100%; object-fit: cover; }
.wma-product-info { flex: 1; min-width: 0; }
.wma-product-name { display: block; font-size: var(--wpds-fs-base); font-weight: 600; }
.wma-product-qty  { display: block; font-size: var(--wpds-fs-meta); color: var(--wma-text-2); margin-top: 2px; }
.wma-product-price { font-size: var(--wpds-fs-base); font-weight: 700; flex-shrink: 0; font-variant-numeric: var(--wpds-numeric); }

.wma-totals { display: flex; flex-direction: column; gap: 9px; }
.wma-totals-row {
  display: flex;
  justify-content: space-between;
  font-size: var(--wpds-fs-sm);
  color: var(--wma-text-2);
}
.wma-totals-row span:last-child { color: var(--wma-text); }
.wma-totals-final {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--wma-divider);
  font-size: var(--wpds-fs-base);
  font-weight: 700;
}
.wma-grand-total { font-size: var(--wpds-fs-lg); font-weight: 700; font-variant-numeric: var(--wpds-numeric); }

/* ── Tracking card ──────────────────────────────────────────── */
.wma-tracking-card { gap: 14px; }

.wma-tracking-header {
  display: flex;
  align-items: center;
  gap: 14px;
}
.wma-tracking-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--wma-blue-bg);
  color: var(--wma-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.wma-tracking-label {
  font-size: var(--wpds-fs-strong);
  font-weight: 600;
  margin: 0 0 2px;
  color: var(--wma-text);
}
.wma-tracking-carrier {
  font-size: var(--wpds-fs-meta);
  color: var(--wma-text-2);
  margin: 0;
}
.wma-tracking-number {
  display: block;
  font-size: var(--wpds-fs-strong);
  font-weight: 700;
  font-variant-numeric: var(--wpds-numeric);
  letter-spacing: 0.04em;
  word-break: break-all;
  padding: 12px 14px;
  background: var(--wma-subtle);
  border-radius: var(--wma-r-input);
  color: var(--wma-text);
  text-decoration: none;
}
a.wma-tracking-number {
  background: var(--wma-blue-bg);
  color: var(--wma-blue);
  transition: opacity .15s;
}
a.wma-tracking-number:hover { opacity: .8; }

/* ════════════════════════════════════════════════════════════
   ADDRESSES
   ════════════════════════════════════════════════════════════ */
.wma-address-block { margin-bottom: 22px; }
.wma-address-block > .wma-section-label { margin-bottom: 12px; }
.wma-address-card { gap: 4px; margin-bottom: 0; }
.wma-address-name { font-size: var(--wpds-fs-strong); font-weight: 600; color: var(--wma-text); margin-bottom: 2px; }
.wma-address-detail,
.wma-address-postcode,
.wma-address-country,
.wma-address-phone { font-size: var(--wpds-fs-meta); color: var(--wma-text-2); line-height: 1.5; }
.wma-address-edit {
  display: inline-block;
  align-self: flex-start;
  margin-top: 14px;
  font-size: var(--wpds-fs-sm);
  font-weight: 500;
  color: var(--wma-text);
  text-decoration: none;
  padding: 8px 18px;
  border: 1px solid var(--wma-border);
  border-radius: var(--wma-r-btn);
  background: var(--wma-card);
  transition: background .15s;
}
.wma-address-edit:hover { background: var(--wma-subtle); }

/* ════════════════════════════════════════════════════════════
   ADDRESS EDIT FORM — mobile-first
   woocommerce_form_field() outputs <p class="form-row ...">
   All rules use !important to override WC + Woodmart defaults.
   Per design system §1.1 "one accent, meaning-only color": red is
   reserved for the invalid state, not the resting border.
   ════════════════════════════════════════════════════════════ */

/* Outer wrapper: vertical stack */
.wma-address-form {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* Kill WC float layout — every row is full-width vertical */
.wma-address-form .form-row,
.wma-address-form .form-row-first,
.wma-address-form .form-row-last,
.wma-address-form .form-row-wide {
  float: none !important;
  width: 100% !important;
  clear: both !important;
  margin: 0 0 16px !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

/* Labels */
.wma-address-form .form-row label,
.wma-address-form label {
  display: block !important;
  font-size: var(--wpds-fs-sm) !important;
  font-weight: 500 !important;
  color: var(--wma-text) !important;
  margin-bottom: 8px !important;
  line-height: 1.4 !important;
}
.wma-address-form .form-row .required { color: var(--wpds-color-error) !important; }

/* Input wrapper fills width */
.wma-address-form .form-row .woocommerce-input-wrapper {
  display: block !important;
  width: 100% !important;
}

/* ── Shared input token ────────────────────────────────────── */
.wma-address-form .form-row input.input-text,
.wma-address-form .form-row input[type="text"],
.wma-address-form .form-row input[type="email"],
.wma-address-form .form-row input[type="tel"],
.wma-address-form .form-row input[type="number"],
.wma-address-form .form-row input[type="password"] {
  display: block !important;
  width: 100% !important;
  padding: 12px 14px !important;
  background: #fff !important;
  border: 1px solid var(--wma-border) !important;
  border-radius: var(--wpds-radius-md) !important;
  font-size: var(--wpds-fs-input) !important;
  color: var(--wma-text) !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color .15s, box-shadow .15s !important;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box !important;
}
.wma-address-form .form-row input.input-text:focus,
.wma-address-form .form-row input[type="text"]:focus,
.wma-address-form .form-row input[type="email"]:focus,
.wma-address-form .form-row input[type="tel"]:focus,
.wma-address-form .form-row input[type="number"]:focus,
.wma-address-form .form-row input[type="password"]:focus {
  border-color: var(--wma-black) !important;
  box-shadow: 0 0 0 3px rgba(22,22,22,.12) !important;
  outline: none !important;
}

/* ── Textarea (address_1) ─────────────────────────────────── */
.wma-address-form .form-row textarea {
  display: block !important;
  width: 100% !important;
  padding: 12px 14px !important;
  background: #fff !important;
  border: 1px solid var(--wma-border) !important;
  border-radius: var(--wpds-radius-md) !important;
  font-size: var(--wpds-fs-input) !important;
  color: var(--wma-text) !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color .15s, box-shadow .15s !important;
  resize: vertical !important;
  min-height: 130px !important;
  line-height: 1.6 !important;
  -webkit-appearance: none;
  appearance: none;
  box-sizing: border-box !important;
}
.wma-address-form .form-row textarea:focus {
  border-color: var(--wma-black) !important;
  box-shadow: 0 0 0 3px rgba(22,22,22,.12) !important;
  outline: none !important;
}

/* ── Select (Province / Country) ──────────────────────────── */
.wma-address-form .form-row select {
  display: block !important;
  width: 100% !important;
  padding: 12px 40px 12px 14px !important;
  background-color: #fff !important;
  /* custom caret */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%23666'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 12px center !important;
  background-size: 20px 20px !important;
  border: 1px solid var(--wma-border) !important;
  border-radius: var(--wpds-radius-md) !important;
  font-size: var(--wpds-fs-input) !important;
  color: var(--wma-text) !important;
  outline: none !important;
  box-shadow: none !important;
  transition: border-color .15s, box-shadow .15s !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}
.wma-address-form .form-row select:focus {
  border-color: var(--wma-black) !important;
  box-shadow: 0 0 0 3px rgba(22,22,22,.12) !important;
  outline: none !important;
}

/* ── WC inline validation feedback ────────────────────────── */
.wma-address-form .form-row.woocommerce-invalid > .woocommerce-input-wrapper input,
.wma-address-form .form-row.woocommerce-invalid > .woocommerce-input-wrapper textarea,
.wma-address-form .form-row.woocommerce-invalid > .woocommerce-input-wrapper select {
  border-color: var(--wpds-color-error) !important;
}
.wma-address-form .form-row .woocommerce-error,
.wma-address-form .form-row .woocommerce-input-wrapper ~ .woocommerce-error {
  display: block !important;
  font-size: var(--wpds-fs-caption) !important;
  color: var(--wpds-color-error) !important;
  margin-top: 5px !important;
}

/* ── Submit row ───────────────────────────────────────────── */
.wma-address-submit { margin-top: 8px !important; }

/* Clearfix for WC float leftovers */
.woocommerce-address-fields__field-wrapper::after { content: ''; display: table; clear: both; }

/* ════════════════════════════════════════════════════════════
   LOGOUT MODAL
   ════════════════════════════════════════════════════════════ */
.wma-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 99990;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s, visibility .25s;
}
.wma-modal-backdrop.is-open {
  opacity: 1;
  visibility: visible;
}
.wma-modal {
  background: #fff;
  border-radius: 28px 28px 0 0;
  padding: 32px 28px 40px;
  width: 100%;
  max-width: 480px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transform: translateY(40px);
  transition: transform .3s cubic-bezier(.32,1,.41,1);
}
.wma-modal-backdrop.is-open .wma-modal { transform: translateY(0); }

.wma-modal-icon {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background: var(--wma-card);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 28px;
  color: var(--wma-text);
}
.wma-modal-title {
  font-size: var(--wpds-fs-lg);
  font-weight: 700;
  margin: 0 0 10px;
}
.wma-modal-body {
  font-size: var(--wpds-fs-meta);
  color: var(--wma-text-2);
  line-height: 1.6;
  margin: 0 0 32px;
}
.wma-modal-actions { width: 100%; display: flex; flex-direction: column; gap: 10px; }
.wma-modal-confirm {
  display: block;
  width: 100%;
  background: var(--wma-black);
  color: #fff;
  border: none;
  border-radius: var(--wma-r-btn);
  padding: 14px;
  font-size: var(--wpds-fs-base);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: opacity .15s;
}
.wma-modal-confirm:hover { opacity: .88; color: #fff; }
.wma-modal-cancel {
  display: block;
  width: 100%;
  background: #fff;
  color: var(--wma-text);
  border: 1px solid var(--wma-border);
  border-radius: var(--wma-r-btn);
  padding: 14px;
  font-size: var(--wpds-fs-base);
  font-weight: 600;
  cursor: pointer;
  transition: background .15s;
}
.wma-modal-cancel:hover { background: var(--wma-subtle); }
