.rd-otp-request {
  display: flex;
  flex-direction: column;
}

.rd-otp-caption {
  margin: 16px 0 12px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.25;
  color: var(--rd-text-secondary);
}

.rd-otp {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.rd-otp__cell {
  flex: 1 1 0;
  min-width: 0;
  max-width: 64px;
  aspect-ratio: 1 / 1;
  padding: 0;
  box-sizing: border-box;
  text-align: center;
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 500;
  color: var(--rd-input-text);
  background-color: var(--rd-input-bg);
  border: 1px solid var(--rd-text-tertiary);
  border-radius: 8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rd-otp__cell:focus {
  border-color: var(--rd-input-stroke);
  box-shadow: 0 0 0 3px rgba(43, 43, 43, 0.1);
}

[data-theme="dark"] .rd-otp__cell:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.12);
}

.rd-otp__cell:disabled {
  color: var(--rd-text-tertiary);
  cursor: not-allowed;
}

.rd-otp--error .rd-otp__cell {
  border-color: var(--rd-input-error);
  color: var(--rd-input-error);
}

.rd-otp--error {
  animation: rd-otp-shake 0.35s ease;
}

@keyframes rd-otp-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

.rd-otp-hint,
.rd-otp-error-text {
  margin: 10px 0 24px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  line-height: 1.25;
}

.rd-otp-hint {
  color: var(--rd-text-tertiary);
}

.rd-otp-hint:has(+ .rd-otp-error-text) {
  display: none;
}

.rd-otp-error-text {
  color: var(--rd-input-error);
}

@media (max-width: 768px) {
  .rd-otp {
    gap: 8px;
  }

  .rd-otp__cell {
    font-size: 18px;
  }
}
