/* ════════════════════════════════════════════════════════════════════════
 * Wager Account — CNC Control Panel aesthetic
 * Industrial tab strip, work-order cards, machined-precision layout.
 * Tokens mirror checkout.css for continuity across the conversion tunnel.
 * ════════════════════════════════════════════════════════════════════════ */

:root {
  --wmw-steel-900: #0F0E0D;
  --wmw-steel-800: #141311;
  --wmw-steel-700: #1A1917;
  --wmw-steel-600: #2A2824;
  --wmw-steel-500: #3A3732;
  --wmw-steel-300: #A9A49C;
  --wmw-steel-100: #ECEAE7;
  --wmw-orange:    #F66332;
  --wmw-orange-dk: #C44E24;
}

/* ── Tab navigation — industrial toggle strip ─────────────────────── */
.wmw-account-tabs {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--wmw-steel-600);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.wmw-account-tabs::-webkit-scrollbar { display: none; }

.wmw-account-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 20px;
  font: 700 11px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wmw-steel-300);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.12s, border-color 0.12s;
  white-space: nowrap;
  flex-shrink: 0;
}
.wmw-account-tab:hover { color: var(--wmw-steel-100); }
.wmw-account-tab.active {
  color: var(--wmw-orange);
  border-bottom-color: var(--wmw-orange);
}
.wmw-account-tab__icon {
  display: inline-flex;
  align-items: center;
  color: inherit;
  opacity: 0.6;
}
.wmw-account-tab.active .wmw-account-tab__icon { opacity: 1; }
.wmw-account-tab__icon svg { width: 16px; height: 16px; }

@media (max-width: 640px) {
  .wmw-account-tab { padding: 12px 14px; font-size: 10px; }
}

/* ── Card base — dark panel with left orange accent ───────────────── */
.wmw-account-card {
  background: var(--wmw-steel-800);
  border: 1px solid var(--wmw-steel-600);
  border-left: 2px solid var(--wmw-orange);
  padding: 20px 24px;
}

/* ── Stat cards (dashboard) ───────────────────────────────────────── */
.wmw-stat-card {
  text-align: center;
  border-left-width: 1px;
  border-left-color: var(--wmw-steel-600);
  border-top: 2px solid var(--wmw-orange);
  padding: 24px 20px;
}

/* ── Section title ────────────────────────────────────────────────── */
.wmw-section-title {
  font: 400 24px/1.1 'Bebas Neue', system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wmw-steel-100);
}

/* ── Auth tabs (login/register toggle) ────────────────────────────── */
.wmw-auth-tabs {
  display: flex;
  border-bottom: 1px solid var(--wmw-steel-600);
  margin-bottom: 24px;
}
.wmw-auth-tab {
  flex: 1;
  padding: 12px 0;
  font: 700 11px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wmw-steel-300);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  cursor: pointer;
  text-align: center;
  transition: color 0.12s, border-color 0.12s;
}
.wmw-auth-tab:hover { color: var(--wmw-steel-100); }
.wmw-auth-tab.active {
  color: var(--wmw-orange);
  border-bottom-color: var(--wmw-orange);
}

/* ── Form fields ──────────────────────────────────────────────────── */
.wmw-field { margin-bottom: 16px; }
.wmw-label {
  display: block;
  font: 600 10px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wmw-steel-300);
  margin-bottom: 6px;
}
.wmw-input {
  background: var(--wmw-steel-900);
  color: var(--wmw-steel-100);
  border: 1px solid var(--wmw-steel-600);
  border-left: 2px solid var(--wmw-steel-500);
  border-radius: 0;
  padding: 12px 16px;
  min-height: 48px;
  width: 100%;
  font: 500 16px/1.3 'Rajdhani', system-ui, sans-serif;
  caret-color: var(--wmw-orange);
  transition: border-left-color 0.12s, box-shadow 0.12s;
  appearance: none;
  -webkit-appearance: none;
}
.wmw-input::placeholder { color: var(--wmw-steel-500); opacity: 0.7; }
.wmw-input:focus {
  border-left-color: var(--wmw-orange);
  box-shadow: 0 0 0 3px rgba(246, 99, 50, 0.2);
  outline: none;
}
.wmw-hint {
  font: 500 11px/1.4 'Rajdhani', system-ui, sans-serif;
  color: var(--wmw-steel-300);
  margin-top: 4px;
}
.wmw-checkbox {
  width: 16px;
  height: 16px;
  accent-color: var(--wmw-orange);
  cursor: pointer;
}

/* ── Buttons ──────────────────────────────────────────────────────── */
.wmw-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 16px 24px;
  min-height: 52px;
  background: var(--wmw-orange);
  color: var(--wmw-steel-900);
  border: 0;
  border-radius: 0;
  font: 700 13px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 6px 20px -4px rgba(246, 99, 50, 0.45), 0 2px 0 0 var(--wmw-orange-dk);
  transition: background 0.12s, transform 0.08s;
  text-decoration: none;
}
.wmw-btn-primary:hover { background: #FF7742; }
.wmw-btn-primary:active { transform: translateY(1px); box-shadow: none; }

.wmw-btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 16px;
  background: transparent;
  color: var(--wmw-orange);
  border: 1px solid var(--wmw-orange);
  border-radius: 0;
  font: 700 11px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.12s, color 0.12s;
}
.wmw-btn-ghost:hover { background: var(--wmw-orange); color: #fff; }

/* ── Links ────────────────────────────────────────────────────────── */
.wmw-link { color: var(--wmw-orange); text-decoration: none; }
.wmw-link:hover { text-decoration: underline; }

/* ── Quick links (dashboard) ──────────────────────────────────────── */
.wmw-quick-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: var(--wmw-steel-800);
  border: 1px solid var(--wmw-steel-600);
  color: var(--wmw-steel-100);
  font: 600 13px/1.3 'Rajdhani', system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-decoration: none;
  transition: border-color 0.12s, color 0.12s;
}
.wmw-quick-link:hover { border-color: var(--wmw-orange); color: var(--wmw-orange); }
.wmw-quick-link svg { color: var(--wmw-orange); flex-shrink: 0; }

/* ── Order card (list item) ───────────────────────────────────────── */
.wmw-order-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 12px 16px;
  align-items: center;
  background: var(--wmw-steel-800);
  border: 1px solid var(--wmw-steel-600);
  border-left: 2px solid var(--wmw-steel-500);
  padding: 16px 20px;
  transition: border-left-color 0.12s;
}
.wmw-order-card:hover { border-left-color: var(--wmw-orange); }
.wmw-order-number {
  font: 400 22px/1 'Bebas Neue', system-ui, sans-serif;
  color: var(--wmw-orange);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}
.wmw-order-meta {
  font: 600 12px/1.3 'Rajdhani', system-ui, sans-serif;
  color: var(--wmw-steel-300);
}
.wmw-order-meta strong { color: var(--wmw-steel-100); font-weight: 600; }
.wmw-order-total {
  font: 400 24px/1 'Bebas Neue', system-ui, sans-serif;
  color: var(--wmw-steel-100);
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.wmw-order-status {
  display: inline-block;
  padding: 3px 8px;
  font: 700 9px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-radius: 0;
}
.wmw-order-status--completed { background: rgba(76, 175, 80, 0.15); color: #66BB6A; border: 1px solid rgba(76, 175, 80, 0.3); }
.wmw-order-status--processing { background: rgba(246, 99, 50, 0.15); color: var(--wmw-orange); border: 1px solid rgba(246, 99, 50, 0.3); }
.wmw-order-status--pending { background: rgba(255, 193, 7, 0.15); color: #FDD835; border: 1px solid rgba(255, 193, 7, 0.3); }
.wmw-order-status--cancelled { background: rgba(244, 67, 54, 0.1); color: #E57373; border: 1px solid rgba(244, 67, 54, 0.2); }

/* ── Address card ─────────────────────────────────────────────────── */
.wmw-address-card {
  background: var(--wmw-steel-800);
  border: 1px solid var(--wmw-steel-600);
  border-left: 2px solid var(--wmw-steel-500);
  padding: 16px 20px;
  position: relative;
}
.wmw-address-card.primary { border-left-color: var(--wmw-orange); }
.wmw-address-label {
  font: 700 10px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wmw-orange);
  margin-bottom: 6px;
}
.wmw-address-name {
  font: 600 14px/1.3 'Rajdhani', system-ui, sans-serif;
  color: var(--wmw-steel-100);
}
.wmw-address-line {
  font: 500 13px/1.5 'Rajdhani', system-ui, sans-serif;
  color: var(--wmw-steel-300);
}
.wmw-address-actions {
  display: flex;
  gap: 12px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--wmw-steel-600);
}
.wmw-address-actions button {
  background: transparent;
  border: 0;
  font: 600 10px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.12s;
}
.wmw-address-actions .edit { color: var(--wmw-orange); }
.wmw-address-actions .edit:hover { text-decoration: underline; }
.wmw-address-actions .delete { color: #E57373; }
.wmw-address-actions .delete:hover { text-decoration: underline; }
.wmw-address-actions .set-primary { color: var(--wmw-steel-300); }
.wmw-address-actions .set-primary:hover { color: var(--wmw-orange); }

/* ── Dialog (address modal) ───────────────────────────────────────── */
.wmw-dialog {
  background: var(--wmw-steel-800);
  border: 1px solid var(--wmw-steel-600);
  border-radius: 0;
  padding: 0;
  max-width: 520px;
  width: calc(100vw - 32px);
  color: var(--wmw-steel-100);
  box-shadow: 0 24px 64px -12px rgba(0, 0, 0, 0.7);
}
.wmw-dialog::backdrop { background: rgba(15, 14, 13, 0.82); backdrop-filter: blur(2px); }
.wmw-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--wmw-steel-600);
}
.wmw-dialog-title {
  font: 400 22px/1 'Bebas Neue', system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin: 0;
}
.wmw-dialog-close {
  background: transparent;
  border: 1px solid var(--wmw-steel-600);
  color: var(--wmw-steel-300);
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 20px;
  transition: color 0.12s, border-color 0.12s;
}
.wmw-dialog-close:hover { color: var(--wmw-orange); border-color: var(--wmw-orange); }
.wmw-dialog-body { padding: 24px; }
.wmw-dialog-footer {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  padding: 16px 24px;
  border-top: 1px solid var(--wmw-steel-600);
}

/* ── Status message ───────────────────────────────────────────────── */
.wmw-status {
  margin-top: 12px;
  padding: 10px 14px;
  font: 600 11px/1.4 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.wmw-status.success {
  background: rgba(76, 175, 80, 0.1);
  border-left: 2px solid #66BB6A;
  color: #66BB6A;
}
.wmw-status.error {
  background: rgba(200, 66, 44, 0.1);
  border-left: 2px solid #C8422C;
  color: #E07B63;
}

/* Scoped to the account UI only. A global `.hidden{!important}` here was
 * overriding the header's Tailwind `hidden md:flex`, hiding the whole site nav
 * on every account page. account.js only toggles `.hidden` inside the auth
 * card, so scope it there. */
.wmw-account-card .hidden { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  .wmw-account-tab, .wmw-order-card, .wmw-address-card,
  .wmw-btn-primary, .wmw-btn-ghost, .wmw-quick-link,
  .wmw-input, .wmw-dialog { transition: none !important; }
}

/* ════════════════════════════════════════════════════════════════════════
 * Native Woo My Account skin (post-Woo-swap). Maps WooCommerce's My Account
 * markup onto the industrial tokens above so the native portal reads as the
 * same CNC control panel without the custom AJAX layer.
 * ════════════════════════════════════════════════════════════════════════ */
.wmw-woo-account .woocommerce-MyAccount-navigation ul {
  list-style: none;
  margin: 0 0 28px;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
  gap: 0;
  border-bottom: 2px solid var(--wmw-steel-600);
}
.wmw-woo-account .woocommerce-MyAccount-navigation ul::-webkit-scrollbar { display: none; }
.wmw-woo-account .woocommerce-MyAccount-navigation li { flex: 0 0 auto; }
.wmw-woo-account .woocommerce-MyAccount-navigation li a {
  display: inline-flex;
  align-items: center;
  padding: 14px 20px;
  font: 700 11px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wmw-steel-300);
  text-decoration: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  transition: color 0.12s, border-color 0.12s;
  white-space: nowrap;
}
.wmw-woo-account .woocommerce-MyAccount-navigation li a:hover { color: var(--wmw-steel-100); }
.wmw-woo-account .woocommerce-MyAccount-navigation li.is-active a {
  color: var(--wmw-orange);
  border-bottom-color: var(--wmw-orange);
}

.wmw-woo-account .woocommerce-MyAccount-content {
  color: var(--wmw-steel-100);
}
.wmw-woo-account .woocommerce-MyAccount-content p,
.wmw-woo-account .woocommerce-MyAccount-content address,
.wmw-woo-account .woocommerce-MyAccount-content td,
.wmw-woo-account .woocommerce-MyAccount-content th { color: var(--wmw-steel-300); }
.wmw-woo-account .woocommerce-MyAccount-content a:not(.button) { color: var(--wmw-orange); }

/* Orders / addresses tables as work-order cards */
.wmw-woo-account .woocommerce-orders-table,
.wmw-woo-account .shop_table {
  width: 100%;
  border-collapse: collapse;
  background: var(--wmw-steel-800);
  border: 1px solid var(--wmw-steel-600);
  border-left: 3px solid var(--wmw-orange);
}
.wmw-woo-account .woocommerce-orders-table th,
.wmw-woo-account .shop_table th {
  font: 700 10px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wmw-steel-300);
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--wmw-steel-600);
}
.wmw-woo-account .woocommerce-orders-table td,
.wmw-woo-account .shop_table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--wmw-steel-700);
  color: var(--wmw-steel-100);
}

/* Native Woo buttons → primary stamped button */
.wmw-woo-account .button,
.wmw-woo-account .woocommerce-button {
  display: inline-block;
  background: var(--wmw-orange);
  color: #fff;
  font: 700 12px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 14px 22px;
  border: 0;
  border-radius: 0;
  cursor: pointer;
  transition: background 0.12s;
}
.wmw-woo-account .button:hover { background: #FF7742; }

/* Form fields → reuse the .wmw-input look */
.wmw-woo-account input[type="text"],
.wmw-woo-account input[type="email"],
.wmw-woo-account input[type="tel"],
.wmw-woo-account input[type="password"],
.wmw-woo-account select,
.wmw-woo-account textarea {
  width: 100%;
  background: var(--wmw-steel-900);
  border: 1px solid var(--wmw-steel-600);
  border-left: 2px solid var(--wmw-steel-500);
  border-radius: 0;
  color: var(--wmw-steel-100);
  padding: 13px 15px;
  font: 500 16px/1.3 'Rajdhani', system-ui, sans-serif;
}
.wmw-woo-account input:focus,
.wmw-woo-account select:focus,
.wmw-woo-account textarea:focus {
  border-left-color: var(--wmw-orange);
  box-shadow: 0 0 0 3px rgba(246, 99, 50, 0.2);
  outline: none;
}
.wmw-woo-account label {
  display: block;
  font: 600 10px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--wmw-steel-300);
  margin-bottom: 5px;
}
.wmw-woo-account .woocommerce-Message,
.wmw-woo-account .woocommerce-info,
.wmw-woo-account .woocommerce-error {
  background: var(--wmw-steel-800);
  border-left: 3px solid var(--wmw-orange);
  padding: 14px 16px;
  color: var(--wmw-steel-100);
  list-style: none;
}

/* ── Order status pills + live timeline (Phase 2) ───────────────────── */
.wmw-status-pill {
  display: inline-block;
  font: 700 9px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border: 1px solid var(--wmw-steel-600);
  color: var(--wmw-steel-300);
  background: var(--wmw-steel-800);
}
.wmw-status-pill.wmw-status-processing { color: #FFC94D; border-color: rgba(255,201,77,0.4); }      /* Received */
.wmw-status-pill.wmw-status-wmw-in-process { color: var(--wmw-orange); border-color: rgba(246,99,50,0.5); }
.wmw-status-pill.wmw-status-wmw-quality-check { color: #6FB1FF; border-color: rgba(111,177,255,0.5); }
.wmw-status-pill.wmw-status-completed { color: #6BD08A; border-color: rgba(107,208,138,0.5); }       /* Shipped */
.wmw-status-pill.wmw-status-cancelled,
.wmw-status-pill.wmw-status-refunded,
.wmw-status-pill.wmw-status-failed { color: #E07B63; border-color: rgba(224,123,99,0.5); }

.wmw-order-timeline-wrap { margin: 0 0 28px; }
.wmw-order-timeline {
  display: flex;
  gap: 0;
  border: 1px solid var(--wmw-steel-600);
  border-left: 3px solid var(--wmw-orange);
  background: var(--wmw-steel-800);
}
.wmw-ot-step {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  border-right: 1px dashed rgba(246,99,50,0.2);
  position: relative;
}
.wmw-ot-step:last-child { border-right: 0; }
.wmw-ot-num {
  font: 700 10px/1 'Chakra Petch', system-ui, sans-serif;
  letter-spacing: 0.14em;
  color: var(--wmw-steel-500);
}
.wmw-ot-label {
  font: 400 18px/1 'Bebas Neue', system-ui, sans-serif;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--wmw-steel-300);
}
.wmw-ot-mark { position: absolute; top: 14px; right: 16px; font-size: 13px; }
.wmw-ot-step.is-complete .wmw-ot-num,
.wmw-ot-step.is-complete .wmw-ot-label { color: #6BD08A; }
.wmw-ot-step.is-complete .wmw-ot-mark { color: #6BD08A; }
.wmw-ot-step.is-current { background: rgba(246,99,50,0.06); }
.wmw-ot-step.is-current .wmw-ot-num { color: var(--wmw-orange); }
.wmw-ot-step.is-current .wmw-ot-label { color: var(--wmw-steel-50); }
.wmw-ot-step.is-current .wmw-ot-mark { color: var(--wmw-orange); }
.wmw-order-timeline--halted { padding: 14px 18px; border: 1px solid rgba(224,123,99,0.5); }
.wmw-ot-halted { font: 700 12px/1 'Chakra Petch', system-ui, sans-serif; letter-spacing: 0.14em; text-transform: uppercase; color: #E07B63; }

@media (max-width: 640px) {
  .wmw-order-timeline { flex-direction: column; }
  .wmw-ot-step { border-right: 0; border-bottom: 1px dashed rgba(246,99,50,0.2); flex-direction: row; align-items: center; justify-content: space-between; }
  .wmw-ot-step:last-child { border-bottom: 0; }
  .wmw-ot-mark { position: static; }
}
