/* it-1520 (BPDGo#568): BPDGo Connect's signed-out screens — sign in, the code, an emailed link's Continue, note emails
   (templates/partners/_auth.html's frame), as #546's D-SignIn / D-Code / D-Continue / T-SignIn / P-Welcome / P-Code /
   P-Continue boards draw them: the bpdgo mark and "Connect" large above one card on the page's ground; at phone width
   (under 37.5rem) the card is the page. Linked from templates/layouts/portal.html after the shell's and #561's. */

/* No bar and no tab bar on these screens: the mark above the card is the page's head. */
.portal:has(.cx-auth) .portal__bar,
.portal:has(.cx-auth) .portal__tabs { display: none; }
.portal:has(.cx-auth) .portal__main { padding-bottom: 0; }

.cx-auth { min-height: 100dvh; box-sizing: border-box; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 1.5rem; padding: 2.5rem 1rem 3rem; }
.cx-auth__mark { display: flex; align-items: center; gap: 0.75rem; color: inherit; text-decoration: none; }
.cx-auth__mark img { height: 2.25rem; width: auto; display: block; }
.cx-auth__mark b { font-size: 1.75rem; font-weight: 650; color: var(--md-sys-color-primary); letter-spacing: -0.015em; line-height: 1; }
.cx-auth__card { width: 100%; max-width: 26.25rem; box-sizing: border-box; padding: 2.25rem 2.25rem 2rem; background: var(--cx-card, #fff);
  border-radius: 1.5rem; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04), 0 0.5rem 1.5rem rgb(30 10 40 / 0.06); }
.cx-auth__foot { margin: 0; max-width: 28rem; text-align: center; font-size: 0.8125rem; color: var(--cx-muted, rgb(102 102 108)); }

.cx-auth__stack { display: flex; flex-direction: column; gap: 1rem; margin: 0; }
.cx-auth__stack--center { align-items: center; text-align: center; }
.cx-auth__stack--center > form, .cx-auth__stack--center > .cx-auth__btn { align-self: stretch; }
.cx-auth__h { margin: 0; font-size: 1.75rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.cx-auth__lede { margin: 0; font-size: 1rem; line-height: 1.45; color: var(--cx-fg2, rgb(86 86 93)); }
.cx-auth__fine { margin: 0; font-size: 0.8125rem; line-height: 1.45; color: var(--cx-muted, rgb(102 102 108)); }
.cx-auth__fine--center { text-align: center; }
.cx-auth__label { font-size: 0.8125rem; font-weight: 600; color: var(--cx-fg2, rgb(86 86 93)); margin-bottom: -0.5rem; }
.cx-auth__who { margin: -0.25rem 0 0; display: flex; flex-direction: column; gap: 0.125rem; font-size: 1rem; color: var(--cx-fg2, rgb(86 86 93)); }
/* The link page's greeting, for a screen reader and the stories: the heading and the name say it on screen. */
.cx-auth__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.cx-auth__pair { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.25rem 1.5rem; }
.cx-auth__pair form { margin: 0; }
.cx-auth md-outlined-text-field { width: 100%; }

/* Buttons: one primary per screen, an outline second (Google), text links under them. */
.cx-auth__btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem; min-height: 3rem; padding: 0 1.25rem;
  box-sizing: border-box; border-radius: 0.75rem; border: 0; font: inherit; font-size: 1rem; font-weight: 650; text-decoration: none;
  cursor: pointer; }
.cx-auth__btn--primary { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary, #fff); }
.cx-auth__btn--primary:hover { filter: brightness(1.08); }
.cx-auth__btn--outline { background: var(--cx-card, #fff); color: var(--md-sys-color-on-surface); border: 1px solid var(--cx-sep, rgb(220 220 225)); }
.cx-auth__btn--outline:hover { background: var(--cx-ground, rgb(242 242 247)); }
.cx-auth__btn--text { min-height: 2.5rem; padding: 0 0.5rem; background: none; color: var(--md-sys-color-primary); font-size: 0.9375rem; }
.cx-auth__btn--text:hover { text-decoration: underline; }
.cx-auth__btn--quiet { color: var(--cx-fg2, rgb(86 86 93)); }
.cx-auth__btn:focus-visible { outline: 2px solid var(--md-sys-color-primary); outline-offset: 2px; }
.cx-auth__back { display: inline-flex; align-items: center; gap: 0.375rem; align-self: flex-start; color: var(--md-sys-color-primary);
  font-weight: 650; font-size: 0.9375rem; text-decoration: none; }
.cx-auth__back:hover { text-decoration: underline; }

.cx-or { display: flex; align-items: center; gap: 1rem; color: var(--cx-muted, rgb(102 102 108)); font-size: 0.875rem; }
.cx-or::before, .cx-or::after { content: ""; flex: 1; border-top: 1px solid var(--cx-sep, rgb(220 220 225)); }

/* Lines: a sent code (green), an error (red), a hint (grey). */
.cx-note, .cx-hint { display: flex; align-items: flex-start; gap: 0.75rem; padding: 0.875rem 1rem; border-radius: 0.875rem;
  font-size: 0.9375rem; line-height: 1.45; }
.cx-note .material-symbols-rounded, .cx-hint .material-symbols-rounded { font-size: 1.25rem; flex: 0 0 auto; }
.cx-note--ok { background: rgb(221 242 228); color: rgb(18 70 40); }
.cx-note--err { background: rgb(253 228 226); color: rgb(130 24 18); }
.cx-hint { background: var(--cx-ground, rgb(242 242 247)); color: var(--cx-fg2, rgb(86 86 93)); }

/* The code: six boxes under one real input. The input covers them, invisible (its caret too); the box at the
   insertion point carries the focus ring. */
.cx-code { position: relative; }
.cx-code__input { position: absolute; inset: 0; width: 100%; height: 100%; box-sizing: border-box; margin: 0; padding: 0; border: 0;
  opacity: 0; color: transparent; caret-color: transparent; background: transparent; font-size: 1rem; z-index: 1; }
.cx-code__boxes { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 0.625rem; }
.cx-code__box { height: 3.5rem; display: grid; place-items: center; border-radius: 0.75rem; border: 1px solid var(--cx-sep, rgb(220 220 225));
  background: var(--cx-card, #fff); font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cx-code:focus-within .cx-code__box--at { border: 2px solid var(--md-sys-color-primary); }

/* Phone: the app's screens (P-Welcome, P-Code, P-Continue) — the card is the page, the mark a little larger. */
@media (max-width: 37.4375rem) {
  .cx-auth { justify-content: flex-start; padding: 3.5rem 1.25rem 2rem; gap: 2rem; }
  .cx-auth__card { max-width: none; padding: 0; background: none; box-shadow: none; border-radius: 0; }
  .cx-auth__mark img { height: 2.75rem; }
  .cx-auth__mark b { font-size: 2.125rem; }
  .cx-auth__btn { min-height: 3.25rem; }
  .cx-code__box { height: 3.75rem; }
  .cx-hint { background: var(--cx-card, #fff); } /* on the page's ground, not the card's */
}
