/* These styles are generated from project.scss. */

.alert-debug {
  color: black;
  background-color: white;
  border-color: #d6e9c6;
}

.alert-error {
  color: #b94a48;
  background-color: #f2dede;
  border-color: #eed3d7;
}

/* Visitor kiosk
   ------------------------------------------------------------------------- */

/* The badge number a visitor has just been given: wide enough to read at
   arm's length, narrow enough not to sprawl across an iPad in landscape. */
.badge-card {
  max-width: 16rem;
}

/* NDA signing — a document you scroll, with the field on the line
   ------------------------------------------------------------------------- */

.nda {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 2rem);
}

/* Stays put while the document scrolls, so "Agree and sign" is always reachable
   without hunting back up a six-page agreement. */
.nda__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #fff;
  border-bottom: 1px solid #dee2e6;
}

.nda__pages {
  flex: 1;
  overflow-y: auto;
  background: #525659;
  padding: 1rem;
  text-align: center;
  -webkit-overflow-scrolling: touch;
}

.nda__page {
  position: relative;
  margin: 0 auto 1rem;
  background: #fff;
  box-shadow: 0 2px 8px rgb(0 0 0 / 40%);
}

/* The dotted field sitting on the document's own signature line. */
.nda__field {
  position: absolute;
  padding: 0;
  background: rgb(255 235 130 / 45%);
  border: 2px dashed #b58900;
  border-radius: 3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: nda-field-pulse 2s ease-in-out 3;
}

.nda__field-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #7a5c00;
  white-space: nowrap;
}

.nda__field--signed {
  background: transparent;
  border-color: transparent;
  animation: none;
}

.nda__field img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

@keyframes nda-field-pulse {
  50% {
    box-shadow: 0 0 0 6px rgb(181 137 0 / 25%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nda__field {
    animation: none;
  }
}

.signature-pad-wrap {
  position: relative;
}

.signature-pad {
  width: 100%;
  height: 220px;
  display: block;
  border: 1px solid #dee2e6;
  border-radius: 0.375rem;
  background: #fff;
  touch-action: none;
}

/* The line people instinctively sign on. */
.signature-pad__hint {
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: 3rem;
  border-bottom: 1px solid #adb5bd;
  color: #adb5bd;
  font-size: 0.8rem;
  text-align: center;
  pointer-events: none;
}

/* Badge entry — a cash-machine keypad
   -------------------------------------------------------------------------
   Sized for a finger on an iPad at arm's length, not a mouse. Keys are large
   enough to hit without looking, and the display is readable while standing
   back from the stand. */

.keypad {
  max-width: 22rem;
  margin: 0 auto;
}

.keypad__display {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
}

.keypad__cell {
  width: 3.5rem;
  height: 4.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  background: #fff;
  border: 2px solid #ced4da;
  border-radius: 0.5rem;
  color: #212529;
}

.keypad__cell--filled {
  border-color: #0d6efd;
}

/* Marks the cell the next digit lands in, so there is no guessing about
   where you are in the number. */
.keypad__cell--next {
  border-color: #0d6efd;
  box-shadow: 0 0 0 0.2rem rgb(13 110 253 / 20%);
}

.keypad__keys {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
}

.keypad__key {
  height: 4.5rem;
  font-size: 1.75rem;
  font-weight: 500;
  background: #fff;
  border: 1px solid #ced4da;
  border-radius: 0.5rem;
  color: #212529;
  /* Stops a fast double tap zooming the page instead of entering a digit. */
  touch-action: manipulation;
  user-select: none;
}

.keypad__key:active {
  background: #e9ecef;
  transform: translateY(1px);
}

.keypad__key--muted {
  font-size: 1.1rem;
  color: #6c757d;
  background: #f8f9fa;
}

.keypad__actions {
  margin-top: 1.25rem;
}

.keypad__enter {
  width: 100%;
  padding-block: 1rem;
  font-size: 1.25rem;
}

.keypad__error {
  margin-bottom: 0;
}
