/* Sign-in family (boards J1 to J4; specification component 31 "Sign-in family").
   Pages on layouts/prism_standalone.html, outside the signed-in app. They follow
   the device's theme. Two forms:
   - .pr-signin       the brand panel beside the form (login, register). On a phone
                      the panel drops above the form as the lockup and headline.
   - .pr-signin-solo  one centred card under the lockup (reset, disabled,
                      Microsoft handover and failure, the J2 end states).
   Every colour, space and radius is a --pr-* token. Phone rules sit in
   @media (max-width: 768px). */

.pr-standalone { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.pr-standalone > .env-strip { flex: none; }
/* The page fills what is left under the environment strip, so it never scrolls by the strip's height. */
.pr-standalone > .pr-signin, .pr-standalone > .pr-signin-solo { flex: 1 1 auto; min-height: 0; }

/* ------------------------------------------------------------------ lockup -- */

.pr-lockup { display: inline-flex; align-items: center; gap: var(--pr-space-md); color: var(--pr-text-primary); }
.pr-lockup__img { display: block; width: auto; height: 64px; }
/* The drawn lockup has one image per ground; the theme attribute picks one. */
.pr-lockup__img--light { display: none; }
:root[data-theme="light"] .pr-lockup__img--dark { display: none; }
:root[data-theme="light"] .pr-lockup__img--light { display: block; }
.pr-lockup__mark { display: block; width: auto; height: 56px; }
.pr-lockup__text { display: flex; flex-direction: column; gap: var(--pr-space-2xs); line-height: 1.1; }
.pr-lockup__name { font-size: 1.75rem; font-weight: 800; letter-spacing: 0.12em; }
.pr-lockup__tag { font-size: 0.75rem; font-weight: 500; color: var(--pr-text-secondary); }

/* ------------------------------------------------------- split page (J1, J2) -- */

.pr-signin {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  background: var(--pr-surface-page);
}
.pr-signin[hidden] { display: none; }

.pr-signin__panel {
  display: flex; flex-direction: column;
  padding: var(--pr-space-3xl);
  background: var(--pr-surface-card);
  border-right: var(--pr-border-hairline) solid var(--pr-border-subtle);
}
.pr-signin__lead { margin: auto 0; max-width: 22rem; }
.pr-signin__headline { font-size: 2.5rem; line-height: 1.2; font-weight: 700; letter-spacing: -0.01em; color: var(--pr-text-primary); }
.pr-signin__descriptor { margin-top: var(--pr-space-lg); font-size: 1rem; line-height: 1.5; color: var(--pr-text-secondary); }
.pr-signin__address { font-size: 0.75rem; color: var(--pr-text-caption); }

.pr-signin__main { display: flex; align-items: center; justify-content: center; padding: var(--pr-space-3xl) var(--pr-space-xl); }
.pr-signin__col { width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: var(--pr-space-lg); }
.pr-signin__t { font-size: 1.25rem; line-height: 1.3; font-weight: 600; }

.pr-signin__ms { height: var(--pr-touch-target); font-size: 0.9rem; }
.pr-signin__ms-logo { width: 18px; height: 18px; flex: none; }

.pr-signin__or { display: flex; align-items: center; gap: var(--pr-space-md); font-size: 0.75rem; color: var(--pr-text-caption); }
.pr-signin__or::before, .pr-signin__or::after { content: ""; flex: 1; border-top: var(--pr-border-hairline) solid var(--pr-border-default); }

.pr-signin__form { display: flex; flex-direction: column; gap: var(--pr-space-lg); }
.pr-signin__pw { display: flex; flex-direction: column; gap: var(--pr-space-lg); }
.pr-signin__pw[hidden], .pr-signin__sso[hidden] { display: none; }
.pr-signin__submit { margin-top: 0; }
.pr-signin__notice { width: 100%; }

/* The honeypot field: off screen and out of the accessibility tree. */
.pr-signin__hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }

.pr-signin__links { display: flex; flex-direction: column; gap: var(--pr-space-sm); font-size: 0.85rem; color: var(--pr-text-secondary); }
.pr-signin__links a, .pr-signin__textlink { color: var(--pr-text-link); text-decoration: none; }
.pr-signin__links a:hover, .pr-signin__textlink:hover { text-decoration: underline; text-underline-offset: 2px; }
.pr-signin__textlink { align-self: flex-start; font-size: 0.85rem; border-radius: var(--pr-radius-xs); }

.pr-signin__foot {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--pr-space-xs) var(--pr-space-lg);
  margin-top: var(--pr-space-xl);
  font-size: 0.75rem;
}
.pr-signin__foot a, .pr-signin__version { color: var(--pr-text-link); text-decoration: none; }
.pr-signin__foot a:hover, .pr-signin__version:hover { text-decoration: underline; text-underline-offset: 2px; }
.pr-signin__version { font-weight: 600; font-size: 0.75rem; }

/* A form that is only a text-styled button ("Send it again"). */
.pr-signin__inline-form { display: contents; }

/* --------------------------------------------- one centred card (J3, J4, J2 ends) -- */

.pr-signin-solo {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: var(--pr-space-xl);
  padding: var(--pr-space-3xl) var(--pr-space-lg);
}
.pr-signin-solo[hidden] { display: none; }
.pr-signin-card {
  width: 100%; max-width: 440px;
  display: flex; flex-direction: column; gap: var(--pr-space-md);
  padding: var(--pr-space-xl);
  background: var(--pr-surface-card);
  border: var(--pr-border-hairline) solid var(--pr-border-subtle);
  border-radius: var(--pr-radius-lg);
}
.pr-signin-card__t { font-size: 1.125rem; line-height: 1.35; font-weight: 600; }
.pr-signin-card__t:focus { outline: none; }
.pr-signin-card__text { font-size: 0.85rem; line-height: 1.5; color: var(--pr-text-secondary); overflow-wrap: anywhere; }
.pr-signin-card__actions { display: flex; flex-direction: column; gap: var(--pr-space-md); margin-top: var(--pr-space-xs); }
.pr-signin-card__foot { font-size: 0.75rem; line-height: 1.4; color: var(--pr-text-caption); }
.pr-signin-card .pr-signin__form { margin-top: var(--pr-space-xs); }

/* Facts about a failure (J4): label and value side by side. */
.pr-signin-facts { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: var(--pr-space-sm) var(--pr-space-lg); font-size: 0.85rem; line-height: 1.45; }
.pr-signin-facts dt { color: var(--pr-text-secondary); }
.pr-signin-facts dd { margin: 0; color: var(--pr-text-primary); overflow-wrap: anywhere; }
.pr-signin-facts__id { font-size: 0.75rem; }

/* Handing over to Microsoft (J4): which sentence shows follows data-state. */
.pr-handover[data-state="redirect"] [data-when="slow"],
.pr-handover[data-state="slow"] [data-when="redirect"] { display: none; }

/* Indeterminate progress: components/progress.css (.pr-progress--indet), shared with /restore. */

/* Busy form: the fields hold still while the request goes. */
.pr-signin__form[aria-busy="true"] .pr-input { opacity: 0.7; }
/* The fields are read-only while busy but keep their box (J1 "busy"), and the
   Microsoft button above the form rests until the answer comes. */
.pr-signin__form[aria-busy="true"] .pr-input[readonly] { background: none; border-style: dashed; border-color: var(--pr-border-control); }
.pr-signin__col:has(.pr-signin__form[aria-busy="true"]) .pr-signin__ms { opacity: 0.5; pointer-events: none; }

/* ------------------------------------------------------------------- widths -- */

@media (max-width: 1100px) {
  .pr-signin { grid-template-columns: minmax(260px, 36%) minmax(0, 1fr); }
  .pr-signin__panel { padding: var(--pr-space-2xl); }
  .pr-signin__headline { font-size: 2.25rem; }
}

@media (max-width: 768px) {
  .pr-signin { display: block; }
  .pr-signin__panel {
    padding: var(--pr-space-2xl) var(--pr-space-lg) 0;
    background: none; border-right: 0;
  }
  .pr-signin__lead { margin: var(--pr-space-xl) 0 0; max-width: none; }
  .pr-signin__headline { font-size: 1.5rem; line-height: 1.3; }
  .pr-signin__descriptor, .pr-signin__address { display: none; }
  .pr-lockup__img { height: 56px; }
  .pr-signin__main { display: block; padding: var(--pr-space-xl) var(--pr-space-lg) var(--pr-space-2xl); }
  .pr-signin__col { max-width: none; }
  .pr-signin__t { font-size: 1.125rem; }
  .pr-signin__links { font-size: 0.9rem; }
  .pr-signin__foot { font-size: 0.85rem; }
  .pr-signin__version { font-size: 0.85rem; }
  .pr-signin__textlink { font-size: 0.9rem; }
  .pr-signin__textlink, .pr-signin__links a, .pr-signin__foot a, .pr-signin__version {
    min-height: var(--pr-touch-target); display: inline-flex; align-items: center;
  }
  .pr-signin__foot { gap: 0 var(--pr-space-lg); }

  /* The callout's button stays compact as drawn (J1 locked); its touch area is a larger overlay. */
  .pr-callout__actions .pr-btn--sm { position: relative; height: var(--pr-density-dense-control); font-size: 0.75rem; }
  .pr-callout__actions .pr-btn--sm::before { content: ""; position: absolute; inset: -6px 0; }

  .pr-signin-solo { justify-content: safe center; padding: var(--pr-space-3xl) var(--pr-space-lg); }
  .pr-signin-card { padding: var(--pr-space-lg); }
  .pr-signin-card__t { font-size: 1.125rem; }
  .pr-signin-card__text { font-size: 0.9rem; }
}

/* "What's new" dialog on the sign-in page: head and Close stay put, the list scrolls. */
dialog.pr-changelog-dialog[open] { display: flex; flex-direction: column; overflow: hidden; }
.pr-changelog-dialog .pr-dialog__body { flex: 1 1 auto; min-height: 0; overflow-y: auto; }
.pr-changelog-dialog .pr-dialog__err[hidden] { display: none; }
