/* BDBulkSMS OTP Modal */

#bdbsms-otp-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 99999;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(3px);
}

#bdbsms-otp-overlay[style*="display: block"],
#bdbsms-otp-overlay[style*="display:block"] {
  display: flex !important;
}

#bdbsms-otp-modal {
  background: #fff;
  border-radius: 16px;
  padding: 36px 32px 32px;
  max-width: 400px;
  width: 92%;
  position: relative;
  text-align: center;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  animation: bdbsms-popup 0.25s ease;
}

@keyframes bdbsms-popup {
  from { opacity: 0; transform: scale(0.9) translateY(20px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

#bdbsms-otp-close {
  position: absolute;
  top: 12px;
  right: 14px;
  background: none;
  border: none;
  font-size: 18px;
  cursor: pointer;
  color: #888;
  line-height: 1;
  padding: 4px 6px;
  border-radius: 50%;
  transition: background 0.15s;
}
#bdbsms-otp-close:hover { background: #f0f0f0; color: #333; }

.bdbsms-icon {
  font-size: 48px;
  margin-bottom: 12px;
  line-height: 1;
}

#bdbsms-otp-modal h2 {
  margin: 0 0 8px;
  font-size: 22px;
  color: #1a1a2e;
  font-weight: 700;
}

.bdbsms-subtitle {
  margin: 0 0 20px;
  color: #666;
  font-size: 14px;
  line-height: 1.5;
}

.bdbsms-field {
  margin-bottom: 14px;
}

#bdbsms-phone-input {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  font-size: 16px;
  text-align: center;
  letter-spacing: 1px;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
#bdbsms-phone-input:focus {
  outline: none;
  border-color: #4a90e2;
}

.bdbsms-btn {
  display: block;
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, #4a90e2, #357abd);
  color: #fff;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.15s;
  margin-top: 4px;
}
.bdbsms-btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.bdbsms-btn:active { transform: translateY(0); }
.bdbsms-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* OTP digit boxes */
.bdbsms-otp-boxes {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin: 16px 0;
}

.bdbsms-otp-digit {
  width: 46px;
  height: 52px;
  border: 2px solid #e0e0e0;
  border-radius: 10px;
  text-align: center;
  font-size: 22px;
  font-weight: 700;
  color: #1a1a2e;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.bdbsms-otp-digit:focus {
  outline: none;
  border-color: #4a90e2;
  box-shadow: 0 0 0 3px rgba(74, 144, 226, 0.2);
}

/* Shake animation on wrong OTP */
@keyframes bdbsms-shake {
  0%, 100% { transform: translateX(0); }
  20%       { transform: translateX(-8px); }
  40%       { transform: translateX(8px); }
  60%       { transform: translateX(-5px); }
  80%       { transform: translateX(5px); }
}
.bdbsms-otp-boxes.shake {
  animation: bdbsms-shake 0.5s ease;
}
.shake .bdbsms-otp-digit {
  border-color: #e74c3c;
}

/* Messages */
.bdbsms-msg {
  font-size: 13px;
  margin: 8px 0 0;
  min-height: 18px;
}
.bdbsms-msg.error   { color: #e74c3c; }
.bdbsms-msg.success { color: #27ae60; }

/* Resend link */
.bdbsms-link {
  background: none;
  border: none;
  color: #4a90e2;
  font-size: 13px;
  cursor: pointer;
  padding: 8px 0 0;
  display: block;
  margin: 4px auto 0;
  text-decoration: underline;
}
.bdbsms-link:disabled {
  color: #aaa;
  cursor: not-allowed;
  text-decoration: none;
}

/* Sent info */
#bdbsms-sent-info {
  margin-bottom: 0;
  font-size: 13px;
}

/* Mobile */
@media (max-width: 480px) {
  #bdbsms-otp-modal      { padding: 28px 20px 24px; }
  .bdbsms-otp-digit      { width: 40px; height: 46px; font-size: 20px; }
  .bdbsms-otp-boxes      { gap: 6px; }
}
