/* BehzadPro OTP Auth Modal */
.bb-otp-overlay {
  position: fixed;
  inset: 0;
  z-index: 100050;
  background: rgba(10, 16, 36, 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}
.bb-otp-overlay.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.bb-otp-overlay[hidden] {
  display: none !important;
  pointer-events: none !important;
}

.bb-otp-modal {
  position: fixed;
  z-index: 100060;
  top: 50%;
  left: 50%;
  width: min(420px, calc(100vw - 28px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  transform: translate(-50%, -46%) scale(0.92);
  opacity: 0;
  pointer-events: none;
  border-radius: 28px;
  background:
    linear-gradient(160deg, rgba(255, 252, 246, 0.97) 0%, rgba(252, 247, 237, 0.95) 55%, rgba(248, 240, 226, 0.98) 100%);
  box-shadow:
    0 30px 80px rgba(16, 27, 56, 0.35),
    0 0 0 1px rgba(218, 179, 105, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  transition:
    opacity 0.4s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.bb-otp-modal.active {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, -50%) scale(1);
}

.bb-otp-glow {
  position: absolute;
  inset: -40% -20% auto;
  height: 180px;
  background: radial-gradient(ellipse at center, rgba(218, 179, 105, 0.35), transparent 70%);
  pointer-events: none;
  animation: bbOtpGlow 4s ease-in-out infinite alternate;
}
.bb-otp-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(28px);
  pointer-events: none;
  opacity: 0.55;
}
.bb-otp-orb--1 {
  width: 120px;
  height: 120px;
  top: -30px;
  right: -20px;
  background: rgba(133, 37, 54, 0.25);
  animation: bbOtpFloat 7s ease-in-out infinite;
}
.bb-otp-orb--2 {
  width: 90px;
  height: 90px;
  bottom: 40px;
  left: -24px;
  background: rgba(19, 126, 121, 0.22);
  animation: bbOtpFloat 9s ease-in-out infinite reverse;
}

@keyframes bbOtpGlow {
  from { opacity: 0.55; transform: scale(1); }
  to { opacity: 1; transform: scale(1.08); }
}
@keyframes bbOtpFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(14px); }
}

.bb-otp-close {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 3;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: rgba(16, 27, 56, 0.08);
  color: var(--navy, #101b38);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.2s, transform 0.2s;
}
.bb-otp-close:hover {
  background: rgba(133, 37, 54, 0.12);
  transform: rotate(90deg);
}

.bb-otp-inner {
  position: relative;
  z-index: 2;
  padding: 36px 28px 28px;
}

.bb-otp-brand {
  text-align: center;
  margin-bottom: 26px;
}
.bb-otp-logo-wrap {
  width: 72px;
  height: 72px;
  margin: 0 auto 14px;
  border-radius: 22px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, #101b38, #1a2d5c);
  box-shadow: 0 12px 28px rgba(16, 27, 56, 0.28);
  animation: bbOtpPop 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.bb-otp-logo {
  width: 44px;
  height: 44px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.2));
}
.bb-otp-eyebrow {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--wine, #852536);
}
.bb-otp-title {
  margin: 0 0 8px;
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--navy, #101b38);
}
.bb-otp-sub {
  margin: 0;
  font-size: 0.9rem;
  color: rgba(16, 27, 56, 0.65);
  line-height: 1.7;
}

.bb-otp-label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--navy, #101b38);
}
.bb-otp-phone-wrap {
  position: relative;
  margin-bottom: 10px;
}
.bb-otp-phone-icon {
  position: absolute;
  top: 50%;
  right: 14px;
  transform: translateY(-50%);
  color: var(--gold, #dab369);
  font-size: 1.05rem;
  pointer-events: none;
}
.bb-otp-input {
  width: 100%;
  height: 54px;
  border-radius: 16px;
  border: 1.5px solid rgba(16, 27, 56, 0.12);
  background: rgba(255, 255, 255, 0.85);
  padding: 0 46px 0 16px;
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--navy, #101b38);
  transition: border-color 0.25s, box-shadow 0.25s, transform 0.25s;
  outline: none;
  font-family: inherit;
}
.bb-otp-input:focus {
  border-color: var(--gold, #dab369);
  box-shadow: 0 0 0 4px rgba(218, 179, 105, 0.22);
  transform: translateY(-1px);
}
.bb-otp-hint {
  margin: 0 0 18px;
  font-size: 0.78rem;
  color: rgba(16, 27, 56, 0.5);
}

.bb-otp-btn {
  width: 100%;
  height: 54px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(120deg, #101b38 0%, #1e3466 45%, #852536 100%);
  background-size: 200% 100%;
  box-shadow: 0 14px 28px rgba(16, 27, 56, 0.28);
  transition: background-position 0.4s, transform 0.2s, box-shadow 0.2s;
  position: relative;
  overflow: hidden;
}
.bb-otp-btn:hover:not(:disabled) {
  background-position: 100% 0;
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(133, 37, 54, 0.28);
}
.bb-otp-btn:disabled {
  opacity: 0.7;
  cursor: wait;
}
.bb-otp-btn-arrow {
  transition: transform 0.25s;
}
.bb-otp-btn:hover .bb-otp-btn-arrow {
  transform: translateX(-4px);
}
.bb-otp-btn.is-loading .bb-otp-btn-text,
.bb-otp-btn.is-loading .bb-otp-btn-arrow {
  opacity: 0;
}
.bb-otp-btn-loader {
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2.5px solid rgba(255,255,255,0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: bbOtpSpin 0.7s linear infinite;
}
@keyframes bbOtpSpin {
  to { transform: rotate(360deg); }
}

.bb-otp-digits {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  align-items: center;
  gap: clamp(6px, 2.2vw, 10px);
  width: 100%;
  max-width: 100%;
  margin: 0 auto 18px;
  padding: 0 2px;
  box-sizing: border-box;
  direction: ltr;
}
.bb-otp-digit {
  flex: 0 0 auto;
  width: clamp(40px, 11vw, 48px);
  max-width: 48px;
  min-width: 36px;
  height: clamp(46px, 12vw, 52px);
  box-sizing: border-box;
  border-radius: 12px;
  border: 1.5px solid rgba(16, 27, 56, 0.12);
  background: rgba(255, 255, 255, 0.95);
  text-align: center;
  font-size: clamp(1.05rem, 4vw, 1.25rem);
  font-weight: 800;
  color: var(--navy, #101b38);
  outline: none;
  padding: 0;
  margin: 0;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
  font-family: inherit;
  -moz-appearance: textfield;
}
.bb-otp-digit::-webkit-outer-spin-button,
.bb-otp-digit::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.bb-otp-digit:focus {
  border-color: var(--gold, #dab369);
  box-shadow: 0 0 0 3px rgba(218, 179, 105, 0.25);
  transform: scale(1.04);
}
.bb-otp-digit.is-filled {
  border-color: rgba(19, 126, 121, 0.45);
  background: rgba(19, 126, 121, 0.06);
}

.bb-otp-sent-to {
  text-align: center;
  margin: 0 0 16px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--navy, #101b38);
}
.bb-otp-footer-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}
.bb-otp-link {
  border: 0;
  background: none;
  color: var(--teal, #137e79);
  font-family: inherit;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  padding: 4px 0;
  transition: color 0.2s, opacity 0.2s;
}
.bb-otp-link:hover:not(:disabled) {
  color: var(--wine, #852536);
}
.bb-otp-link:disabled {
  opacity: 0.45;
  cursor: default;
  color: rgba(16, 27, 56, 0.45);
}

.bb-otp-msg {
  min-height: 1.4em;
  margin: 14px 0 0;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--wine, #852536);
}
.bb-otp-msg.is-ok {
  color: var(--teal, #137e79);
}
.bb-otp-legal {
  margin: 12px 0 0;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(16, 27, 56, 0.4);
}

.bb-otp-panel {
  animation: bbOtpSlideIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes bbOtpSlideIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bbOtpPop {
  from { opacity: 0; transform: scale(0.7); }
  to { opacity: 1; transform: scale(1); }
}

.bb-otp-panel--success {
  text-align: center;
  padding: 20px 0 10px;
}
.bb-otp-check {
  width: 72px;
  height: 72px;
  margin: 0 auto 16px;
}
.bb-otp-check svg {
  width: 72px;
  height: 72px;
  stroke: var(--teal, #137e79);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.bb-otp-check circle {
  stroke-dasharray: 166;
  stroke-dashoffset: 166;
  animation: bbOtpStroke 0.6s ease-out forwards;
}
.bb-otp-check path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: bbOtpStroke 0.35s 0.45s ease-out forwards;
}
@keyframes bbOtpStroke {
  to { stroke-dashoffset: 0; }
}
.bb-otp-success-msg {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 900;
  color: var(--navy, #101b38);
}

body.bb-otp-open {
  overflow: hidden;
}

/* My Account OTP card */
.bb-otp-account-card {
  max-width: 440px;
  margin: 40px auto;
  padding: 36px 28px;
  border-radius: 28px;
  background: linear-gradient(160deg, #fffdf8, #fcf7ed);
  box-shadow: 0 20px 50px rgba(16, 27, 56, 0.12);
  text-align: center;
  border: 1px solid rgba(218, 179, 105, 0.35);
}
.bb-otp-account-card h2 {
  margin: 0 0 10px;
  color: var(--navy, #101b38);
  font-size: 1.4rem;
}
.bb-otp-account-card p {
  margin: 0 0 22px;
  color: rgba(16, 27, 56, 0.65);
  line-height: 1.8;
}
.bb-otp-account-card .bb-otp-btn {
  max-width: 280px;
  margin: 0 auto;
}

@media (max-width: 480px) {
  .bb-otp-modal {
    border-radius: 24px 24px 0 0;
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    max-height: 92vh;
    transform: translateY(100%);
  }
  .bb-otp-modal.active {
    transform: translateY(0);
  }
  .bb-otp-digit {
    width: 42px;
    max-width: 42px;
    height: 48px;
    font-size: 1.1rem;
  }
}
