/* ==========================================================================
   MANAGE ACCOUNT  (/my-account/)
   The prototype carries this page entirely in inline styles. Ported to classes,
   reusing the card treatment the settings screen already established rather
   than retyping the white-panel-hairline-shadow trio a fifth time.
   ========================================================================== */

.acct-head{background:var(--wash);border-bottom:1px solid var(--slate-200);padding:34px 0}
.acct-head .crumbs{margin-bottom:14px}
.acct-head h1{font-size:1.75rem}
.acct-sub{margin-top:6px;font-size:.95rem;color:var(--slate-600)}

.acct-body{padding:44px 0 72px}

/* Content and a rail of links. One column until there is room for both. */
.acct-wrap{display:grid;gap:40px;grid-template-columns:1fr}
@media(min-width:1024px){.acct-wrap{grid-template-columns:1fr 348px;align-items:start;gap:48px}}
.acct-main{display:grid;gap:20px;align-content:start;min-width:0}
.acct-rail{display:grid;gap:20px;align-content:start}

.acct-card{background:var(--white);border:1px solid var(--slate-200);border-radius:var(--r-panel);box-shadow:var(--sh-rest);padding:24px}
.acct-card--tight{padding:20px}
.acct-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:18px}
.acct-card-head h2{font-size:1.05rem;color:var(--navy-900)}
.acct-h2-icon{display:flex;align-items:center;gap:8px}
.acct-h2-icon svg{width:16px;height:16px;color:var(--brand-600);flex:none}
.acct-count{font-size:10px;color:var(--slate-600)}

/* The details are read-only here — the two links under them lead to the screens
   that can actually write. Say that with the field, not only in the note. */
.acct-card .fld input[readonly]{background:var(--paper-50);color:var(--navy-800);cursor:default}
.acct-card .fld input[readonly]:focus{border-color:var(--slate-400);box-shadow:none}

/* A table is the one thing on this page that can be wider than its column, so
   it scrolls inside itself rather than pushing the page sideways. */
.acct-scroll{overflow-x:auto}
.acct-table{width:100%;border-collapse:collapse;min-width:560px;font-size:.88rem}
.acct-table caption{text-align:left;font-size:10px;color:var(--slate-500);margin-bottom:10px;letter-spacing:.08em}
.acct-table thead tr{text-align:left;border-bottom:1px solid var(--slate-300)}
.acct-table th{padding:0 12px 10px 0;font-size:10px;color:var(--slate-600);font-weight:500;letter-spacing:.08em;text-align:left}
.acct-table th:last-child,.acct-table td:last-child{padding-right:0}
.acct-table tbody{color:var(--slate-600)}
.acct-table tbody tr{border-bottom:1px solid var(--slate-200)}
.acct-table tbody tr:last-child{border-bottom:0}
.acct-table td{padding:14px 12px 14px 0;vertical-align:top}
.acct-nowrap{white-space:nowrap}
.acct-strong{color:var(--navy-900)}
.acct-ref{font-size:9.5px;color:var(--slate-500)}
.acct-table .arrowlink{font-size:.82rem}
.acct-none{font-size:.82rem;color:var(--slate-500)}

.acct-empty{border:1px dashed var(--slate-300);border-radius:var(--r-card);padding:24px;text-align:center}
.acct-empty-lead{font-family:'Inter Tight',sans-serif;font-weight:600;font-size:1rem;color:var(--navy-900);margin-bottom:6px}
.acct-empty p{font-size:.88rem;color:var(--slate-600)}
.acct-empty .btn{margin-top:16px}

.acct-rail-h{font-size:.95rem;color:var(--navy-900);margin-bottom:12px}
.acct-links{display:grid;gap:2px}
.acct-link{font-size:.9rem;justify-content:flex-start;padding:8px 0}
.acct-note{border:1px solid var(--brand-200);background:var(--brand-50);border-radius:var(--r-panel);padding:20px}
.acct-note p{font-size:.85rem;color:var(--slate-600)}
.acct-note .arrowlink{font-size:.85rem}

.acct-back{margin-top:40px;font-size:.85rem}
.acct-back .arrowlink{font-size:.85rem}

/* --------------------------------------------------------------------------
   ORDERS  (/my-account/orders/ and one order)
   Cards rather than a table: what was bought is a course with a thumbnail and
   a way in, and the question a learner opens this page with — "where is the
   thing I paid for" — is answered by a link on the line, not by a cell.
   -------------------------------------------------------------------------- */

.ord-list{display:grid;gap:16px}

.ord-card{background:var(--white);border:1px solid var(--slate-200);border-radius:var(--r-panel);box-shadow:var(--sh-rest);overflow:hidden}
.ord-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;padding:16px 24px;background:var(--paper-50);border-bottom:1px solid var(--slate-200)}
.ord-id{display:flex;align-items:baseline;gap:12px;flex-wrap:wrap;min-width:0}
.ord-num{font-family:'Inter Tight',sans-serif;font-weight:600;font-size:1rem;color:var(--navy-900)}
.ord-num:hover{color:var(--brand-600)}
.ord-date{font-size:.82rem;color:var(--slate-500)}

/* One line per purchased item. The thumbnail is the fastest way to recognise a
   course you bought months ago; it is decorative, so it carries an empty alt
   and the name beside it does the naming. */
.ord-lines{display:grid;margin:0;padding:0;list-style:none}
.ord-line{display:grid;grid-template-columns:96px 1fr auto;gap:16px;align-items:center;padding:16px 24px;border-bottom:1px solid var(--slate-200)}
/* The card carries no per-line price. On a discounted order the line subtotal
   and the amount actually charged differ, and the card has no discount row to
   reconcile them — a $785 line above a $0.00 total reads as a bug. The detail
   screen shows both, with the discount between them. */
.ord-lines--card .ord-line{grid-template-columns:96px 1fr}
.ord-line:last-child{border-bottom:0}
.ord-lines--detail .ord-line:last-child{border-bottom:1px solid var(--slate-200)}
.ord-lines--detail{margin:0 -24px}

.ord-thumb{width:96px;height:50px;object-fit:cover;border-radius:8px;border:1px solid var(--slate-200);background:var(--paper-50);display:block}
.ord-thumb--none{background:var(--wash)}

.ord-line-body{min-width:0}
.ord-line-name{font-family:'Inter Tight',sans-serif;font-weight:600;font-size:.94rem;color:var(--navy-900);line-height:1.35}
.ord-line-name a{color:inherit}
.ord-line-name a:hover{color:var(--brand-600)}
.ord-qty{font-family:'IBM Plex Mono',monospace;font-size:.8rem;color:var(--slate-500);margin-left:6px}
.ord-enter{font-size:.82rem;margin-top:6px}
.ord-refunded{font-size:.8rem;color:var(--slate-500);margin-top:4px}
.ord-line-total{font-family:'IBM Plex Mono',monospace;font-size:.88rem;color:var(--navy-900);white-space:nowrap}

.ord-card-foot{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;padding:16px 24px;border-top:1px solid var(--slate-200);background:var(--white)}
.ord-total{display:flex;align-items:baseline;gap:10px}
.ord-total-label{font-family:'IBM Plex Mono',monospace;font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:var(--slate-500)}
.ord-total-value{font-family:'Inter Tight',sans-serif;font-weight:600;font-size:1.05rem;color:var(--navy-900)}
.ord-acts{display:flex;gap:8px;flex-wrap:wrap}
.ord-acts--detail{margin-top:20px}

.ord-pager{display:flex;align-items:center;justify-content:center;gap:16px;margin-top:24px}
.ord-pager-at{font-size:10px;color:var(--slate-500);letter-spacing:.08em}

/* The totals under the item list. A grid of label/value pairs rather than a
   table, because there are no columns here — only pairs. */
.ord-totals{display:grid;gap:8px;margin-top:20px;padding-top:20px;border-top:1px solid var(--slate-200)}
.ord-total-row{display:flex;align-items:baseline;justify-content:space-between;gap:16px;font-size:.88rem;color:var(--slate-600)}
.ord-total-row dt{font-weight:400}
.ord-total-row dd{font-family:'IBM Plex Mono',monospace;color:var(--navy-800);text-align:right}
.ord-total-row.is-grand{margin-top:6px;padding-top:12px;border-top:1px solid var(--slate-200)}
.ord-total-row.is-grand dt{font-family:'Inter Tight',sans-serif;font-weight:600;color:var(--navy-900);font-size:1rem}
.ord-total-row.is-grand dd{font-family:'Inter Tight',sans-serif;font-weight:600;color:var(--navy-900);font-size:1.05rem}

/* Order notes: the shop talking to the buyer. Dated, quiet, in order. */
.ord-notes{display:grid;gap:16px;margin:0;padding:0;list-style:none}
.ord-note{border-left:2px solid var(--accent-500);padding-left:14px}
.ord-note-when{font-size:10px;color:var(--slate-500);letter-spacing:.08em;margin-bottom:4px}
.ord-note-body{font-size:.88rem;color:var(--slate-600)}
.ord-note-body p+p{margin-top:8px}

/* The rail's summary of one order. */
.ord-meta{display:grid;gap:10px}
.ord-meta > div{display:flex;align-items:baseline;justify-content:space-between;gap:12px;font-size:.85rem}
.ord-meta dt{color:var(--slate-500);flex:none}
.ord-meta dd{color:var(--navy-900);text-align:right;min-width:0}
.ord-meta-wrap{overflow-wrap:anywhere}
.ord-meta > div.is-grand{margin-top:4px;padding-top:12px;border-top:1px solid var(--slate-200)}
.ord-meta > div.is-grand dd{font-family:'Inter Tight',sans-serif;font-weight:600;font-size:1.05rem}
.ord-receipt{margin-top:16px;font-size:.85rem}

/* The current screen, named in the rail rather than linked to itself. */
.acct-link--here{display:flex;align-items:center;gap:8px;font-size:.9rem;padding:8px 0;font-weight:600;color:var(--navy-900)}
.acct-link--here::before{content:"";width:3px;height:14px;border-radius:2px;background:var(--accent-500);flex:none}

/* WooCommerce's "Order again" button hangs off a hook this page still fires,
   so it arrives with plugin classes and no styling of its own. */
.woocommerce-order-details .order-again,p.order-again{margin-top:16px}
.order-again .button{display:inline-flex;align-items:center;gap:8px;font-weight:600;font-size:.84rem;border-radius:var(--r-btn);padding:10px 14px;border:1.5px solid var(--slate-300);background:transparent;color:var(--navy-800);line-height:1}
.order-again .button:hover{border-color:var(--navy-800)}

@media(max-width:640px){
  .ord-line{grid-template-columns:64px 1fr;row-gap:8px;padding:14px 16px}
  .ord-lines--card .ord-line{grid-template-columns:64px 1fr}
  .ord-thumb{width:64px;height:36px}
  .ord-line-total{grid-column:2;text-align:left}
  .ord-card-head,.ord-card-foot{padding:14px 16px}
  .ord-lines--detail{margin:0 -24px}
}
