/* ============================================================
   LBS Enrollment — My Account area styles.
   Port of references/.../lib/fluxo.css (.acc-* + .flow-account).
   Roster-builder classes (.ce-seg, .flow-collabform, .flow-drop,
   .flow-xls, .flow-list, .flow-status, .flow-avatar, .flow-pick__*)
   are in lbs-flow.css — both are enqueued on account pages.
   Design tokens inherited from hello-elementor-lbs lbs-components.css.
   Radius: 0 everywhere except pill/circle shapes.
   ============================================================ */

/* ---- break the account area out of Hello Elementor's .site-main gutter ----
   Hello Elementor centres .site-main with max-width:1140px + auto margins.
   The WC My Account content is rendered inside .site-main > .woocommerce,
   which confines the acc-bar and layout. We negate the auto margins and
   extend to viewport width so the full-bleed treatment matches the design. */
/* Scoped to .logged-in: the guest login screen renders WC's plain form
   without our replacement layout — it must keep the normal page gutter. */
.woocommerce-account.logged-in .site-main {
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
}
.woocommerce-account.logged-in .woocommerce {
  max-width: 100%;
  width: 100%;
}
/* Hello Elementor's page title above the account shell — the design's
   acc-bar + acc-head own the page identity. */
.woocommerce-account.logged-in .page-header { display: none; }

/* ---- missing tokens on account pages (lbs-cart-checkout not loaded).
        Radii follow the design's ROUNDED LAYER (styles.css §"Apple-style
        soft corners"): capsule buttons, 14/20/28 surfaces. */
.flow-account, .woocommerce-account {
  --radius-input:   14px;
  --radius-card:    20px;
  --radius-surface: 28px;
  --radius-btn:     9999px;
  --radius-pill:    9999px;
  --shadow-sm:      0 1px 2px rgba(30, 47, 96, 0.06);
  --color-warning:  #B07B12;
  --color-danger:   #B53A2A;
}

/* Woo core gives .woocommerce-MyAccount-navigation float:left + width:30% —
   inside our 264px grid column that shrinks the sidebar to ~79px. */
.woocommerce-account .acc-side.woocommerce-MyAccount-navigation { float: none; width: auto; }
.woocommerce-account .acc-main.woocommerce-MyAccount-content { float: none; width: auto; }

/* Rounded layer on account surfaces */
.flow-account .lbs-btn { border-radius: var(--radius-btn); }
.flow-account .ct-field input,
.flow-account .ct-field select,
.flow-account .ct-field textarea { border-radius: var(--radius-input); }

/* ============================================================
   ACCOUNT SHELL
   ============================================================ */
.flow-account { background: var(--lbs-bone); }

/* ============================================================
   CONTEXT BAR (company / user strip)
   ============================================================ */
/* Template outputs direct children of .acc-bar (no __inner wrapper) */
.acc-bar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 18px 48px;
  background: #fff; border-bottom: 1px solid var(--color-border);
}
.acc-bar__who { display: flex; align-items: center; gap: 14px; }
.acc-bar__logo {
  width: 44px; height: 44px; border-radius: var(--radius-input);
  background: var(--lbs-navy); color: #fff; font-size: 20px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0;
}
/* .acc-bar__body: flex col wrapping name + sub (my-account.php uses this) */
.acc-bar__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.acc-bar__name { font-size: 16px; font-weight: 800; color: var(--lbs-ink); letter-spacing: -0.01em; }
.acc-bar__body strong { font-size: 16px; font-weight: 800; color: var(--lbs-ink); letter-spacing: -0.01em; }
.acc-bar__sub { font-size: 12.5px; color: var(--lbs-ink-400); }
.acc-bar__body span { font-size: 12.5px; color: var(--lbs-ink-400); }
.acc-bar__user { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--lbs-ink-600); margin-left: auto; }

/* ============================================================
   TWO-COLUMN LAYOUT: sidebar + content
   ============================================================ */
/* Design .acc-grid: 48px-padded bone band, transparent sidebar column */
.acc-layout {
  max-width: none; margin: 0;
  padding: 32px 48px 72px; gap: 40px;
  display: grid; grid-template-columns: 264px 1fr; align-items: start;
  background: var(--lbs-bone);
}

/* ============================================================
   SIDEBAR NAV
   ============================================================ */
.acc-side {
  position: sticky; top: 24px;
  background: transparent; border-right: none;
  padding: 0; min-height: 0;
  display: flex; flex-direction: column; gap: 20px;
}
.acc-side__label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--lbs-slate-500); padding: 0 6px;
}
.acc-nav { display: flex; flex-direction: column; gap: 4px; }
/* WC outputs .woocommerce-MyAccount-navigation-link > a */
.acc-side ul,
.acc-nav { list-style: none; margin: 0; padding: 0; }
.acc-side ul li a,
.acc-nav__item {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px;
  border-radius: var(--radius-input); font-size: 14px; font-weight: 700;
  color: var(--lbs-ink-600); cursor: pointer; text-decoration: none;
  transition: all 150ms var(--ease-out);
  background: transparent; border: none; width: 100%; font-family: var(--font-sans);
}
.acc-side ul li a:hover,
.acc-nav__item:hover { background: #fff; color: var(--lbs-navy); }
/* Active: dark navy background, white text */
.acc-side ul li.is-active > a,
.acc-side ul li.woocommerce-MyAccount-navigation-link--active > a,
.acc-nav__item[data-active="true"] {
  background: var(--lbs-navy); color: #fff;
  font-weight: 700;
}
.acc-side ul li a svg,
.acc-nav__item svg { flex-shrink: 0; color: currentColor; opacity: 0.7; }
/* Count badge on colaboradores */
.acc-side__count,
.acc-nav__count {
  margin-left: auto; font-size: 11px; font-weight: 800;
  background: rgba(255,255,255,0.2); padding: 2px 9px; border-radius: 9999px;
}
/* non-active fallback: navy bg on bone */
.acc-side ul li a .acc-side__count { background: rgba(0,162,195,0.14); color: var(--lbs-cyan-700, #0084A0); }
.acc-side ul li.is-active > a .acc-side__count,
.acc-side ul li.woocommerce-MyAccount-navigation-link--active > a .acc-side__count { background: rgba(255,255,255,0.2); color: #fff; }
/* Help box */
.acc-side__help,
.acc-help {
  background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-card);
  padding: 18px; margin: 0;
}
.acc-help__t,
.acc-side__help > strong {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 800; color: var(--lbs-navy); margin-bottom: 8px;
}
.acc-help p,
.acc-side__help p { font-size: 12.5px; line-height: 1.5; color: var(--lbs-ink-600); margin: 0 0 10px; }
.acc-side__help a { color: var(--accent-hover); text-decoration: none; font-size: 13px; }
.acc-side__help a:hover { text-decoration: underline; }

/* ============================================================
   MAIN CONTENT
   ============================================================ */
.acc-main {
  min-width: 0;
  padding: 0;
  background: transparent;
}

/* ============================================================
   PAGE HEAD (title + action buttons)
   ============================================================ */
.acc-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 20px;
  margin-bottom: 24px; flex-wrap: wrap;
}
/* design: the title is an <h1>, globally uppercase in colors_and_type.css */
.acc-head__title { font-size: clamp(24px, 2.6vw, 32px); font-weight: 700; letter-spacing: -0.015em; text-transform: uppercase; color: var(--lbs-ink); margin: 0 0 8px; }
.acc-head__sub { font-size: 14.5px; line-height: 1.5; color: var(--lbs-ink-600); margin: 0; max-width: 56ch; }
.acc-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* Legacy: .acc-title / .acc-subtitle / .acc-sub used in older templates */
.acc-title { font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; letter-spacing: -0.015em; color: var(--lbs-ink); margin: 0 0 20px; }
.acc-subtitle { font-size: 15px; font-weight: 700; color: var(--lbs-navy); margin: 24px 0 12px; }
.acc-sub { font-size: 14px; line-height: 1.55; color: var(--lbs-ink-600); margin: 0 0 18px; }

/* ============================================================
   STAT TILES
   ============================================================ */
.acc-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 24px; }
.acc-stat {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-card); padding: 18px 20px;
}
/* All stat tiles use the design's two-span markup (.acc-stat__n / .acc-stat__l).
   NOTE: do not add a blanket `.acc-stat span` rule — its (0,1,1) specificity
   beats `.acc-stat__n` (0,1,0) and silently shrinks the big number to the
   label size (the bug that made colaboradores look broken). */
.acc-stat__n {
  font-size: 28px; font-weight: 900; letter-spacing: -0.02em; color: var(--lbs-navy);
  display: block; line-height: 1; margin-bottom: 6px;
}
.acc-stat__l {
  display: block;
  font-size: 11.5px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--lbs-ink-400);
}

/* ============================================================
   PANEL (white card wrapping content sections)
   ============================================================ */
.acc-panel {
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-surface); padding: 24px 26px; margin-bottom: 24px;
}
.acc-panel[hidden] { display: none; }
.acc-panel__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.acc-panel__head h3 { font-size: 18px; font-weight: 700; color: var(--lbs-ink); margin: 0; }
.acc-panel__lead { font-size: 13.5px; line-height: 1.55; color: var(--lbs-ink-600); margin: 0 0 18px; }

/* ============================================================
   ORDER ROW (dashboard + inscricoes tab)
   ============================================================ */
.acc-row {
  display: flex; align-items: center; gap: 16px; padding: 14px 20px;
  background: #fff; border: 1px solid var(--color-border);
  margin-bottom: 6px; text-decoration: none; color: inherit;
  transition: border-color 150ms var(--ease-out);
  border-radius: var(--radius-card);
}
.acc-row:hover { border-color: var(--lbs-navy); }
.acc-row strong { font-size: 14px; font-weight: 700; color: var(--lbs-navy); min-width: 100px; }
.acc-row span { font-size: 13px; color: var(--lbs-ink-400); }
.acc-row__who { display: flex; align-items: center; gap: 13px; min-width: 0; }
.acc-row__dept { font-size: 13.5px; color: var(--lbs-ink-600); }
.acc-row__tools { display: flex; justify-content: flex-end; }

/* ============================================================
   ORDER DETAIL (Inscrições tab: order + participants)
   ============================================================ */
.acc-order { margin-bottom: 16px; }
.acc-order__item {
  padding: 8px 20px; background: #fff;
  border-left: 1px solid var(--color-border); border-right: 1px solid var(--color-border);
  font-size: 13.5px; color: var(--lbs-ink-600);
}
.acc-order__participants {
  display: flex; flex-wrap: wrap; gap: 8px;
  padding: 10px 20px 14px;
  background: #fff;
  border: 1px solid var(--color-border); border-top: none;
}

/* Participant chip */
.acc-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 4px 10px;
  background: var(--lbs-bone); border: 1px solid var(--lbs-mist);
  border-radius: 9999px; color: var(--lbs-ink-600);
}

/* ============================================================
   COLLABORATORS TABLE (.acc-table)
   ============================================================ */
.acc-table {
  width: 100%; border-collapse: collapse;
  background: #fff; border: 1px solid var(--color-border);
  border-radius: var(--radius-surface); overflow: hidden;
  font-size: 13.5px;
}
.acc-table thead tr { background: var(--lbs-bone); border-bottom: 1px solid var(--color-border); }
.acc-table th {
  text-align: left; padding: 12px 20px;
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--lbs-slate-500);
}
.acc-table__row { border-bottom: 1px solid var(--lbs-mist); transition: background 140ms; }
.acc-table__row:last-child { border-bottom: none; }
.acc-table__row[data-expand] { cursor: pointer; }
.acc-table td { padding: 12px 20px; color: var(--lbs-ink-600); vertical-align: middle; }
.acc-table td strong { color: var(--lbs-ink); font-weight: 700; }

/* Expand/collapse row chevron behavior */
.acc-table__row .acc-row__histbtn {
  display: inline-flex; align-items: center; gap: 6px; background: transparent; border: none;
  font-family: var(--font-sans); font-size: 13px; font-weight: 700; color: var(--accent-hover);
  cursor: pointer; padding: 0;
}
.acc-table__row .acc-row__histbtn:disabled { color: var(--lbs-slate-300); cursor: default; }
.acc-table__row .acc-row__histbtn svg { transition: transform 200ms var(--ease-out); }
.acc-table__row .acc-row__histbtn[data-open="true"] svg,
.acc-table__row[aria-expanded="true"] .acc-row__histbtn svg { transform: rotate(180deg); }

/* History rows (expanded) — kept as table-row so the bone band spans
   the full table width (display:block on a <tr> collapses to content). */
.acc-hist { display: none; /* shown by JS via data-expand toggle */ }
.acc-hist--open { display: table-row; }
.acc-hist--open > td {
  background: var(--lbs-bone);
  padding: 4px 22px 16px 75px; border-bottom: 1px solid var(--lbs-mist);
}
.acc-hist__label {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--lbs-slate-500); padding: 14px 0 10px;
}
.acc-hist__row {
  display: flex; align-items: center; gap: 14px; padding: 10px 0;
  border-top: 1px solid var(--lbs-mist);
}
.acc-hist__row:first-of-type { border-top: none; }
.acc-hist__ico { color: var(--lbs-navy); flex: none; }
.acc-hist__course { font-size: 14px; font-weight: 600; color: var(--lbs-ink); flex: 1; }
.acc-hist__date { font-size: 12.5px; color: var(--lbs-ink-400); }
/* support for acc-hist as <tr> with <td colspan> */
.acc-hist td { padding: 0; }

/* ============================================================
   FORM (faturacao tab — custom ct-field markup)
   ============================================================ */
.acc-form { max-width: 680px; }
.acc-form .ct-field { margin-bottom: 14px; }
.acc-form .ct-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.acc-form .cand-row--3 { grid-template-columns: 1fr 1fr 1fr; }

/* ============================================================
   NATIVE WOOCOMMERCE FORMS (Definições / edit-account, edit-address)
   "Native Woo as base": we keep Woo's markup and map it to the design's
   ct-field language instead of overriding the templates.
   ============================================================ */
.woocommerce-MyAccount-content form.woocommerce-EditAccountForm,
.woocommerce-MyAccount-content form.edit-account,
.woocommerce-MyAccount-content .woocommerce-address-fields { max-width: 680px; }

/* Field row: label stacked above control (design .ct-field) */
.woocommerce-MyAccount-content .form-row,
.woocommerce-MyAccount-content .woocommerce-form-row {
  display: flex; flex-direction: column; gap: 7px;
  margin: 0 0 16px; padding: 0; float: none; width: 100%;
}
/* Two-up rows (first/last) sit side by side (Woo floats them; we keep the
   float and just set the design width + gutter). */
.woocommerce-MyAccount-content .form-row-first,
.woocommerce-MyAccount-content .form-row-last { width: calc(50% - 8px); }
.woocommerce-MyAccount-content .form-row-first { margin-right: 16px; }
/* Contain the address form's floated fields so the submit <p> (a sibling
   after the wrapper) drops below them instead of rising beside the last
   field (our plugin's NIF is a lone form-row-first). */
.woocommerce-MyAccount-content .woocommerce-address-fields__field-wrapper { display: flow-root; }

.woocommerce-MyAccount-content .form-row label,
.woocommerce-MyAccount-content .woocommerce-form-row label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--lbs-ink-600); margin: 0;
}
.woocommerce-MyAccount-content .form-row label .required { color: var(--lbs-cyan, #00A2C3); border: none; text-decoration: none; }

.woocommerce-MyAccount-content input.input-text,
.woocommerce-MyAccount-content input.woocommerce-Input,
.woocommerce-MyAccount-content .form-row input[type="text"],
.woocommerce-MyAccount-content .form-row input[type="email"],
.woocommerce-MyAccount-content .form-row input[type="tel"],
.woocommerce-MyAccount-content .form-row input[type="password"],
.woocommerce-MyAccount-content .form-row select,
.woocommerce-MyAccount-content .select2-selection {
  font-family: var(--font-sans); font-size: 14px; color: var(--lbs-ink);
  background: #fff; border: 1px solid var(--color-border-strong, #BFC8DD);
  border-radius: var(--radius-input); padding: 12px 14px; width: 100%;
  outline: none; transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out);
}
.woocommerce-MyAccount-content input.input-text:focus,
.woocommerce-MyAccount-content .form-row input:focus,
.woocommerce-MyAccount-content .form-row select:focus {
  border-color: var(--lbs-navy); box-shadow: 0 0 0 3px rgba(0,162,195,0.16);
}
/* field description (e.g. display-name hint) */
.woocommerce-MyAccount-content .form-row span em,
.woocommerce-MyAccount-content fieldset + p em,
.woocommerce-MyAccount-content small { font-size: 12.5px; color: var(--lbs-ink-400); font-style: normal; }

/* Password-change fieldset → design surface card */
.woocommerce-MyAccount-content fieldset {
  border: 1px solid var(--color-border); border-radius: var(--radius-card);
  padding: 20px 22px; margin: 8px 0 22px;
}
.woocommerce-MyAccount-content fieldset legend {
  font-size: 13px; font-weight: 800; letter-spacing: 0.02em; color: var(--lbs-navy);
  padding: 0; margin-bottom: 14px;
}

/* Submit button → design primary button */
.woocommerce-MyAccount-content form button.woocommerce-Button,
.woocommerce-MyAccount-content form button[type="submit"] {
  font-family: var(--font-sans); font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; font-size: 13px; cursor: pointer;
  background: var(--lbs-navy); color: #fff; border: 1px solid var(--lbs-navy);
  border-radius: var(--radius-btn); padding: 14px 28px;
  transition: background 180ms var(--ease-out);
}
.woocommerce-MyAccount-content form button.woocommerce-Button:hover,
.woocommerce-MyAccount-content form button[type="submit"]:hover { background: var(--lbs-navy-700, #16224a); }

/* ============================================================
   STATUS PILLS (reuses same .acc-pill / .flow-status)
   ============================================================ */
.acc-pill {
  display: inline-flex; align-items: center;
  font-size: 11px; font-weight: 700; padding: 4px 10px;
  border-radius: 9999px; text-transform: uppercase; letter-spacing: 0.04em;
  white-space: nowrap;
}
.acc-pill--processing,
.acc-pill--on-hold  { background: rgba(176,123,18,0.12); color: var(--color-warning); }
.acc-pill--completed { background: rgba(47,143,92,0.10); color: var(--color-success); }
.acc-pill--pending  { background: var(--lbs-bone); color: var(--lbs-slate-500); }
.acc-pill--cancelled,
.acc-pill--failed,
.acc-pill--refunded { background: rgba(181,58,42,0.10); color: var(--color-danger); }
/* Enrollment status chips */
.acc-pill--inscrito { background: rgba(47,143,92,0.10); color: var(--color-success); }
.acc-pill--em-curso { background: rgba(0,162,195,0.10); color: var(--lbs-cyan-700, #0084A0); }
.acc-pill--concluido { background: var(--lbs-bone); color: var(--lbs-slate-500); }

/* ============================================================
   MUTED TEXT  (.acc-muted used in collab table)
   ============================================================ */
.acc-muted { font-size: 12px; color: var(--lbs-ink-400); }

/* ============================================================
   PAGINATION (Inscrições pager)
   ============================================================ */
.acc-pagination { display: flex; gap: 12px; margin-top: 20px; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .acc-bar { padding-left: 24px; padding-right: 24px; }
  .acc-layout { grid-template-columns: 1fr; }
  .acc-side { position: static; border-right: none; border-bottom: 1px solid var(--color-border); min-height: auto; }
  .acc-stats { grid-template-columns: repeat(2, 1fr); }
  .acc-main { padding: 24px 20px 48px; }
}
@media (max-width: 760px) {
  .acc-table thead { display: none; }
  .acc-table__row { display: flex; flex-wrap: wrap; gap: 8px; }
  .acc-table td { padding: 8px 16px; }
  .acc-hist { padding-left: 20px; }
}
