/* ============================================================================
   Sign in and the sign-in flows: the shell (screens/sign-in.yaml, part SH; BSignIn.dc.html).
   Loaded after solar-tokens.css and components.css, only by templates/revamp/signin_base.html. Design tokens only: no raw
   colour, no font size under the 12 px floor (A-03). Every class is prefixed sn-.
   Three layouts (SI-DR-1, SI-DR-6): from 1280 px a 640 px Night panel; from 1024 to 1279 px a 480 px panel with 48 px inner
   padding and the 40 px headline; below 1024 px no panel, one Paper column. The form column is exactly 400 px from 1024 px up
   and, below it, 400 px at most and otherwise the viewport minus 48 px (M4). No card box (SI-DR-7).
   Amber: only the primary button of a page (the logo's own square is the brand mark); the brand panel has none (SI-DR-2, SIN-L04).
   ========================================================================= */

.sn-page {
  display: grid;
  grid-template-columns: 640px minmax(0, 1fr);
  min-height: 100vh;
  background: var(--ground);
}

/* ---- the brand panel (Night on a Paper page: the aside carries data-theme="night") ----------------------------------- */
.sn-brand {
  display: grid;
  grid-template-rows: auto 1fr auto;
  min-width: 0;
  padding: var(--sp-8);
  background: var(--surface);
  color: var(--ink);
}
.sn-brand__copy { align-self: center; min-width: 0; max-width: 512px; }
.sn-headline {
  margin: 0;
  color: var(--ink);
  font: var(--w-display) var(--t-display-l)/1.02 var(--f-ui);
  letter-spacing: var(--tr-tight);
  overflow-wrap: anywhere;
}
.sn-grid { display: grid; grid-template-columns: repeat(12, 24px); gap: var(--sp-2); align-self: end; justify-self: start; }
.sn-grid .rv-sq { width: 24px; height: 24px; border-radius: var(--r-in); }

/* ---- the wordmark: the logo and the product name in the ink of the surface it stands on --------------------------------- */
.sn-wordmark { display: flex; align-items: center; gap: var(--sp-3); color: var(--ink); font: var(--w-emph) var(--t-title)/1 var(--f-ui); }
.sn-wordmark__logo { flex: none; width: 28px; height: 28px; }
.sn-wordmark__name { overflow-wrap: anywhere; }
.sn-wordmark--paper { display: none; }            /* the compact wordmark above the title: below 1024 px only */

/* ---- the form column ------------------------------------------------------------------------------------------------- */
.sn-col { display: flex; align-items: center; justify-content: center; min-width: 0; padding: var(--sp-7) var(--sp-5); }
.sn-form { display: flex; flex-direction: column; width: 400px; max-width: 100%; min-width: 0; }
.sn-eyebrow {
  margin: 0 0 var(--sp-2);
  color: var(--ink-3);
  font: 500 var(--t-micro)/1.2 var(--f-data);
  letter-spacing: var(--tr-caps);
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.sn-title { margin: 0 0 var(--sp-4); color: var(--ink); font: var(--w-display) var(--t-screen)/1.35 var(--f-ui); letter-spacing: var(--tr-tight); overflow-wrap: anywhere; }
.sn-slot { margin: 0 0 var(--sp-4); }                    /* the ONE banner slot, 16 px above the first field (SI-DR-9) */
.sn-slot .rv-banner { overflow-wrap: anywhere; }
.sn-fields, .sn-body { display: flex; flex-direction: column; gap: var(--sp-5); min-width: 0; }
.sn-row { min-width: 0; }
.sn-lede { margin: 0; color: var(--ink-2); font: var(--w-reg) var(--t-body)/1.5 var(--f-ui); overflow-wrap: anywhere; }
.sn-lede b { color: var(--ink); font-weight: var(--w-emph); }
.sn-wrap { overflow-wrap: anywhere; }
.sn-form .rv-btn { width: 100%; }                         /* every action of a flow is full width: size l primary, then secondary and ghost (SI-DR-6) */
.sn-forgot { margin: 0; text-align: right; }
.sn-forgot__link { position: relative; display: inline-flex; align-items: center; min-height: var(--h-chip); }
.sn-forgot + .rv-btn { margin-top: calc(-1 * var(--sp-3)); }
/* sign-in with Microsoft or Google (#1265): the divider 'or' (a hairline on both sides of the word) and one full-width secondary button per
   provider under the password form; only rendered while a provider is on */
.sn-or { display: flex; align-items: center; gap: var(--sp-3); margin: var(--sp-4) 0; color: var(--ink-3); font: var(--w-reg) var(--t-meta)/1.4 var(--f-ui); }
.sn-or::before, .sn-or::after { content: ""; flex: 1 1 0; border-top: 1px solid var(--line); }
.sn-sso { display: flex; flex-direction: column; gap: var(--sp-3); min-width: 0; }
.sn-noaccount { margin: var(--sp-5) 0 0; color: var(--ink-2); font: var(--w-reg) var(--t-body)/1.5 var(--f-ui); }
.sn-expired { display: flex; align-items: flex-start; gap: var(--sp-2); margin: 0; color: var(--error); font: var(--w-reg) var(--t-body)/1.4 var(--f-ui); }
.sn-expired i { flex: none; margin-top: 1px; }

/* the Show / Hide button inside a password field (SI-DR-8): added by signin.js, never rendered by the server */
.sn-has-toggle .rv-field__control { padding-right: var(--sp-8); }
.sn-form .sn-toggle { position: absolute; top: 50%; right: var(--sp-1); transform: translateY(-50%); width: auto; margin: 0; }   /* margin 0: the foundations phone rule gives every size s button margin-block 6px, which pushed the centred button down */
.sn-toggle::after { content: ""; position: absolute; inset: 0; }   /* a pointer: the button's own 32 px box */

/* ---- the foot (signin.legal) --------------------------------------------------------------------------------------- */
.sn-legal { margin-top: var(--sp-5); color: var(--ink-3); font: var(--w-reg) var(--t-meta)/1.4 var(--f-ui); }
.sn-legal p { margin: 0; }
.sn-legal .sn-legal__links { display: flex; flex-wrap: wrap; gap: var(--sp-1) var(--sp-4); }
.sn-legal .rv-link { color: var(--ink-2); }
.sn-noaccount + .sn-legal { margin-top: var(--sp-4); }

/* ---- 1024 to 1279 px: a 480 px panel, 48 px inner padding, the 40 px headline (SI-DR-1) ------------------------------------ */
@media (max-width: 1279px) {
  .sn-page { grid-template-columns: 480px minmax(0, 1fr); }
  .sn-brand { padding: var(--sp-7); }
  .sn-headline { font-size: var(--t-display-m); }
}

/* ---- below 1024 px: no panel, one Paper column, the wordmark above the title (SI-DR-6) ------------------------------------- */
@media (max-width: 1023px) {
  .sn-page { grid-template-columns: minmax(0, 1fr); }
  .sn-brand { display: none; }
  .sn-col { align-items: flex-start; padding: var(--sp-7) var(--sp-5); }
  .sn-form { width: 100%; max-width: 400px; }
  .sn-wordmark--paper { display: flex; margin-bottom: var(--sp-7); }
}
@media (max-width: 767px) {
  .sn-col { padding-block: var(--sp-5); }
  .sn-wordmark--paper { margin-bottom: var(--sp-5); }
}

/* a touch screen: a 44 px hit area WITHOUT making the controls 44 px high (A-12, A-26, SI-DR-13) */
@media (pointer: coarse) {
  .sn-forgot__link::after { content: ""; position: absolute; inset: -10px -8px; }
  .sn-toggle::after { inset: -7px -4px; }   /* inset is measured from the padding box: 30 + 2 x 7 = 44 (the 1 px border made -6px only 42) */
}
