/* AltID Kiosk — layout.
   Ported from the claude.ai/design artboard "AltID Kiosk.dc.html".
   The design is authored at a fixed 1920x1080 and scaled to fit the viewport,
   so every dimension below is a literal 1080p pixel value. */

/* ---------- Stage & frame ---------- */

html,
body {
  margin: 0;
  padding: 0;
  background: #0b0f14;
  overflow: hidden;
}

.stage {
  width: 100vw;
  height: 100vh;
  display: grid;
  place-items: center;
  background: #0b0f14;
  overflow: hidden;
}

/* Scaled by JS via transform. transform does not affect layout, so the
   negative margins pull the 1920x1080 layout box back to its scaled size —
   otherwise it would overflow the centring grid. */
.frame {
  width: 1920px;
  height: 1080px;
  flex: none;
  transform-origin: center center;
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  font-family: var(--font-sans);
  color: var(--ink);
  overflow: hidden;
}

/* ---------- Shared chrome ---------- */

.kiosk-header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 34px 72px 30px;
  background: var(--card);
}

.kiosk-brand {
  height: 68px;
  width: auto;
  display: block;
}

.rainbow-rule {
  flex: none;
  height: 4px;
  background: var(--rainbow);
}

.powered-by {
  display: flex;
  align-items: center;
  gap: 16px;
}

.powered-by__label {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--faint);
}

.powered-by__logo {
  height: 30px;
  width: auto;
  display: block;
  opacity: 0.85;
}

.help-hint {
  font-size: 22px;
  font-weight: 500;
  color: var(--faint);
}

/* ---------- Screen 1: Scan (resting state) ---------- */

.scan {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 720px;
  gap: 96px;
  align-items: center;
  padding: 0 72px;
}

.scan__copy {
  display: flex;
  flex-direction: column;
  gap: 52px;
}

.scan__head {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.scan__title {
  margin: 0;
  font-size: 82px;
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -2.4px;
  color: var(--ink);
  text-wrap: balance;
}

.scan__lede {
  margin: 0;
  font-size: 28px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 22ch;
}

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 34px;
}

.steps__item {
  display: grid;
  grid-template-columns: 68px 1fr;
  align-items: center;
  gap: 28px;
}

.steps__num {
  width: 68px;
  height: 68px;
  border-radius: var(--r-pill);
  background: var(--brand);
  color: #fff;
  font-size: 32px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.steps__text {
  font-size: 32px;
  line-height: 1.35;
  font-weight: 500;
  color: var(--ink);
}

/* ---------- QR panel ---------- */

.qr-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: 56px 56px 44px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 34px;
}

/* Server-rendered SVG, so it stays crisp at whatever the artboard is scaled to.
   Faded out by JS while there is no valid code to show. */
.qr-card__code {
  width: 520px;
  height: 520px;
  display: block;
  transition: opacity 160ms ease;
}

.qr-card__status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.qr-card__waiting {
  display: flex;
  align-items: center;
  gap: 14px;
}

.qr-card__dot {
  width: 14px;
  height: 14px;
  border-radius: var(--r-pill);
  background: var(--brand);
  animation: kioskPulse 1.6s ease-in-out infinite;
}

.qr-card__waiting-label {
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
}

.qr-card__validity {
  font-size: 20px;
  font-weight: 500;
  color: var(--faint);
}

.qr-card__countdown {
  font-family: var(--font-mono);
}

/* ---------- Sandbox badge ---------- */

/* Marks a kiosk that is not verifying a real AltID identity. Deliberately loud: the whole point
   is that nobody mistakes the sandbox flow for the real thing. */
.kiosk-badge {
  padding: 8px 18px;
  border-radius: var(--r-pill);
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  color: var(--warn);
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

/* ---------- Scan footer ---------- */

.scan-footer {
  flex: none;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 72px 40px;
}

/* ---------- Screens 2 & 3: Result ---------- */

/* Colour is set per outcome by JS: --result-* on .result. */
.result {
  position: absolute;
  inset: 0;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  animation: kioskRise 260ms ease-out both;
}

.result__header {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 34px 72px 30px;
  background: var(--card);
}

.result__clock {
  font-family: var(--font-mono);
  font-size: 34px;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.5px;
}

.result__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 0 120px;
}

.result__icon {
  width: 168px;
  height: 168px;
  border-radius: var(--r-pill);
  display: grid;
  place-items: center;
  background: var(--result-tint);
  border: 3px solid var(--result-line);
  color: var(--result-color);
}

.result__titles {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  text-align: center;
}

.result__greeting {
  font-size: 34px;
  font-weight: 600;
  color: var(--muted);
}

.result__headline {
  margin: 0;
  font-size: 88px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -2.6px;
  color: var(--result-color);
}

.result__card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 36px 56px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  min-width: 760px;
}

.result__times {
  font-size: 32px;
  font-weight: 600;
  color: var(--ink);
}

.result__sub {
  font-size: 26px;
  font-weight: 500;
  color: var(--muted);
}

/* What the wallet actually shared, set apart from the attendance summary. */
.result__meta {
  margin-top: 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.result__meta-line {
  font-family: var(--font-mono);
  font-size: 20px;
  color: var(--faint);
}

/* Never let generated demo data pass for the real thing. */
.result__meta-note {
  font-size: 16px;
  color: var(--warn);
}

/* A note under the steps, e.g. that this path is the sandbox flow. */
.scan__note {
  margin: 0;
  font-size: 20px;
  color: var(--faint);
}

.scan__note a {
  color: var(--brand);
}

.result__footer {
  flex: none;
  padding: 0 72px 48px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.result__footer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.result__return {
  font-size: 22px;
  font-weight: 500;
  color: var(--faint);
}

.result__progress {
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--line);
  overflow: hidden;
}

.result__progress-bar {
  height: 100%;
  background: var(--result-color);
  border-radius: var(--r-pill);
  transition: width 240ms linear;
}

/* ---------- Error dialog (over the scan screen) ---------- */

.error-overlay {
  position: absolute;
  inset: 0;
  background: rgba(22, 32, 43, 0.62);
  display: grid;
  place-items: center;
  padding: 80px;
}

.error-dialog {
  width: 880px;
  background: var(--card);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: 64px 72px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 28px;
  text-align: center;
  animation: kioskRise 200ms ease-out both;
}

.error-dialog__icon {
  width: 112px;
  height: 112px;
  border-radius: var(--r-pill);
  background: var(--crit-bg);
  border: 3px solid var(--crit-line);
  display: grid;
  place-items: center;
  color: var(--crit);
}

.error-dialog__title {
  margin: 0;
  font-size: 56px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -1.4px;
  color: var(--ink);
}

.error-dialog__body {
  margin: 0;
  font-size: 28px;
  line-height: 1.45;
  color: var(--muted);
  max-width: 26ch;
}

.error-dialog .ds-btn {
  width: 320px;
  height: 86px;
  justify-content: center;
  font-size: 30px;
  font-weight: 700;
  padding: 24px 64px;
  border-radius: var(--r-lg);
}

/* ---------- Utilities & motion ---------- */

[hidden] {
  display: none !important;
}

a {
  color: var(--brand);
}

a:hover {
  color: var(--brand-ink);
}

@keyframes kioskPulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.82); }
}

@keyframes kioskRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
