/* ── Scrollbar ───────────────────────────────────────────────────────────── */
.scrollbar-thin::-webkit-scrollbar        { width: 4px; }
.scrollbar-thin::-webkit-scrollbar-track  { background: #f1f1f1; }
.scrollbar-thin::-webkit-scrollbar-thumb  { background: #c1c1c1; border-radius: 2px; }
.scrollbar-thin::-webkit-scrollbar-thumb:hover { background: #a1a1a1; }

#screen-email,
#screen-otp,
#screen-success { overflow-y: auto; }
#screen-email::-webkit-scrollbar,
#screen-otp::-webkit-scrollbar,
#screen-success::-webkit-scrollbar { display: none; }

/* ── Button disabled state ───────────────────────────────────────────────── */
.btn-disabled {
  background-color: #e5e7eb;
  color: #9ca3af;
  cursor: not-allowed;
}

/* ── Animations ──────────────────────────────────────────────────────────── */

/* Shake — used on email-card and OTP error inputs */
@keyframes shake {
  10%, 90% { transform: translate3d(-1px, 0, 0); }
  20%, 80% { transform: translate3d(2px, 0, 0); }
  30%, 50%, 70% { transform: translate3d(-4px, 0, 0); }
  40%, 60% { transform: translate3d(4px, 0, 0); }
}
.shake-animation { animation: shake 0.4s cubic-bezier(.36,.07,.19,.97) both; }

/* OTP error input shake */
@keyframes otp-shake {
  0%, 100% { transform: translateX(0); }
  25%       { transform: translateX(-4px); }
  75%       { transform: translateX(4px); }
}
.otp-error { animation: otp-shake 0.5s ease-in-out; }

/* Success checkmark pop */
@keyframes checkmark {
  0%   { transform: scale(0); opacity: 0; }
  50%  { transform: scale(1.2); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}
.checkmark-animation { animation: checkmark 0.6s ease-in-out; }

/* Success ring pulse */
@keyframes success-pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.05); opacity: 0.9; }
}
.success-pulse { animation: success-pulse 2s infinite; }

/* Rate-limit icon pulse */
@keyframes pulse-warning {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.05); opacity: 0.8; }
}
.pulse-warning { animation: pulse-warning 2s ease-in-out infinite; }

/* Countdown clock blink */
@keyframes countdown-blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}
.countdown-animation { animation: countdown-blink 1s linear infinite; }

/* Chat bubble entrance */
@keyframes bubbleEnter {
  0%   { opacity: 0; transform: translateY(10px) scale(0.95); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.chat-bubble-enter { animation: bubbleEnter 0.3s ease-out; }

/* Typing dots */
@keyframes typing {
  0%, 100% { opacity: 0.3; }
  50%       { opacity: 1; }
}
.typing-dot { animation: typing 1.5s infinite; }

/* ── OTP input sizing ────────────────────────────────────────────────────── */
.otp-input {
  width: 3rem;
  height: 3rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 600;
}
@media (max-width: 640px) {
  .otp-input {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 1.125rem;
  }
}

/* ── Markdown prose inside bot bubbles ───────────────────────────────────── */
.bot-message p          { margin-bottom: 0.5em; font-size: 0.875rem; line-height: 1.6; color: #1f2937; }
.bot-message p:last-child { margin-bottom: 0; }
.bot-message h1,
.bot-message h2,
.bot-message h3         { font-weight: 700; color: #1a3370; margin: 0.75em 0 0.4em; }
.bot-message h1         { font-size: 1.1rem; }
.bot-message h2         { font-size: 1rem; }
.bot-message h3         { font-size: 0.9rem; }
.bot-message ul,
.bot-message ol         { padding-left: 1.25rem; margin-bottom: 0.5em; font-size: 0.875rem; color: #1f2937; }
.bot-message ul         { list-style: disc; }
.bot-message ol         { list-style: decimal; }
.bot-message li         { margin-bottom: 0.25em; line-height: 1.5; }
.bot-message strong     { font-weight: 700; color: #1a3370; }
.bot-message em         { font-style: italic; }
.bot-message a          { color: #f3ab22; text-decoration: underline; }
.bot-message a:hover    { color: #e29a1a; }
.bot-message code       { background: #e5e7eb; border-radius: 4px; padding: 0.1em 0.35em; font-size: 0.8rem; font-family: monospace; color: #1a3370; }
.bot-message pre        { background: #1a3370; color: #f5f7fb; border-radius: 0.5rem; padding: 0.75rem 1rem; overflow-x: auto; margin-bottom: 0.5em; }
.bot-message pre code   { background: transparent; color: inherit; padding: 0; font-size: 0.8rem; }
.bot-message blockquote { border-left: 3px solid #f3ab22; padding-left: 0.75rem; color: #6b7280; font-style: italic; margin: 0.5em 0; }
.bot-message hr         { border-color: #e5e7eb; margin: 0.75em 0; }
.bot-message table      { width: 100%; border-collapse: collapse; font-size: 0.8rem; margin-bottom: 0.5em; }
.bot-message th,
.bot-message td         { border: 1px solid #e5e7eb; padding: 0.4rem 0.6rem; text-align: left; }
.bot-message th         { background: #1a3370; color: #fff; font-weight: 600; }
