/* CampusPulse - code screen styles.
   Uses the same custom properties as the rest of the app. */

.otpstep {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.otpstep__mark {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: var(--ember);
  background: var(--ember-soft);
  border: 1px solid var(--line);
  animation: cp-pop .42s cubic-bezier(.2, .9, .3, 1.2) both;
}

.otpstep__mark svg {
  width: 22px;
  height: 22px;
}

.otpstep h2 {
  margin: 2px 0 0;
}

.otpstep > .muted {
  margin: -8px 0 2px;
}

.otpstep__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 2px;
}

/* The code box: wide tracking so the digits read like a code, at any length. */
.otp-input {
  font-family: var(--mono);
  font-size: 26px;
  letter-spacing: .42em;
  text-align: center;
  text-indent: .42em;
  padding-block: 14px;
}

.otp-input::placeholder {
  color: var(--ink-3);
  letter-spacing: .42em;
}

/* Offline mode: the code cannot be emailed, so it is shown plainly and
   labelled, rather than pretending a mail was sent. */
.otp-offline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 14px;
  border-radius: var(--r);
  border: 1px dashed var(--line-2);
  background: var(--card-2);
}

.otp-offline__tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--rust);
}

.otp-offline__code {
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: .3em;
  color: var(--ink);
  animation: cp-fade .3s ease both;
}

@media (max-width: 640px) {
  .otpstep__foot { justify-content: center; }
  .otp-input { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .otpstep__mark,
  .otp-offline__code { animation: none; }
}
