/*
 * Sign-in and password pages and the error pages (Views/Shared/_AuthLayout.cshtml), and the check-in point (Views/CheckPoint).
 * Needs pyro-tokens.css and pyro-fonts.css. The forest green is the app's menu colour (pyro-shell.css); it is repeated here because
 * these pages do not load the shell. Keep the values in step with --pyro-navy* there.
 */
:root {
  --auth-navy: #123524;
  --auth-navy-line: #2F5440;
  --auth-navy-text: #E4EEE8;
  --auth-navy-dim: #B3CDBE;
  --auth-cream: #F6EFE3;
}

/* ---- the split page: brand panel on the left, the form on white ---- */
.auth-split {
  display: grid;
  grid-template-columns: minmax(340px, 5fr) 7fr;
  min-height: 100vh;
  background: var(--pyro-paper);
}

.auth-brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 3rem;
  padding: 2.5rem 3rem 3rem;
  color: var(--auth-navy-text);
  background: var(--auth-navy);
}

.auth-brand-logo {
  align-self: flex-start;
  display: block;
  padding: .8rem 1.15rem;
  background: var(--auth-cream);
  border-radius: 8px;
}
.auth-brand-logo img {
  display: block;
  width: 12.5rem;
  max-width: 100%;
  height: auto;
}

.auth-brand-name {
  margin: 0;
  color: var(--auth-cream);
  font-family: var(--pyro-font-title);
  font-size: clamp(3.4rem, 6.2vw, 5.6rem);
  line-height: .95;
  letter-spacing: .02em;
}
.auth-brand-line {
  margin: .9rem 0 0;
  color: var(--auth-navy-text);
  font-size: 1.25rem;
}

/* the progress strip every event has: three steps done, two to come */
.auth-steps {
  display: flex;
  margin: 3rem 0 0;
  padding: 0;
  list-style: none;
}
.auth-steps li {
  position: relative;
  flex: 1 1 0;
  padding: 1.6rem .5rem 0 0;
  color: var(--auth-navy-dim);
  font-size: .875rem;
  line-height: 1.3;
}
.auth-steps li::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: .8rem;
  height: .8rem;
  border: 2px solid var(--auth-navy-line);
  border-radius: 50%;
}
.auth-steps li:not(:last-child)::after {
  content: "";
  position: absolute;
  top: calc(.4rem - 1px);
  right: .35rem;
  left: 1.15rem;
  height: 2px;
  background: var(--auth-navy-line);
  transform-origin: left;
}
.auth-steps li.is-done {
  color: var(--auth-cream);
}
.auth-steps li.is-done::before {
  background: var(--auth-cream);
  border-color: var(--auth-cream);
}
.auth-steps li.is-done:has(+ .is-done)::after {
  background: var(--auth-cream);
}

/* the one moment of motion: the dots fill in once, left to right */
@media (prefers-reduced-motion: no-preference) {
  .auth-steps li::before {
    animation: auth-dot .4s ease-out both;
    animation-delay: calc(var(--i) * 220ms + 250ms);
  }
  .auth-steps li:not(:last-child)::after {
    animation: auth-line .4s ease-out both;
    animation-delay: calc(var(--i) * 220ms + 400ms);
  }
}
@keyframes auth-dot {
  from { opacity: 0; transform: scale(.3); }
  to { opacity: 1; transform: none; }
}
@keyframes auth-line {
  from { transform: scaleX(0); }
  to { transform: none; }
}

.auth-main {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.5rem;
}
.auth-body {
  width: 100%;
  max-width: 22rem;
}

.auth-title {
  margin: 0 0 .4rem;
  font-family: var(--pyro-font-title);
  font-size: 2.75rem;
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: .02em;
}
.auth-lead {
  margin: 0 0 1.75rem;
  color: var(--pyro-slate);
}
.auth-body .btn-primary {
  width: 100%;
  padding: .65rem 1rem;
}
.auth-links {
  margin: 1.5rem 0 0;
  font-size: .9375rem;
}

/* phones: the brand panel becomes a header bar */
@media (max-width: 899.98px) {
  .auth-split {
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
  }
  .auth-brand {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 1rem;
    padding: 1rem 1.25rem;
  }
  .auth-brand-logo {
    padding: .5rem .75rem;
  }
  .auth-brand-logo img {
    width: 7.5rem;
  }
  .auth-brand-name {
    font-size: 1.9rem;
  }
  .auth-brand-line,
  .auth-steps {
    display: none;
  }
  .auth-main {
    align-items: flex-start;
    padding: 2rem 1.25rem;
  }
}

/* ---- a single panel on a light page (the check-in point's PIN screen) ---- */
.auth-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 1.5rem 1rem;
  background: var(--pyro-powder);
}
.auth-panel {
  width: 100%;
  max-width: 24rem;
  overflow: hidden;
  background: var(--pyro-paper);
  border: 1px solid var(--pyro-rule);
  border-radius: var(--pyro-radius-panel);
}
.auth-panel .auth-body {
  padding: 1.75rem 1.75rem 1.5rem;
}
.auth-logo {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 0 1.5rem;
}

/* ---- Check-in point: the screen that shows the QR code ---- */
.kiosk {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 1rem;
  background: var(--pyro-powder);
}
.kiosk-card {
  width: 100%;
  max-width: 44rem;
  padding: 2rem 1.5rem;
  text-align: center;
  background: var(--pyro-paper);
  border: 1px solid var(--pyro-rule);
  border-radius: var(--pyro-radius-panel);
}
.kiosk-card img {
  width: min(32rem, 100%);
  height: auto;
}
.kiosk-title {
  margin: 1.25rem 0 .25rem;
  font-family: var(--pyro-font-title);
  font-size: 3rem;
  font-weight: 400;
  letter-spacing: .02em;
}
.kiosk-sub {
  margin: 0 0 1rem;
  color: var(--pyro-slate);
  font-size: 1.25rem;
}
.kiosk-count {
  margin: 0;
  font-size: 1.5rem;
}
/* offline: the napping mock QR code (src/offlineScreen.ts) and the line under it */
.kiosk-offline {
  display: block;
  width: 100%;
  height: auto;
  cursor: pointer;
}
.kiosk-say {
  min-height: 1.7em;
  margin: 0 0 .5rem;
  font-size: 1.25rem;
  font-weight: 500;
}
