/* ==========================================================================================
   NXTL UI kit — shared components (owner-approved 13 Nov 2026: canvas "NXTL Account UI kit", Main artboard).
   Loaded after account-stage1-fix.css on account pages. Page files (dashboard/esims/balance/rewards/modals.css)
   build on these; nothing here changes markup or behaviour. Prefix `html body.nxtl-account` = one step above the
   legacy !important contracts. Outline buttons are kept exactly as the owner approved them (no remap here).
   ========================================================================================== */

html body.nxtl-account {
  --kit-gap: 20px;            /* peer sections and cards */
  --kit-pad: 24px;            /* card padding (16 on phones) */
  --kit-radius-card: 16px;
  --kit-radius-control: 10px;
  --kit-track: #0E1118;
  --kit-thumb: #262D3D;
  --kit-line: rgba(255, 255, 255, 0.08);
  --kit-line-strong: rgba(255, 255, 255, 0.14);
}

/* ---------- Primary action: one per card, AA-contrast red (white text ≥ 4.7:1) ---------- */
html body.nxtl-account :is(.btn--primary, .btn-primary, .nxtl-v2-btn-primary) {
  background: linear-gradient(135deg, #E11D48 0%, #D91B42 100%) !important;
  background-color: #DD1C46 !important;
  border: 0 !important;
  color: #fff !important;
}
html body.nxtl-account :is(.btn--primary, .btn-primary, .nxtl-v2-btn-primary):hover { filter: brightness(1.08); box-shadow: 0 4px 14px rgba(255, 46, 76, .22) !important; }
html body.nxtl-account :is(.btn, .segmented-control__btn, .quick-action-btn, .nxtl-tier-quick__opt):focus-visible { outline: none !important; box-shadow: 0 0 0 2px #0A0C12, 0 0 0 4px #FF2E4C !important; }
/* ---------- One button size (round 3, R3-P2-01) ----------
   Every account .btn (primary, outline, subtle, ghost; --sm and --xs included) is at least 36px tall on desktop and 44px
   on phones. min-height only, so nothing shrinks; !important answers the page files' own compact card sizes (28–34px).
   Buttons inside dense data tables (.account-table) keep their compact size. */
html body.nxtl-account .btn:not(.account-table .btn) { min-height: 36px !important; }
@media (max-width: 680px) { html body.nxtl-account .btn:not(.account-table .btn) { min-height: 44px !important; } }

/* ---------- Status chips: one per card; colour = meaning; plan/cadence are neutral ---------- */
html body.nxtl-account :is(.badge--nxtl, .badge--cadence) { background: #1B202E !important; color: #D5D9E4 !important; border-color: rgba(255, 255, 255, .12) !important; }

/* ---------- Segmented controls (On/Off, filters, network tier): the choice is always visible ---------- */
html body.nxtl-account :is(.segmented-control, .nxtl-v2-segmented, .nxtl-tier-quick__seg) {
  display: inline-flex !important; flex-direction: row !important; flex-wrap: nowrap;
  padding: 3px !important; gap: 2px !important;
  background: var(--kit-track) !important; border: 1px solid var(--kit-line-strong) !important; border-radius: var(--kit-radius-control) !important;
}
html body.nxtl-account :is(.segmented-control__btn, .nxtl-v2-segmented-btn, .nxtl-tier-quick__opt) {
  position: relative; display: inline-flex !important; align-items: center !important; justify-content: center !important;
  min-height: 30px !important; padding: 0 12px !important; margin: 0 !important;
  border: 0 !important; border-radius: 7px !important; background: transparent !important; box-shadow: none !important;
  font: 500 13px/1 var(--font-body, Inter, 'NXTL Inter Fallback', sans-serif) !important; color: #9BA3B8 !important; white-space: nowrap;
}
html body.nxtl-account :is(.segmented-control__btn, .nxtl-v2-segmented-btn, .nxtl-tier-quick__opt):hover { color: #F5F6F8 !important; }
html body.nxtl-account :is(.segmented-control__btn.is-active, .nxtl-v2-segmented-btn.is-active, .segmented-control__btn[aria-pressed="true"], .nxtl-tier-quick__opt:has(> input:checked)) {
  background: var(--kit-thumb) !important; color: #F5F6F8 !important; font-weight: 600 !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .45), inset 0 0 0 1px var(--kit-line-strong) !important;
}
html body.nxtl-account .nxtl-tier-quick__seg:not(:has(input:checked)) { border-style: dashed !important; }
html body.nxtl-account .nxtl-tier-quick__opt > input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
html body.nxtl-account .nxtl-tier-quick__opt:has(> input:focus-visible) { box-shadow: 0 0 0 2px #0A0C12, 0 0 0 4px #FF2E4C !important; }
@media (max-width: 680px) { html body.nxtl-account :is(.segmented-control__btn, .nxtl-v2-segmented-btn, .nxtl-tier-quick__opt) { min-height: 44px !important; padding: 0 14px !important; } }

/* ---------- Notes are text; callouts only for real states ---------- */
html body.nxtl-account .form-hint { font-size: 13px; line-height: 1.45; color: #9BA3B8; }
html body.nxtl-account .account-notice { border-radius: 12px !important; padding: 14px 16px !important; }
html body.nxtl-account .account-notice--warning { background: rgba(245, 166, 35, .10) !important; border: 1px solid rgba(245, 166, 35, .28) !important; }
html body.nxtl-account .account-notice--info { background: rgba(255, 255, 255, .04) !important; border: 1px solid rgba(255, 255, 255, .12) !important; }
html body.nxtl-account .account-notice--danger, html body.nxtl-account .account-notice--error { background: rgba(255, 77, 77, .10) !important; border: 1px solid rgba(255, 77, 77, .28) !important; }

/* ---------- Inputs: 40px, one radius, recessed well ---------- */
html body.nxtl-account :is(.form-input, .form-select, .nxtl-v2-input):not(textarea) { min-height: 40px; border-radius: var(--kit-radius-control) !important; background-color: var(--kit-track) !important; border: 1px solid var(--kit-line-strong) !important; font-size: 14.5px; }
html body.nxtl-account .form-label { font-size: 12.5px; font-weight: 600; color: #9BA3B8; }

/* ---------- Kit utilities used by the page files ---------- */
html body.nxtl-account .kit-ledger-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 16px; align-items: center; padding: 13px 0; border-top: 1px solid var(--kit-line); }
html body.nxtl-account .kit-ledger-row__title { font-size: 14.5px; font-weight: 600; color: #F5F6F8; }
html body.nxtl-account .kit-ledger-row__hint { font-size: 13px; line-height: 1.45; color: #9BA3B8; }
html body.nxtl-account .kit-figure { font-family: var(--font-heading, "Plus Jakarta Sans", 'NXTL Jakarta Fallback', sans-serif); font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; font-variant-numeric: tabular-nums; color: #F5F6F8; }
html body.nxtl-account .kit-status { display: inline-flex; align-items: baseline; gap: 10px; font-size: 13.5px; color: #D5D9E4; }
html body.nxtl-account .kit-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #00D68F; flex: none; transform: translateY(-2px); }
html body.nxtl-account .kit-status.is-warning::before { background: #F5A623; }
html body.nxtl-account .kit-status.is-danger::before { background: #FF4D4D; }
html body.nxtl-account .kit-meter { height: 6px; border-radius: 999px; background: #1B202E; overflow: hidden; }
html body.nxtl-account .kit-meter > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, #FF2E4C, #D91B42); }
@media (prefers-reduced-motion: reduce) { html body.nxtl-account * { scroll-behavior: auto !important; } }

/* Success results are a quiet line with a check (kit rule: notes are text). The class contract
   (.account-notice--success) is kept for scripts and tests; only its look changes. */
html body.nxtl-account .account-notice--success { background: none !important; border: 0 !important; padding: 0 !important; border-radius: 0 !important; color: #D5D9E4 !important; font-size: 13.5px; line-height: 1.45; }
html body.nxtl-account .account-notice--success::before { content: ""; display: inline-block; width: 14px; height: 14px; margin-right: 6px; vertical-align: -2px; border-radius: 50%; background: #00D68F url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230A0C12' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E") center / 10px no-repeat; }


/* ---------- light1118 / WS2 alignment (owner 18 Nov: "alignment should be good on frontend and customer backend") ----------
   Heights and alignment only; no colour changes. `:is(body, #nx-l1118-align#heights)` never matches anything new: it
   only lifts these rules over the page files' #viewBalance / #viewRewards height contracts (2 ids). Measured on every
   account view, drawer and modal at 1440 and 390, light and dark (batch-1118/ws2). A row that holds a field (input,
   select, segmented control) and a button is one height: 40px on desktop, 44px at <=680px; table controls stay compact.
   Rows of buttons only keep the single kit button size. */

/* Fields: 40px desktop (above), 44px on phones so they meet the 44px phone buttons they share rows with. */
@media (max-width: 680px) {
  html body.nxtl-account:is(body, #nx-l1118-align#heights) :is(.form-input, .form-select, .nxtl-v2-input):not(textarea):not(.account-table *) { min-height: 44px; }
}

/* A button that shares a row with a field takes the field height: "Use all" inside the Tokens field, the Rewards form
   footers, the Balance extra-speed default and the Balance history filters (36px selects and button: 40 / 44). */
html body.nxtl-account:is(body, #nx-l1118-align#heights) :is(.nxtl-input-group, .rw-input-group) > .btn,
html body.nxtl-account:is(body, #nx-l1118-align#heights) .rw-form-foot > .btn,
html body.nxtl-account:is(body, #nx-l1118-align#heights) .bal-speed__controls > .btn { min-height: 40px !important; height: auto !important; }
html body.nxtl-account:is(body, #nx-l1118-align#heights) #viewBalance .bal-history .bal-history__tools :is(.bal-history__select, .btn) { height: 40px !important; min-height: 40px !important; }
html body.nxtl-account:is(body, #nx-l1118-align#heights) :is(.nxtl-input-group, .rw-input-group) { align-items: stretch !important; }
@media (max-width: 680px) {
  html body.nxtl-account:is(body, #nx-l1118-align#heights) :is(.nxtl-input-group, .rw-input-group) > .btn,
  html body.nxtl-account:is(body, #nx-l1118-align#heights) .rw-form-foot > .btn,
  html body.nxtl-account:is(body, #nx-l1118-align#heights) .bal-speed__controls > .btn { min-height: 44px !important; }
  html body.nxtl-account:is(body, #nx-l1118-align#heights) #viewBalance .bal-history .bal-history__tools :is(.bal-history__select, .btn) { height: 44px !important; min-height: 44px !important; }
}

/* Segmented control beside a button or field: the track is the control box (3px padding + 1px border), so the options
   are 32px on desktop (track 40) and 36px on phones (track 44). A segmented control alone in a card head keeps its size. */
html body.nxtl-account:is(body, #nx-l1118-align#heights) :is(div, form, fieldset):has(> :is(.btn, .form-input, .form-select)) > :is(.segmented-control, .nxtl-v2-segmented) { box-sizing: border-box; min-height: 40px !important; }
html body.nxtl-account:is(body, #nx-l1118-align#heights) :is(div, form, fieldset):has(> :is(.btn, .form-input, .form-select)) > :is(.segmented-control, .nxtl-v2-segmented) > :is(.segmented-control__btn, .nxtl-v2-segmented-btn) { height: 32px !important; min-height: 32px !important; }
@media (max-width: 680px) {
  html body.nxtl-account:is(body, #nx-l1118-align#heights) :is(div, form, fieldset):has(> :is(.btn, .form-input, .form-select)) > :is(.segmented-control, .nxtl-v2-segmented) { min-height: 44px !important; }
  html body.nxtl-account:is(body, #nx-l1118-align#heights) :is(div, form, fieldset):has(> :is(.btn, .form-input, .form-select)) > :is(.segmented-control, .nxtl-v2-segmented) > :is(.segmented-control__btn, .nxtl-v2-segmented-btn) { height: 36px !important; min-height: 36px !important; }
}

/* Top bar: currency select, appearance switch and account menu were 35.7 / 36 / 38px (2-3px off on phones). One box:
   40px on desktop, 44px on phones, centred on the bar. */
html body.nxtl-account:is(body, #nx-l1118-align#heights) .account-topbar__right { align-items: center; }
html body.nxtl-account:is(body, #nx-l1118-align#heights) .account-topbar__right :is(.account-topbar__currency-select, .account-topbar__user-btn) { box-sizing: border-box; height: 40px; min-height: 40px; }
html body.nxtl-account:is(body, #nx-l1118-align#heights) .account-topbar__right .nx-ts .nx-ts__btn { width: 40px; height: 40px; }
@media (max-width: 680px) {
  html body.nxtl-account:is(body, #nx-l1118-align#heights) .account-topbar__right :is(.account-topbar__currency-select, .account-topbar__user-btn) { height: 44px; min-height: 44px; }
  html body.nxtl-account:is(body, #nx-l1118-align#heights) .account-topbar__right .nx-ts .nx-ts__btn { width: 44px; height: 44px; }
}

/* Rewards > Tokens "Send Tokens to a friend" (D-1118-P2P): rewards.css sizes the Redeem form fields by id
   (:is(.rw-form, #nxtl-v2-token-redeem)), so the new #nxtl-v2-token-p2p fields were 42px with loose label gaps beside
   the 40px Redeem card. Same field box and label-to-field gap as Redeem (label typography: see WS2 HANDOFF). */
html body.nxtl-account:is(body, #nx-l1118-align#heights) #viewRewards #nxtl-v2-token-p2p .form-group { display: flex; flex-direction: column; gap: 8px; margin: 0 !important; min-width: 0; }
html body.nxtl-account:is(body, #nx-l1118-align#heights) #viewRewards #nxtl-v2-token-p2p .form-label { margin: 0 !important; }
html body.nxtl-account:is(body, #nx-l1118-align#heights) #viewRewards #nxtl-v2-token-p2p :is(.form-input, .form-select):not(textarea) { box-sizing: border-box; height: 40px; min-height: 40px; }
@media (max-width: 680px) {
  html body.nxtl-account:is(body, #nx-l1118-align#heights) #viewRewards #nxtl-v2-token-p2p :is(.form-input, .form-select):not(textarea) { height: 44px; min-height: 44px; }
}

/* WooCommerce address form (Edit address): first / last name share a row at 38px (satka .input-text). Field height 40 / 44. */
html body.nxtl-account:is(body, #nx-l1118-align#heights) .woocommerce-MyAccount-content .woocommerce-address-fields :is(input.input-text, select, .select2-selection--single) { box-sizing: border-box; min-height: 40px; }
@media (max-width: 680px) {
  html body.nxtl-account:is(body, #nx-l1118-align#heights) .woocommerce-MyAccount-content .woocommerce-address-fields :is(input.input-text, select, .select2-selection--single) { min-height: 44px; }
}

/* batch-1118b sweep (owner 18 Nov), applied by the lead. Finding IDs: output/batch-1118b/sweep/FINDINGS.md */
/* themes/nxtl/assets/css/nxtl-ui-kit/kit.css  (append at end; CRLF)
   F09 (P2, dark + light) Account: the ACTIVE segmented button (Dashboard "7 days", My eSIMs "All active", drawer tabs)
   shows no focus indicator. kit.css:27 draws the ring on :focus-visible, but the .is-active rule
   (`:is(.segmented-control__btn.is-active, ...) { box-shadow: ..., inset 0 0 0 1px var(--kit-line-strong) !important }`)
   has equal specificity and comes later, so the ring is replaced. Values = kit.css:27 ring via tokens
   (dark: #0A0C12 / #FF2E4C, unchanged; light: #F4F5F8 / #E11D48).
   ---------------------------------------------------------------------------------------------------------- */
html body.nxtl-account :is(.segmented-control__btn, .nxtl-v2-segmented-btn):is(.is-active, [aria-pressed="true"]):focus-visible {
  box-shadow: 0 0 0 2px var(--nx-bg, #0A0C12), 0 0 0 4px var(--nx-focus, #FF2E4C) !important;
}
