/* OTP Confirmation Scenario Styles */
.otp-stage {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 1rem 1.25rem;
  margin: 0.75rem 0;
  background: #fff;
}

.otp-stage[disabled] {
  opacity: 0.55;
  background: #f9fafb;
}

.otp-stage legend {
  padding: 0 0.4rem;
  font-weight: 600;
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #4b5563;
}

.otp-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.otp-input {
  font: inherit;
  padding: 0.5rem 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  flex: 1 1 240px;
}

.otp-input--code {
  flex: 0 0 140px;
  font-family: ui-monospace, SFMono-Regular, monospace;
  letter-spacing: 0.2em;
  text-align: center;
}

.otp-message {
  margin: 0.5rem 0 0;
  font-size: 0.9rem;
  color: #4b5563;
  min-height: 1.25rem;
}

.otp-message--error { color: #b91c1c; }

/* Segmented inputs styling */
.otp-segmented-container {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
  flex-wrap: wrap;
}

.otp-input--segmented-digit {
  width: 45px;
  height: 48px;
  font-size: 1.4rem;
  font-family: ui-monospace, SFMono-Regular, monospace;
  text-align: center;
  border: 1px solid #d1d5db;
  border-radius: 6px;
}

.otp-input--segmented-digit:focus {
  border-color: #4f46e5;
  outline: none;
  box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.15);
}

/* Virtual keypad styling */
.otp-keypad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  max-width: 260px;
  margin: 0.75rem 0;
}

.otp-keypad-btn {
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 0.75rem;
  font-size: 1.2rem;
  font-weight: 600;
  cursor: pointer;
  color: #1f2937;
  transition: background 0.1s, border-color 0.1s;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.otp-keypad-btn:hover {
  background: #e5e7eb;
  border-color: #d1d5db;
}

.otp-keypad-btn:active {
  background: #d1d5db;
}


/* TOTP variants */
.totp-form {
  display: grid;
  gap: 0.4rem;
  max-width: 420px;
}

.totp-form label { font-size: 0.9rem; color: #374151; }

.totp-setup {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.35rem 1rem;
  margin: 0.75rem 0;
}

.totp-setup dt { font-weight: 600; color: #4b5563; }
.totp-setup dd { margin: 0; }
.totp-uri { word-break: break-all; font-size: 0.85rem; }

.totp-signed-in { font-size: 1.05rem; }

.totp-danger { border-color: #fca5a5; }

.totp-log {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  background: #f9fafb;
}

.totp-log h2 { margin: 0 0 0.5rem; font-size: 0.95rem; }
.totp-log ol { margin: 0; padding-left: 1.25rem; font-family: ui-monospace, SFMono-Regular, monospace; font-size: 0.85rem; }
.totp-log time { color: #6b7280; margin-left: 0.5rem; }
.totp-log__entry--accepted { color: #047857; }
.totp-log__entry--rejected { color: #b91c1c; }
