/* Email OTP login — shared (login page + booking modal) */

.mh-email-otp {
  --otp-accent: #13b6ec;
  --otp-accent-2: #5ec8f0;
  --otp-navy: #0b1f4d;
  --otp-muted: #94a3b8;
  --otp-ok: #34d399;
  --otp-warn: #fbbf24;
  --otp-danger: #f87171;
  --otp-text: #f8fafc;
  color: var(--otp-text);
}

/* Booking modal is light — use dark text there */
#psLoginModal .mh-email-otp,
.ps-booking-modal .mh-email-otp {
  --otp-accent: #0d8fbf;
  --otp-accent-2: #2b6fd6;
  --otp-muted: #64748b;
  --otp-ok: #059669;
  --otp-warn: #d97706;
  --otp-danger: #dc2626;
  --otp-text: #0f172a;
  color: var(--otp-text);
}

.mh-email-otp__hint {
  font-size: 0.88rem;
  color: var(--otp-muted) !important;
  margin: 0 0 1rem;
  line-height: 1.45;
}

.mh-email-otp__hint strong {
  color: var(--otp-accent) !important;
  font-weight: 700;
}

.mh-email-otp__alert {
  display: none;
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  font-size: 0.86rem;
  margin-bottom: 0.85rem;
  line-height: 1.4;
  font-weight: 600;
}

.mh-email-otp__alert.is-visible {
  display: block;
}

.mh-email-otp__alert--error {
  background: rgba(248, 113, 113, 0.15) !important;
  color: #fecaca !important;
  border: 1px solid rgba(248, 113, 113, 0.35) !important;
}

.mh-email-otp__alert--success {
  background: rgba(52, 211, 153, 0.15) !important;
  color: #a7f3d0 !important;
  border: 1px solid rgba(52, 211, 153, 0.35) !important;
}

.mh-email-otp__alert--info {
  background: rgba(19, 182, 236, 0.15) !important;
  color: #bae6fd !important;
  border: 1px solid rgba(19, 182, 236, 0.35) !important;
}

#psLoginModal .mh-email-otp__alert--error,
.ps-booking-modal .mh-email-otp__alert--error {
  background: #fef2f2 !important;
  color: #991b1b !important;
  border: 1px solid #fecaca !important;
}

#psLoginModal .mh-email-otp__alert--success,
.ps-booking-modal .mh-email-otp__alert--success {
  background: #ecfdf5 !important;
  color: #065f46 !important;
  border: 1px solid #a7f3d0 !important;
}

#psLoginModal .mh-email-otp__alert--info,
.ps-booking-modal .mh-email-otp__alert--info {
  background: #eff6ff !important;
  color: #1e40af !important;
  border: 1px solid #bfdbfe !important;
}

.mh-email-otp__step {
  display: none;
  animation: mhOtpIn 0.35s ease;
}

.mh-email-otp__step.is-active {
  display: block;
}

@keyframes mhOtpIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.mh-email-otp__sent {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  padding: 0.85rem 1rem;
  margin-bottom: 1rem;
}

#psLoginModal .mh-email-otp__sent,
.ps-booking-modal .mh-email-otp__sent {
  background: linear-gradient(135deg, rgba(19, 182, 236, 0.08), rgba(43, 111, 214, 0.08));
  border: 1px solid rgba(19, 182, 236, 0.22);
}

.mh-email-otp__sent-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #13b6ec, #2b6fd6);
  color: #fff !important;
  flex-shrink: 0;
  font-size: 1rem;
}

.mh-email-otp__sent-title {
  font-weight: 700;
  color: #fff !important;
  font-size: 0.95rem;
  margin: 0 0 0.15rem;
}

#psLoginModal .mh-email-otp__sent-title,
.ps-booking-modal .mh-email-otp__sent-title {
  color: var(--otp-navy) !important;
}

.mh-email-otp__sent-mail {
  font-size: 0.86rem;
  color: rgba(255, 255, 255, 0.78) !important;
  margin: 0;
  word-break: break-all;
}

#psLoginModal .mh-email-otp__sent-mail,
.ps-booking-modal .mh-email-otp__sent-mail {
  color: #64748b !important;
}

.mh-email-otp__sent-mail strong {
  color: #7de0ff !important;
  font-weight: 700;
}

#psLoginModal .mh-email-otp__sent-mail strong,
.ps-booking-modal .mh-email-otp__sent-mail strong {
  color: var(--otp-navy) !important;
}

.mh-email-otp__label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85) !important;
  margin-bottom: 0.45rem;
}

#psLoginModal .mh-email-otp__label,
.ps-booking-modal .mh-email-otp__label {
  color: #475569 !important;
}

.mh-otp-boxes {
  display: flex;
  gap: 0.45rem;
  justify-content: space-between;
  margin: 0.25rem 0 1rem;
}

.mh-otp-boxes input {
  width: 100%;
  max-width: 3rem;
  height: 3.1rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.96) !important;
  color: #0b1f4d !important;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  caret-color: var(--otp-accent);
}

.mh-otp-boxes input:focus {
  outline: none;
  border-color: #13b6ec !important;
  box-shadow: 0 0 0 3px rgba(19, 182, 236, 0.28);
  transform: translateY(-1px);
}

.mh-otp-boxes input.is-filled {
  border-color: #13b6ec !important;
  background: #f0f9ff !important;
}

.mh-email-otp__timers {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.mh-email-otp__chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  padding: 0.4rem 0.8rem;
  font-size: 0.8rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.1);
  color: #e2e8f0 !important;
}

.mh-email-otp__chip i {
  font-size: 0.85rem;
}

.mh-email-otp__chip--live {
  background: rgba(52, 211, 153, 0.18);
  color: #6ee7b7 !important;
}

.mh-email-otp__chip--warn {
  background: rgba(251, 191, 36, 0.18);
  color: #fcd34d !important;
}

.mh-email-otp__chip--dead {
  background: rgba(248, 113, 113, 0.18);
  color: #fca5a5 !important;
}

#psLoginModal .mh-email-otp__chip--live,
.ps-booking-modal .mh-email-otp__chip--live {
  background: #ecfdf5;
  color: #059669 !important;
}

#psLoginModal .mh-email-otp__chip--warn,
.ps-booking-modal .mh-email-otp__chip--warn {
  background: #fffbeb;
  color: #d97706 !important;
}

#psLoginModal .mh-email-otp__chip--dead,
.ps-booking-modal .mh-email-otp__chip--dead {
  background: #fef2f2;
  color: #dc2626 !important;
}

.mh-email-otp__chip time {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: inherit !important;
}

.mh-email-otp__remember {
  color: rgba(255, 255, 255, 0.88) !important;
  font-size: 0.88rem;
}

.mh-email-otp__remember .form-check-label {
  color: rgba(255, 255, 255, 0.88) !important;
  cursor: pointer;
}

#psLoginModal .mh-email-otp__remember,
#psLoginModal .mh-email-otp__remember .form-check-label,
.ps-booking-modal .mh-email-otp__remember,
.ps-booking-modal .mh-email-otp__remember .form-check-label {
  color: #334155 !important;
}

.mh-email-otp__actions {
  display: grid;
  gap: 0.65rem;
}

/* Resend block — always visible after OTP sent */
.mh-email-otp__resend-box {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  text-align: center;
}

#psLoginModal .mh-email-otp__resend-box,
.ps-booking-modal .mh-email-otp__resend-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
}

.mh-email-otp__resend-label {
  margin: 0 0 0.55rem;
  font-size: 0.88rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.9) !important;
}

#psLoginModal .mh-email-otp__resend-label,
.ps-booking-modal .mh-email-otp__resend-label {
  color: #334155 !important;
}

.mh-email-otp__resend-countdown {
  display: none;
  font-size: 0.92rem;
  font-weight: 600;
  color: #fcd34d !important;
  margin: 0;
}

.mh-email-otp__resend-countdown.is-visible {
  display: block;
}

.mh-email-otp__resend-countdown time {
  font-variant-numeric: tabular-nums;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color: #fff !important;
  background: rgba(0, 0, 0, 0.25);
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  margin-left: 0.2rem;
}

#psLoginModal .mh-email-otp__resend-countdown,
.ps-booking-modal .mh-email-otp__resend-countdown {
  color: #b45309 !important;
}

#psLoginModal .mh-email-otp__resend-countdown time,
.ps-booking-modal .mh-email-otp__resend-countdown time {
  color: #92400e !important;
  background: #fef3c7;
}

.mh-email-otp__resend-btn {
  display: none;
  width: 100%;
  margin-top: 0.15rem;
  border: 0;
  border-radius: 10px;
  padding: 0.65rem 1rem;
  font-weight: 700;
  font-size: 0.92rem;
  color: #0b1f4d !important;
  background: linear-gradient(135deg, #7de0ff 0%, #13b6ec 100%) !important;
  box-shadow: 0 8px 18px rgba(19, 182, 236, 0.28);
}

.mh-email-otp__resend-btn.is-visible {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}

.mh-email-otp__resend-btn:hover:not(:disabled) {
  filter: brightness(1.05);
}

.mh-email-otp__resend-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.mh-email-otp__change {
  border: 0;
  background: none;
  color: #7de0ff !important;
  font-size: 0.82rem;
  font-weight: 700;
  padding: 0;
  margin-top: 0.4rem;
  text-decoration: underline;
  text-underline-offset: 2px;
}

#psLoginModal .mh-email-otp__change,
.ps-booking-modal .mh-email-otp__change {
  color: #2b6fd6 !important;
}

.mh-email-otp .mh-login-btn,
.mh-email-otp .btn-primary {
  position: relative;
}

.mh-email-otp .is-loading {
  pointer-events: none;
  opacity: 0.85;
}

@media (max-width: 420px) {
  .mh-otp-boxes {
    gap: 0.3rem;
  }

  .mh-otp-boxes input {
    height: 2.75rem;
    font-size: 1.1rem;
    border-radius: 10px;
    max-width: none;
  }
}

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

  .mh-otp-boxes input:focus {
    transform: none;
  }
}
