/* PASS-357: account shell rendered into the My Account dashboard by cp2/account-shell.js.
   Palette is the customer-portal purple used by every other portal control; type is the
   site's Inter (loaded by the theme). Scoped under .pta-shell so nothing leaks into Elementor. */
/* Seamless swap: this stylesheet is enqueued in <head>, so the raw Elementor + WooCommerce
   section is hidden before first paint and revealed only once the shell has replaced it. If
   the module never runs, the section is revealed after 4 s so nothing stays hidden. */
body.woocommerce-account .elementor-top-section:has(.woocommerce-MyAccount-content):not(:has(.pta-shell-host)),
body.woocommerce-account .elementor-top-section:has(form.woocommerce-form-login):not(:has(.pta-shell-host)) {
  visibility: hidden;
  min-height: 480px;
  animation: pta-reveal 0s 4s forwards;
}
@keyframes pta-reveal { to { visibility: visible; } }
.pta-shell-host { display: block !important; visibility: visible; }
.pta-shell[data-pending="true"] .pta-card__v { color: var(--pta-muted); font-weight: 600; }
.pta-shell {
  --pta-bg: #ffffff; --pta-panel: #f3f0fb; --pta-panel-2: #e9e3f8; --pta-line: #d9d0f3;
  --pta-ink: #2b2740; --pta-muted: #625d6c; --pta-purple: #6d35d4; --pta-purple-dark: #5223ad;
  --pta-purple-ink: #3d1b86; --pta-good: #1f7a4d; --pta-good-bg: #e3f3ea; --pta-warn: #9a5b00; --pta-warn-bg: #fff1dc;
  width: 100%; border: 1px solid var(--pta-line); border-radius: 14px; overflow: hidden;
  background: var(--pta-bg); color: var(--pta-ink); font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px; line-height: 1.5; text-align: left;
}
.pta-shell a { color: var(--pta-purple-dark); }
.pta-shell h2, .pta-shell h3 { margin: 0; color: var(--pta-ink); }
.pta-shell__band { display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 24px 28px; border-bottom: 1px solid var(--pta-line); }
.pta-who { display: flex; align-items: center; gap: 16px; min-width: 0; }
.pta-avatar { width: 52px; height: 52px; border-radius: 50%; background: var(--pta-panel-2); display: grid; place-items: center; font-weight: 700; color: var(--pta-purple-ink); flex: none; }
.pta-who h2 { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pta-sub { color: var(--pta-muted); font-size: 14px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.pta-pill { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; line-height: 1.4; }
.pta-pill--good { background: var(--pta-good-bg); color: var(--pta-good); }
.pta-pill--warn { background: var(--pta-warn-bg); color: var(--pta-warn); }
.pta-actions { display: flex; align-items: center; gap: 14px; }
.pta-shell .pta-btn { text-transform: uppercase; letter-spacing: 0.08em; font-size: 13px; font-weight: 700; padding: 12px 22px; border-radius: 999px; border: 0; background: var(--pta-purple); color: #fff !important; text-decoration: none; }
.pta-shell .pta-btn:hover { background: var(--pta-purple-dark); }
.pta-shell .pta-btn:focus-visible, .pta-nav a:focus-visible, .pta-shell__foot a:focus-visible { outline: 3px solid var(--pta-purple-dark); outline-offset: 2px; }
.pta-shell .pta-link-quiet { color: var(--pta-muted); font-size: 14px; text-decoration: none; }
.pta-shell .pta-link-quiet:hover { color: var(--pta-purple-dark); }
.pta-shell__body { display: grid; grid-template-columns: 232px 1fr; min-height: 420px; }
/* Grid items default to min-width:auto; without this the one-column layout under 860px grows to
   the nav strip's full width and the cards are clipped by the shell (PASS-375, 2026-09-08). */
.pta-shell__body > *, .pta-shell__band > *, .pta-main > * { min-width: 0; }
.pta-rail { background: var(--pta-panel); border-right: 1px solid var(--pta-line); padding: 20px 14px; }
.pta-rail__title { text-transform: uppercase; letter-spacing: 0.12em; font-size: 11px; font-weight: 600; color: var(--pta-muted); padding: 0 12px 10px; }
.pta-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.pta-nav li { margin: 0; padding: 0; }
.pta-shell .pta-nav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; color: var(--pta-ink); text-decoration: none; font-weight: 500; }
.pta-shell .pta-nav a:hover { background: var(--pta-panel-2); }
.pta-shell .pta-nav a[aria-current="page"] { background: var(--pta-purple); color: #fff; font-weight: 600; }
.pta-nav svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pta-count { margin-left: auto; font-size: 12px; font-variant-numeric: tabular-nums; opacity: 0.8; }
.pta-main { padding: 24px 28px 28px; display: grid; gap: 22px; align-content: start; }
.pta-main h3 { font-size: 17px; font-weight: 700; }
.pta-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.pta-card { border: 1px solid var(--pta-line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 6px; align-content: start; background: var(--pta-bg); }
.pta-card__k { text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; font-weight: 600; color: var(--pta-muted); }
.pta-card__v { font-size: 22px; font-weight: 800; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.pta-card__d { color: var(--pta-muted); font-size: 13px; }
.pta-shell .pta-card a { font-size: 13px; font-weight: 600; text-decoration: none; }
.pta-table { border: 1px solid var(--pta-line); border-radius: 12px; overflow: hidden; margin-top: 10px; }
.pta-table__head, .pta-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 0.9fr; padding: 12px 16px; align-items: center; font-variant-numeric: tabular-nums; }
.pta-table__head { padding: 10px 16px; background: var(--pta-panel); text-transform: uppercase; letter-spacing: 0.1em; font-size: 11px; font-weight: 600; color: var(--pta-muted); }
.pta-row { border-top: 1px solid var(--pta-line); }
.pta-row--empty { grid-template-columns: 1fr; color: var(--pta-muted); }
.pta-muted { color: var(--pta-muted); font-size: 13px; }
.pta-woo { min-width: 0; overflow-x: auto; }
.pta-woo .woocommerce-MyAccount-navigation { display: none; }
.pta-woo table { width: 100%; }
/* PASS-376: the real WooCommerce login block inside the shell's main slot. */
.pta-login { max-width: 480px; }
.pta-shell--signed-out .pta-shell__body { grid-template-columns: 1fr; min-height: 0; }
.pta-shell--signed-out .pta-shell__band { padding: 16px 20px; }
.pta-shell--signed-out .pta-main { padding-top: 16px; }
.pta-shell__foot-links { display: flex; gap: 14px; }
/* WooCommerce prints its own "Login" heading above the form; the band already names the page. */
.pta-login h2 { display: none; }
/* OceanWP prints a display-size "Login OR Register" tab strip above the form (50px links, 35px
   margin, at theme specificity); registration must stay reachable, so the tabs stay and shrink to
   one compact line. !important because the theme rules outrank anything scoped here (PASS-380). */
.pta-shell .pta-login .owp-account-links { display: flex !important; align-items: baseline; gap: 10px; margin: 0 0 12px !important; padding: 0 !important; list-style: none; }
.pta-shell .pta-login .owp-account-links li { display: inline-block !important; margin: 0 !important; padding: 0 !important; font-size: 15px !important; line-height: 1.3 !important; }
.pta-shell .pta-login .owp-account-links li.or { font-size: 11px !important; text-transform: uppercase; color: var(--pta-muted); }
.pta-shell .pta-login .owp-account-links a { font-size: 15px !important; font-weight: 700; line-height: 1.3 !important; padding: 0 !important; margin: 0 !important; display: inline !important; }
.pta-shell .pta-login .owp-account-links a.current { color: var(--pta-ink); }
.pta-login .woocommerce-form-login { border: 0; padding: 0; margin: 0; }
.pta-login .woocommerce-form-login .form-row { margin: 0 0 14px; }
.pta-login .woocommerce-form-login input.input-text { width: 100%; box-sizing: border-box; }
.pta-login .woocommerce-form-login .woocommerce-form-login__submit { width: 100%; margin-top: 6px; }
.pta-login .woocommerce-LostPassword { margin: 12px 0 0; }
.pta-note { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--pta-warn-bg); color: var(--pta-warn); font-size: 13px; }
.pta-error { border: 1px solid var(--pta-warn); background: var(--pta-warn-bg); border-radius: 12px; padding: 16px 18px; }
.pta-error p { margin: 6px 0 0; }
.pta-shell__foot { border-top: 1px solid var(--pta-line); background: var(--pta-panel); padding: 14px 28px; display: flex; justify-content: space-between; align-items: center; gap: 16px; font-size: 14px; color: var(--pta-muted); }
.pta-shell .pta-shell__foot a { font-weight: 600; text-decoration: none; }
@media (max-width: 860px) {
  .pta-shell__band, .pta-shell__body { grid-template-columns: 1fr; }
  .pta-shell__band { padding: 18px; gap: 12px; }
  .pta-who h2 { font-size: 19px; white-space: normal; }
  .pta-rail { border-right: 0; border-bottom: 1px solid var(--pta-line); padding: 12px 10px; }
  .pta-rail__title { padding-bottom: 8px; }
  /* One scrollable strip of items; the strip scrolls inside the rail, the rail never widens. */
  .pta-nav { grid-auto-flow: column; grid-auto-columns: max-content; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; scrollbar-width: thin; }
  .pta-shell .pta-nav a { white-space: nowrap; }
  .pta-count { display: none; }
  .pta-main { padding: 16px 14px 20px; gap: 16px; }
  .pta-cards { grid-template-columns: 1fr; }
  /* Keep week, market, and status; the creative name is the least useful column on a phone. */
  .pta-table__head, .pta-row { grid-template-columns: 1.3fr 1fr auto; padding: 10px 12px; gap: 8px; }
  .pta-table__head span:nth-child(3), .pta-row span:nth-child(3) { display: none; }
  .pta-row--empty { grid-template-columns: 1fr; }
  .pta-shell__foot { flex-wrap: wrap; padding: 12px 14px; }
}
@media (max-width: 480px) {
  .pta-table__head { display: none; }
  .pta-row { grid-template-columns: 1fr auto; grid-template-areas: "week status" "market status"; row-gap: 2px; }
  .pta-row span:nth-child(1) { grid-area: week; font-weight: 600; }
  .pta-row span:nth-child(2) { grid-area: market; color: var(--pta-muted); font-size: 13px; }
  .pta-row span:nth-child(4) { grid-area: status; }
  .pta-row--empty { grid-template-columns: 1fr; grid-template-areas: none; }
  .pta-card__v { font-size: 20px; }
}
