/* MAIN STAGE pack: MY ACCOUNT (owner: account; FLOW-CONTRACT.md A4). The Theme Builder body "(01-Stage-26) Account"
   (build/account/gen_account.py) around WooCommerce's own account ([slmg_account], kit/modules/account/module.php).
   Loaded on the account page only, after stage.css and the shared field look (forms.css, handle slmg-forms). This file
   PLACES things: the head, the menu beside the content, the sign-in and register columns, the tables, the address cards,
   the empty states. It sets no field, label, notice or store-button look: forms.css owns those for the whole flow.
   The downloads block's look is receipt.css (shared, the receipt owner's). Every rule starts with .slmg-dir-stage. */

/* ---------- the three bands: one column inside the page's side gutter, as the cart and checkout ---------- */
.slmg-dir-stage .slmg-ac-sec .slmg-ac-col { padding: 0 var(--slmg-gut); max-width: calc(1280px + 2 * var(--slmg-gut)); margin: 0 auto; }
/* Divi zeroes a last column's right margin with !important, which pushed the column right (measured: 80 px left, 0 right) */
.slmg-dir-stage .slmg-ac-sec .slmg-ac-col.et_pb_column { margin-left: auto !important; margin-right: auto !important; }
.slmg-dir-stage .slmg-ac-head .slmg-ac-col { padding-top: var(--slmg-s4); padding-bottom: var(--slmg-s6); }
.slmg-dir-stage .slmg-ac-head .slmg-crumbs { margin-bottom: var(--slmg-s4); }
.slmg-dir-stage .slmg-ac-title { font: 800 clamp(36px, calc(4vw / var(--vp-zoom, 1)), 64px)/.95 var(--slmg-display); font-stretch: 62%; text-transform: uppercase; letter-spacing: -.005em; color: var(--slmg-ink); overflow-wrap: anywhere; }
.slmg-dir-stage .slmg-ac-lead { margin-top: var(--slmg-s3); font-size: 17px; line-height: 1.5; color: var(--slmg-dim); max-width: 60ch; }
/* the lead line is for a visitor who is signed out, on the sign-in page (not the password pages) */
body.slmg-dir-stage.slmg-ac--in .slmg-ac-out-only,
body.slmg-dir-stage.woocommerce-lost-password .slmg-ac-out-only { display: none; }
.slmg-dir-stage .slmg-ac-main .slmg-ac-col { padding-bottom: var(--slmg-s8); }
.slmg-dir-stage .slmg-ac-editor { padding: var(--slmg-s4); border: 1px dashed var(--slmg-line-strong); color: var(--slmg-dim); font-size: 16px; }


/* ---------- inside the store's account: running text and links ---------- */
.slmg-dir-stage .slmg-account { font-size: 16px; line-height: 1.55; color: var(--slmg-ink); }
.slmg-dir-stage .slmg-account .woocommerce { display: block; }
.slmg-dir-stage .slmg-account .woocommerce::before, .slmg-dir-stage .slmg-account .woocommerce::after { display: none; }
.slmg-dir-stage .slmg-account p { margin: 0 0 var(--slmg-s4); }
.slmg-dir-stage .slmg-account :is(p, address, td, label) a:not(.button):not(.slmg-ac-btn):not(.slmg-dl__btn):not(.slmg-dl__file) { color: var(--slmg-ink); text-decoration: underline; text-decoration-color: var(--slmg-orange); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.slmg-dir-stage .slmg-account :is(p, address, td, label) a:not(.button):not(.slmg-ac-btn):not(.slmg-dl__btn):not(.slmg-dl__file):hover { color: var(--slmg-orange); }
/* section titles in the one title style of the site (operator #11: capitals, as cart and checkout) */
.slmg-dir-stage .slmg-account :is(h2, h3) { margin: 0 0 var(--slmg-s4); padding: 0; font: 800 clamp(24px, calc(2.2vw / var(--vp-zoom, 1)), 32px)/1 var(--slmg-display); font-stretch: 62%; text-transform: uppercase; letter-spacing: -.005em; color: var(--slmg-ink); }
.slmg-dir-stage .slmg-account mark { background: none; padding: 0; color: var(--slmg-ink); font-weight: 700; }

/* ---------- signed out: sign in first and large, register beside it (under it on a phone) ---------- */
.slmg-dir-stage .slmg-account--out #customer_login {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--slmg-s7); align-items: start; width: auto; margin: 0; }
.slmg-dir-stage .slmg-account--out #customer_login::before, .slmg-dir-stage .slmg-account--out #customer_login::after { display: none; }
.slmg-dir-stage .slmg-account--out #customer_login > [class*="u-column"] { float: none; width: auto; max-width: none; margin: 0; padding: 0; }
/* the H1 already says "Sign in": WooCommerce's own "Login" heading stays for screen readers only */
.slmg-dir-stage .slmg-account--out #customer_login .u-column1 > h2 { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; margin: 0; }
.slmg-dir-stage .slmg-account--out form.woocommerce-form-login,
.slmg-dir-stage .slmg-account--out form.woocommerce-form-register,
.slmg-dir-stage .slmg-account form.lost_reset_password { max-width: 560px; margin: 0; padding: 0; border: 0; border-radius: 0; }
/* register: a quieter panel, its WooCommerce heading set as a small label */
.slmg-dir-stage .slmg-account--out #customer_login .u-column2 { padding: var(--slmg-s6); background: var(--slmg-surface); border: 1px solid var(--slmg-line); border-radius: var(--slmg-r); }
.slmg-dir-stage .slmg-account--out #customer_login .u-column2 > h2 { margin: 0 0 var(--slmg-s5); font: 500 13px/1.4 var(--slmg-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--slmg-dim); }
/* the sign-in row: the button, then "Remember me" beside it; "Lost your password?" a full 44 px target */
.slmg-dir-stage .slmg-account form.woocommerce-form-login .form-row:has(.woocommerce-form-login__submit) { display: flex; flex-wrap: wrap; align-items: center; gap: var(--slmg-s3) var(--slmg-s5); }
.slmg-dir-stage .slmg-account form.woocommerce-form-login .woocommerce-form-login__submit { order: 2; float: none; margin: 0; min-width: 200px; }
/* "sign in first and large": the sign-in press is orange through forms.css (its primary list names it since the integration pass) */
.slmg-dir-stage .slmg-account form.woocommerce-form-login .woocommerce-form-login__rememberme { order: 1; flex: 1 0 100%; margin: 0; }
.slmg-dir-stage .slmg-account .woocommerce-LostPassword { margin: var(--slmg-s4) 0 0; }
.slmg-dir-stage .slmg-account .woocommerce-LostPassword a { display: inline-flex; align-items: center; min-height: 44px; }
.slmg-dir-stage .slmg-account .woocommerce-privacy-policy-text { color: var(--slmg-dim); }
/* lost password: one field across */
.slmg-dir-stage .slmg-account form.lost_reset_password > p:first-of-type { color: var(--slmg-dim); }
.slmg-dir-stage .slmg-account form.lost_reset_password :is(.form-row-first, .form-row-last) { float: none; width: 100%; }

/* ---------- signed in: the menu beside the content (a wrapping row of chips on a phone) ---------- */
.slmg-dir-stage .slmg-account--in > .woocommerce { display: grid; grid-template-columns: minmax(180px, 220px) minmax(0, 1fr); gap: var(--slmg-s7); align-items: start; }
.slmg-dir-stage .slmg-account--in .woocommerce-MyAccount-navigation,
.slmg-dir-stage .slmg-account--in .woocommerce-MyAccount-content { float: none; width: auto; margin: 0; min-width: 0; }
.slmg-dir-stage .slmg-account--in .woocommerce-MyAccount-navigation { position: sticky; top: calc(var(--slmg-chrome-bar, 60px) + var(--slmg-s4)); }
.slmg-dir-stage .slmg-account .woocommerce-MyAccount-navigation ul { margin: 0; padding: 0; list-style: none; border-left: 1px solid var(--slmg-line); }
.slmg-dir-stage .slmg-account .woocommerce-MyAccount-navigation li { margin: 0; padding: 0; list-style: none; }
.slmg-dir-stage .slmg-account .woocommerce-MyAccount-navigation li a {
  display: flex; align-items: center; min-height: 44px; margin-left: -1px; padding: 6px var(--slmg-s4); border-left: 2px solid transparent;
  font-size: 16px; line-height: 1.3; color: var(--slmg-dim); text-decoration: none; transition: color .16s, border-color .16s; }
.slmg-dir-stage .slmg-account .woocommerce-MyAccount-navigation li a:hover { color: var(--slmg-ink); border-left-color: var(--slmg-line-strong); }
.slmg-dir-stage .slmg-account .woocommerce-MyAccount-navigation li.is-active a { color: var(--slmg-ink); font-weight: 700; border-left-color: var(--slmg-orange); }
.slmg-dir-stage .slmg-account .woocommerce-MyAccount-navigation li a:focus-visible { outline: 2px solid var(--slmg-ink); outline-offset: -2px; }
.slmg-dir-stage .slmg-account .woocommerce-MyAccount-navigation-link--customer-logout { margin-top: var(--slmg-s4) !important; padding-top: var(--slmg-s3) !important; border-top: 1px solid var(--slmg-line); }
.slmg-dir-stage .slmg-account .woocommerce-MyAccount-navigation-link--customer-logout a { color: var(--slmg-mute); }

/* the library's top line: who is signed in (a design label) */
.slmg-dir-stage .slmg-account .slmg-ac-who { margin: 0 0 var(--slmg-s5); font: 500 12px/1.4 var(--slmg-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--slmg-mute); overflow-wrap: anywhere; }

/* ---------- empty states (library, orders): one line large, one sentence, one button ---------- */
.slmg-dir-stage .slmg-account .slmg-ac-empty { padding: var(--slmg-s7) var(--slmg-s6); border: 1px dashed var(--slmg-line-strong); border-radius: var(--slmg-r); background: var(--slmg-surface); }
.slmg-dir-stage .slmg-account .slmg-ac-empty__title { margin: 0 0 var(--slmg-s2); font: 800 clamp(26px, calc(2.4vw / var(--vp-zoom, 1)), 36px)/1.05 var(--slmg-display); font-stretch: 62%; color: var(--slmg-ink); }
.slmg-dir-stage .slmg-account .slmg-ac-empty__line { margin: 0 0 var(--slmg-s5); color: var(--slmg-dim); max-width: 52ch; }
.slmg-dir-stage .slmg-account .slmg-ac-empty__go { margin: 0; }
.slmg-dir-stage .slmg-account a.slmg-ac-btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border: 1px solid var(--slmg-orange); border-radius: var(--slmg-r);
  background: var(--slmg-orange); color: var(--slmg-on-orange); font: 800 15px/1 var(--slmg-display); letter-spacing: .04em; text-transform: uppercase; text-decoration: none; transition: background-color .16s, border-color .16s; }
.slmg-dir-stage .slmg-account a.slmg-ac-btn:hover { background: var(--slmg-orange-hover); border-color: var(--slmg-orange-hover); color: var(--slmg-on-orange); }
.slmg-dir-stage .slmg-account a.slmg-ac-btn:focus-visible { outline: 2px solid var(--slmg-ink); outline-offset: 2px; }

/* ---------- tables: orders, a single order, WooCommerce's downloads table (the fallback) ---------- */
.slmg-dir-stage .slmg-account table.shop_table { width: 100%; margin: 0 0 var(--slmg-s6); border: 0; border-radius: 0; border-collapse: collapse; font-size: 16px; line-height: 1.4; font-variant-numeric: tabular-nums; background: none; }
.slmg-dir-stage .slmg-account table.shop_table :is(th, td) { padding: 14px var(--slmg-s3) 14px 0; border: 0; border-bottom: 1px solid var(--slmg-line); text-align: left; vertical-align: middle; background: none; color: var(--slmg-ink); }
.slmg-dir-stage .slmg-account table.shop_table :is(th, td):last-child { padding-right: 0; }
.slmg-dir-stage .slmg-account table.shop_table thead th { font: 500 12px/1.4 var(--slmg-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--slmg-dim); border-bottom-color: var(--slmg-line-strong); }
.slmg-dir-stage .slmg-account table.shop_table tfoot :is(th, td) { font-weight: 400; color: var(--slmg-dim); }
.slmg-dir-stage .slmg-account table.shop_table tfoot tr:last-child :is(th, td) { font-weight: 700; color: var(--slmg-ink); border-bottom-color: var(--slmg-line-strong); }
.slmg-dir-stage .slmg-account table.shop_table .woocommerce-orders-table__cell-order-actions { text-align: right; }
.slmg-dir-stage .slmg-account table.shop_table .woocommerce-orders-table__cell-order-actions .button { margin: 4px 0 4px var(--slmg-s2); }
.slmg-dir-stage .slmg-account table.shop_table .woocommerce-orders-table__cell-order-number a { font-weight: 700; }
/* links in a table row: full 44 px targets, a quiet underline (the orange one is for running text) */
.slmg-dir-stage .slmg-account table.shop_table :is(td, th) a:not(.button):not(.slmg-ac-btn) { display: inline-flex; align-items: center; min-height: 44px; text-decoration-color: var(--slmg-line-strong); }
.slmg-dir-stage .slmg-account table.shop_table :is(td, th) a:not(.button):not(.slmg-ac-btn):hover { text-decoration-color: currentColor; }
.slmg-dir-stage .slmg-account .woocommerce-pagination { display: flex; gap: var(--slmg-s3); }

/* the orders list's releases: whole covers, small, and catalogue numbers */
.slmg-dir-stage .slmg-account .slmg-ac-rels { display: flex; flex-wrap: wrap; gap: var(--slmg-s2) var(--slmg-s4); margin: 0; padding: 0; list-style: none; }
.slmg-dir-stage .slmg-account .slmg-ac-rels__item { display: inline-flex; align-items: center; gap: var(--slmg-s2); margin: 0; }
.slmg-dir-stage .slmg-account .slmg-ac-rels__cover { display: block; flex: none; width: 40px; height: 40px; object-fit: contain; background: var(--slmg-black); border-radius: var(--slmg-r); }
.slmg-dir-stage .slmg-account .slmg-ac-rels__cover--none { border: 1px solid var(--slmg-line); }
.slmg-dir-stage .slmg-account .slmg-ac-rels__cat { font: 500 13px/1.3 var(--slmg-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--slmg-ink); }
.slmg-dir-stage .slmg-account .slmg-ac-rels__more { align-self: center; font-size: 14px; color: var(--slmg-dim); }

/* ---------- a single order: the downloads block first, then the store's details ---------- */
.slmg-dir-stage .slmg-account .slmg-ac-orderdl { margin: var(--slmg-s5) 0 var(--slmg-s7); }
.slmg-dir-stage .slmg-account .woocommerce-MyAccount-content > p:first-of-type { color: var(--slmg-dim); }
.slmg-dir-stage .slmg-account :is(.woocommerce-order-details, .woocommerce-customer-details, .woocommerce-order-downloads) { margin: 0 0 var(--slmg-s7); }
.slmg-dir-stage .slmg-account .woocommerce-customer-details .col2-set { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--slmg-s5); width: auto; }
.slmg-dir-stage .slmg-account .woocommerce-customer-details .col2-set::before, .slmg-dir-stage .slmg-account .woocommerce-customer-details .col2-set::after { display: none; }
.slmg-dir-stage .slmg-account .woocommerce-customer-details .col2-set > .woocommerce-column { float: none; width: auto; margin: 0; }
.slmg-dir-stage .slmg-account address { margin: 0; padding: var(--slmg-s5); border: 1px solid var(--slmg-line); border-radius: var(--slmg-r); background: var(--slmg-surface); font-style: normal; font-size: 16px; line-height: 1.6; color: var(--slmg-ink); }
.slmg-dir-stage .slmg-account address p { margin: var(--slmg-s2) 0 0; }
.slmg-dir-stage .slmg-account .order-again { margin: 0 0 var(--slmg-s6); }

/* a single order's lines, named as in the cart (cover, catalogue number, artist, title, format: module.php V10) */
.slmg-dir-stage .slmg-account .slmg-ac-item { display: inline-flex; align-items: flex-start; gap: var(--slmg-s3); vertical-align: top; text-align: left; }
.slmg-dir-stage .slmg-account .slmg-ac-item__cover { display: block; flex: none; width: 56px; height: 56px; object-fit: contain; background: var(--slmg-black); border-radius: var(--slmg-r); }
.slmg-dir-stage .slmg-account .slmg-ac-item__cover--none { border: 1px solid var(--slmg-line); }
.slmg-dir-stage .slmg-account .slmg-ac-item__names { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.slmg-dir-stage .slmg-account .slmg-ac-item__cat { font: 500 12px/1.3 var(--slmg-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--slmg-mute); }
.slmg-dir-stage .slmg-account .slmg-ac-item__artist { font-size: 15px; line-height: 1.3; color: var(--slmg-mute); }
.slmg-dir-stage .slmg-account .slmg-ac-item__title { font-weight: 700; font-size: 16px; line-height: 1.35; color: var(--slmg-ink); overflow-wrap: anywhere; }
.slmg-dir-stage .slmg-account .slmg-ac-item__title a { color: inherit; text-decoration: none; }
.slmg-dir-stage .slmg-account .slmg-ac-item__title a:hover { color: var(--slmg-orange); }
.slmg-dir-stage .slmg-account .slmg-ac-item__fmt { font: 500 12px/1.3 var(--slmg-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--slmg-ink); }
.slmg-dir-stage .slmg-account .woocommerce-table__product-name .slmg-ac-item + .product-quantity { display: block; margin: 4px 0 0 calc(56px + var(--slmg-s3)); font: 500 12px/1.3 var(--slmg-mono); color: var(--slmg-mute); }

/* ---------- addresses: two cards ---------- */
.slmg-dir-stage .slmg-account .woocommerce-Addresses { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: var(--slmg-s5); width: auto; margin: var(--slmg-s4) 0 0; }
.slmg-dir-stage .slmg-account .woocommerce-Addresses::before, .slmg-dir-stage .slmg-account .woocommerce-Addresses::after { display: none; }
.slmg-dir-stage .slmg-account .woocommerce-Addresses > .woocommerce-Address { float: none; width: auto; margin: 0; }
.slmg-dir-stage .slmg-account .woocommerce-Address-title { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--slmg-s4); margin: 0 0 var(--slmg-s2); }
.slmg-dir-stage .slmg-account .woocommerce-Address-title::before, .slmg-dir-stage .slmg-account .woocommerce-Address-title::after { display: none; }
.slmg-dir-stage .slmg-account .woocommerce-Address-title :is(h2, h3) { margin: 0; font-size: 20px; }
.slmg-dir-stage .slmg-account .woocommerce-Address-title a.edit { float: none; display: inline-flex; align-items: center; min-height: 44px; }
.slmg-dir-stage .slmg-account .woocommerce-Address address { min-height: 120px; }

/* ---------- the edit forms (address, account details): a readable width; fields are forms.css's ---------- */
.slmg-dir-stage .slmg-account :is(.woocommerce-EditAccountForm, .woocommerce-address-fields, form.woocommerce-form) { max-width: 720px; }
.slmg-dir-stage .slmg-account .woocommerce-EditAccountForm fieldset { margin: var(--slmg-s6) 0 var(--slmg-s5); padding: var(--slmg-s5) 0 0; border: 0; border-top: 1px solid var(--slmg-line); }

/* the library: the shared downloads block (receipt.css) gets the content column's full width */
.slmg-dir-stage .slmg-account .slmg-ac-lib, .slmg-dir-stage .slmg-account .slmg-ac-block { min-width: 0; }

/* ---------- phones and narrow tablets ---------- */
@media (max-width: 900px) {
  .slmg-dir-stage .slmg-ac-head .slmg-ac-col { padding-bottom: var(--slmg-s5); }
  .slmg-dir-stage .slmg-ac-main .slmg-ac-col { padding-bottom: var(--slmg-s7); }
  .slmg-dir-stage .slmg-account--out #customer_login { grid-template-columns: minmax(0, 1fr); gap: var(--slmg-s7); }
  .slmg-dir-stage .slmg-account--out #customer_login .u-column2 { padding: var(--slmg-s5) var(--slmg-s4); }
  .slmg-dir-stage .slmg-account form.woocommerce-form-login .woocommerce-form-login__submit { flex: 1 1 100%; }

  .slmg-dir-stage .slmg-account--in > .woocommerce { grid-template-columns: minmax(0, 1fr); gap: var(--slmg-s5); }
  .slmg-dir-stage .slmg-account--in .woocommerce-MyAccount-navigation { position: static; }
  .slmg-dir-stage .slmg-account .woocommerce-MyAccount-navigation ul { display: flex; flex-wrap: wrap; gap: var(--slmg-s2); border-left: 0; }
  .slmg-dir-stage .slmg-account .woocommerce-MyAccount-navigation li a { margin: 0; padding: 0 var(--slmg-s4); border: 1px solid var(--slmg-line-strong); border-radius: var(--slmg-r); font-size: 15px; white-space: nowrap; }
  .slmg-dir-stage .slmg-account .woocommerce-MyAccount-navigation li a:hover { border-color: var(--slmg-ink); }
  .slmg-dir-stage .slmg-account .woocommerce-MyAccount-navigation li.is-active a { border-color: var(--slmg-orange); }
  .slmg-dir-stage .slmg-account .woocommerce-MyAccount-navigation-link--customer-logout { margin: 0 !important; padding: 0 !important; border-top: 0; }

  .slmg-dir-stage .slmg-account .slmg-ac-empty { padding: var(--slmg-s6) var(--slmg-s4); }

  /* tables become one block per row, each value under its column's name (WooCommerce prints data-title on every cell) */
  .slmg-dir-stage .slmg-account table.shop_table_responsive thead { display: none; }
  .slmg-dir-stage .slmg-account table.shop_table_responsive :is(tbody, tr) { display: block; }
  .slmg-dir-stage .slmg-account table.shop_table_responsive tbody tr { padding: var(--slmg-s3) 0; border-bottom: 1px solid var(--slmg-line); }
  .slmg-dir-stage .slmg-account table.shop_table_responsive tbody tr td,
  .slmg-dir-stage .slmg-account table.shop_table_responsive tbody tr th { display: block; padding: 6px 0; border: 0; text-align: right; overflow: hidden; }
  .slmg-dir-stage .slmg-account table.shop_table_responsive tbody tr :is(td, th)[data-title]::before {
    content: attr(data-title); float: left; margin: 0 var(--slmg-s4) 0 0; padding-top: 4px; font: 500 12px/1.4 var(--slmg-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--slmg-dim); text-align: left; }
  .slmg-dir-stage .slmg-account table.shop_table_responsive tbody tr .woocommerce-orders-table__cell-order-actions { text-align: left; }
  .slmg-dir-stage .slmg-account table.shop_table_responsive tbody tr .woocommerce-orders-table__cell-order-actions::before { display: none; }
  .slmg-dir-stage .slmg-account table.shop_table_responsive tbody tr .woocommerce-orders-table__cell-order-actions .button { margin: var(--slmg-s2) 0 0; }
  .slmg-dir-stage .slmg-account table.shop_table_responsive .slmg-ac-rels { justify-content: flex-end; }
}
