/* DW account information architecture (cc-dw-account-polish-20261109, release B): Downloads by World, Orders as
   receipts, saved payment methods as cards, empty states, Billing and shipping inside Account settings.
   Loaded after release A (uses its --dwa-* tokens, with fallbacks). Account pages only. */

body.woocommerce-account .woocommerce-MyAccount-content .dw-acct-lede {
  margin: 0 0 24px !important;
  max-width: 68ch;
  color: var(--dwa-muted, #c9c2b3) !important;
  font-size: 16px;
  line-height: 1.6;
}

/* ---------- empty states ---------- */
body.woocommerce-account .dw-acct-empty {
  box-sizing: border-box;
  max-width: 640px;
  padding: 32px 30px 34px;
  background: var(--dwa-card, #16161a);
  border: 1px solid var(--dwa-line, rgba(255, 226, 150, .18));
  border-radius: 16px;
}
body.woocommerce-account .dw-acct-empty h2 { margin: 0 0 8px !important; font-size: clamp(24px, 2.4vw, 30px) !important; }
body.woocommerce-account .dw-acct-empty p { margin: 0 0 22px; color: var(--dwa-txt, #ece6da); font-size: 16.5px; line-height: 1.6; }
body.woocommerce-account .dw-acct-empty--small { padding: 22px 24px; }
body.woocommerce-account .dw-acct-empty--small p { margin: 0; }

/* ---------- Downloads, grouped by World ---------- */
body.woocommerce-account .dw-dl { display: flex; flex-direction: column; gap: 28px; }
body.woocommerce-account .dw-dl-world {
  box-sizing: border-box;
  padding: 24px 26px 18px;
  background: var(--dwa-card, #16161a);
  border: 1px solid var(--dwa-line, rgba(255, 226, 150, .18));
  border-radius: 18px;
}
body.woocommerce-account .dw-dl-world-head { display: flex; align-items: center; gap: 18px; margin: 0 0 18px; }
body.woocommerce-account .dw-dl-art { flex: 0 0 88px; width: 88px; height: 88px; border-radius: 12px; overflow: hidden; border: 1px solid var(--dwa-line, rgba(255, 226, 150, .18)); background: #0c0c0e; }
body.woocommerce-account .dw-dl-art img { display: block; width: 100%; height: 100%; object-fit: cover; }
body.woocommerce-account .dw-dl-art-blank { display: block; width: 100%; height: 100%; background: radial-gradient(circle at 50% 45%, rgba(255, 226, 150, .35), rgba(196, 140, 52, .08) 55%, transparent 70%); }
body.woocommerce-account .dw-dl-world-title h2 { margin: 0 !important; font-size: clamp(24px, 2.4vw, 32px) !important; line-height: 1.15; }
body.woocommerce-account .dw-dl-held { margin: 6px 0 0 !important; color: var(--dwa-gold, #ffe296) !important; font-size: 14px; font-weight: 600; letter-spacing: .04em; }

body.woocommerce-account .dw-dl-cert {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  margin: 0 0 18px;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(255, 226, 150, .1), rgba(255, 226, 150, .03));
  border: 1px solid rgba(255, 226, 150, .4);
  border-radius: 12px;
}
body.woocommerce-account .dw-dl-cert-badge {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff1c6, #ffe296 40%, #c48c34 100%);
  box-shadow: 0 0 0 3px rgba(255, 226, 150, .18);
}
body.woocommerce-account .dw-dl-cert h3 { margin: 0 0 4px !important; font-size: 19px !important; }
body.woocommerce-account .dw-dl-cert p { margin: 0 !important; color: var(--dwa-txt, #ece6da); font-size: 15px; line-height: 1.6; }
body.woocommerce-account .dw-dl-cert .dw-dl-cert-link { margin-left: 8px; font-weight: 700; white-space: nowrap; }

body.woocommerce-account .dw-dl-tier { padding: 14px 0 6px; border-top: 1px solid rgba(255, 226, 150, .12); }
body.woocommerce-account .dw-dl-tier-name {
  margin: 0 0 6px !important;
  font-family: var(--dwa-sans, sans-serif) !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: .12em !important;
  text-transform: uppercase;
  color: var(--dwa-gold, #ffe296) !important;
}
body.woocommerce-account .dw-dl-group {
  margin: 12px 0 4px !important;
  font-family: var(--dwa-sans, sans-serif) !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  color: var(--dwa-strong, #f7f2e8) !important;
}
body.woocommerce-account .dw-dl-files { margin: 0 !important; padding: 0 !important; list-style: none !important; }
body.woocommerce-account .dw-dl-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px 18px;
  margin: 0 !important;
  padding: 12px 0;
  border-top: 1px solid rgba(255, 226, 150, .07);
  list-style: none !important;
}
body.woocommerce-account .dw-dl-files .dw-dl-file:first-child { border-top: 0; }
body.woocommerce-account .dw-dl-file-main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
body.woocommerce-account .dw-dl-file-name { color: var(--dwa-strong, #f7f2e8); font-size: 16.5px; font-weight: 600; line-height: 1.35; }
body.woocommerce-account .dw-dl-file-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; color: var(--dwa-muted, #c9c2b3); font-size: 14px; line-height: 1.5; }
body.woocommerce-account .dw-dl-chip {
  display: inline-block;
  padding: 1px 8px;
  border: 1px solid rgba(255, 226, 150, .45);
  border-radius: 6px;
  color: var(--dwa-gold, #ffe296);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
}
body.woocommerce-account .woocommerce .dw-dl-btn { flex: 0 0 auto; min-height: 46px !important; padding: 0 24px !important; font-size: 13.5px !important; }

/* ---------- Orders ---------- */
body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-lines { margin: 0 !important; padding: 0 !important; list-style: none !important; }
body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-lines li { margin: 0 !important; list-style: none !important; line-height: 1.4; }
body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-lines li + li { margin-top: 6px !important; }
body.woocommerce-account .dw-o-world { display: block; color: var(--dwa-strong, #f7f2e8); font-weight: 600; }
body.woocommerce-account .dw-o-tier { display: block; color: var(--dwa-muted, #c9c2b3); font-size: 14px; }
body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-num a { font-weight: 700; font-variant-numeric: tabular-nums; }
body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-total { font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-actions { text-align: right; white-space: nowrap; }
body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-date { white-space: nowrap; }

/* status pills: the word carries the meaning, the colour supports it */
body.woocommerce-account .dw-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border: 1px solid rgba(255, 226, 150, .45);
  border-radius: 999px;
  color: var(--dwa-gold, #ffe296);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .02em;
  white-space: nowrap;
}
body.woocommerce-account .dw-pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
body.woocommerce-account .dw-pill--completed { color: #9fe8c0; border-color: rgba(63, 178, 127, .6); background: rgba(63, 178, 127, .1); }
body.woocommerce-account .dw-pill--processing { color: #ffe08a; border-color: rgba(255, 199, 51, .55); background: rgba(255, 199, 51, .08); }
body.woocommerce-account .dw-pill--on-hold,
body.woocommerce-account .dw-pill--pending { color: #ffc49e; border-color: rgba(247, 139, 83, .55); background: rgba(247, 139, 83, .08); }
body.woocommerce-account .dw-pill--cancelled,
body.woocommerce-account .dw-pill--failed { color: #ffaba3; border-color: rgba(229, 83, 75, .55); background: rgba(229, 83, 75, .08); }
body.woocommerce-account .dw-pill--refunded { color: #d9d2c4; border-color: rgba(217, 210, 196, .45); }
body.woocommerce-account .dw-pill--default { color: var(--dwa-gold, #ffe296); }
body.woocommerce-account .dw-pill--default::before { display: none; }
body.woocommerce-account .dw-o-pages { display: flex; gap: 12px; margin: 0 0 32px; }

/* ---------- Payment methods ---------- */
body.woocommerce-account .dw-pm-list { display: flex; flex-direction: column; gap: 12px; max-width: 760px; margin: 0 0 24px !important; padding: 0 !important; list-style: none !important; }
body.woocommerce-account .dw-pm {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
  margin: 0 !important;
  padding: 16px 18px;
  background: var(--dwa-card, #16161a);
  border: 1px solid var(--dwa-line, rgba(255, 226, 150, .18));
  border-radius: 14px;
  list-style: none !important;
}
body.woocommerce-account .dw-pm--default { border-color: rgba(255, 226, 150, .5); }
body.woocommerce-account .dw-pm-icon { flex: 0 0 46px; width: 46px; height: 32px; border-radius: 6px; border: 1px solid rgba(255, 226, 150, .45); background: #1f1d22 center / 26px no-repeat; }
body.woocommerce-account .dw-pm-icon--card { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 18' fill='none' stroke='%23ffe296' stroke-width='1.5'%3E%3Crect x='1' y='1' width='24' height='16' rx='2.5'/%3E%3Cpath d='M1 6h24M5 12.5h6'/%3E%3C/svg%3E"); }
body.woocommerce-account .dw-pm-icon--link { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 26 18' fill='none' stroke='%23ffe296' stroke-width='1.8' stroke-linecap='round'%3E%3Cpath d='M11 6.5H8.5a3 3 0 0 0 0 5H11M15 6.5h2.5a3 3 0 0 1 0 5H15M10 9h6'/%3E%3C/svg%3E"); }
body.woocommerce-account .dw-pm-main { display: flex; flex-direction: column; gap: 2px; flex: 1 1 220px; min-width: 0; }
body.woocommerce-account .dw-pm-label { color: var(--dwa-strong, #f7f2e8); font-size: 16.5px; font-weight: 600; overflow-wrap: anywhere; }
body.woocommerce-account .dw-pm-meta { color: var(--dwa-muted, #c9c2b3); font-size: 14px; }
body.woocommerce-account .dw-pm-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-left: auto; }
body.woocommerce-account .woocommerce .dw-pm-actions .button { min-height: 44px !important; padding: 0 16px !important; font-size: 14px !important; }
body.woocommerce-account .dw-pm-add { margin: 0 0 32px !important; }
body.woocommerce-account .woocommerce .dw-pm-add .button { text-transform: none !important; letter-spacing: .03em !important; font-size: 15px !important; }

/* ---------- Account settings: Billing and shipping ---------- */
body.woocommerce-account .dw-acct-addresses { max-width: 760px; margin: 36px 0 0; }
body.woocommerce-account .dw-acct-addresses > h2 { margin: 0 0 6px !important; }
body.woocommerce-account .dw-acct-addresses > .dw-acct-lede { margin-bottom: 18px !important; }
body.woocommerce-account .dw-acct-addresses .woocommerce-Addresses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
body.woocommerce-account .dw-acct-addresses .woocommerce-Addresses::before,
body.woocommerce-account .dw-acct-addresses .woocommerce-Addresses::after { display: none !important; }
body.woocommerce-account .dw-acct-addresses .woocommerce-Address { float: none !important; width: auto !important; margin: 0 !important; }
body.woocommerce-account .dw-acct-addresses > p:empty,
body.woocommerce-account .woocommerce-MyAccount-content > p:empty { display: none; }
body.woocommerce-account .dw-acct-addresses .woocommerce-Address-title h2 { font-size: 20px !important; }

/* ---------- Your Galaxy: passkey nudge (item 11); Account settings: close-account line (item 15) ---------- */
body.woocommerce-account .dw-passkey-nudge {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 20px;
  max-width: 1200px; box-sizing: border-box; margin: 0 auto 24px; padding: 14px 18px;
  background: var(--dwa-card, #16161a); border: 1px solid var(--dwa-line, rgba(255, 226, 150, .18)); border-left: 3px solid var(--dwa-gold-2, #c48c34); border-radius: 12px;
}
body.woocommerce-account .dw-passkey-nudge p { margin: 0 !important; color: var(--dwa-txt, #ece6da); font-size: 15.5px; line-height: 1.55; flex: 1 1 320px; }
body.woocommerce-account .woocommerce .dw-passkey-nudge .button { min-height: 44px !important; padding: 0 20px !important; font-size: 14px !important; }
body.woocommerce-account .dw-acct-close { max-width: 760px; margin: 28px 0 0 !important; color: var(--dwa-muted, #c9c2b3) !important; font-size: 14.5px; line-height: 1.6; }

/* ---------- phones ---------- */
@media (max-width: 760px) {
  body.woocommerce-account .dw-dl-world { padding: 18px 16px 10px; border-radius: 16px; }
  body.woocommerce-account .dw-dl-art { flex-basis: 64px; width: 64px; height: 64px; }
  body.woocommerce-account .dw-dl-file { flex-direction: column; align-items: stretch; }
  body.woocommerce-account .woocommerce .dw-dl-btn { width: 100%; }
  body.woocommerce-account .dw-acct-addresses .woocommerce-Addresses { grid-template-columns: 1fr; }
  body.woocommerce-account .dw-pm-actions { margin-left: 0; width: 100%; }
  /* orders: one card per order */
  body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders,
  body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders tbody { display: block; border: 0 !important; background: transparent !important; overflow: visible; }
  body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders tr.dw-o-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "num status" "items items" "date total" "actions actions";
    gap: 8px 12px;
    margin: 0 0 14px;
    padding: 16px;
    background: var(--dwa-card, #16161a);
    border: 1px solid var(--dwa-line, rgba(255, 226, 150, .18));
    border-radius: 14px;
  }
  body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders tr.dw-o-row > * { display: block; padding: 0 !important; border: 0 !important; text-align: left !important; }
  body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-num { grid-area: num; font-size: 17px; }
  body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-status { grid-area: status; text-align: right !important; }
  body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-items { grid-area: items; }
  body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-date { grid-area: date; color: var(--dwa-muted, #c9c2b3) !important; font-size: 14px; }
  body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-total { grid-area: total; text-align: right !important; }
  body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-actions { grid-area: actions; display: flex; gap: 8px; }
  body.woocommerce-account .woocommerce-MyAccount-content table.dw-orders .dw-o-actions .button { flex: 1 1 auto; }
}
