/* Registration OTP Modal Styles */
#otp-modal.modal {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  align-items: center;
  justify-content: center;
}

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

#otp-modal .modal-content.modal-card {
  max-width: 420px;
  width: 95%;
  background: white;
  border-radius: 18px;
  padding: 2rem;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  position: relative;
}

#otp-modal .modal-card-image {
  width: 100px;
  height: 100px;
  margin: 0 auto 1rem;
  display: block;
  object-fit: contain;
}

#otp-modal .modal-card-title {
  margin: 0.5rem 0;
  font-size: 1.5rem;
  color: #333;
  font-weight: 600;
}

#otp-modal .modal-card-subtitle {
  margin: 0 0 2rem 0;
  color: #666;
  font-size: 0.9375rem;
}

#otp-modal .otp-input-container {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
}

#otp-modal .otp-input {
  width: 50px;
  height: 50px;
  text-align: center;
  font-size: 1.5rem;
  border: 2px solid #ddd;
  border-radius: 8px;
  transition: all 0.3s ease;
}

#otp-modal .otp-input:focus {
  border-color: #7338A0;
  outline: none;
  box-shadow: 0 0 0 3px rgba(115, 56, 160, 0.1);
}

#otp-modal .submit-button {
  width: 100%;
  margin: 0 auto 16px auto;
  background: #7338A0;
  color: white;
  border: none;
  padding: 14px 20px;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  text-align: center;
}

#otp-modal .submit-button:hover {
  background: #581845;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(115, 56, 160, 0.3);
}

#otp-modal .switch-prompt {
  margin-top: 1rem;
  font-size: 0.875rem;
  color: #666;
}

#otp-modal .switch-prompt a {
  color: #7338A0;
  text-decoration: none;
  font-weight: 600;
}

#otp-modal .switch-prompt a:hover {
  color: #581845;
}

#otp-modal .close-button {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.5rem;
  color: #999;
  text-decoration: none;
  cursor: pointer;
  transition: color 0.3s ease;
}

#otp-modal .close-button:hover {
  color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
  #otp-modal .modal-content.modal-card {
    width: 90%;
    padding: 28px;
  }
  
  #otp-modal .otp-input {
    width: 45px;
    height: 45px;
    font-size: 22px;
  }
  
  #otp-modal .otp-input-container {
    gap: 12px;
  }
  
  #otp-modal .submit-button {
    width: 100%;
    padding: 14px 20px;
    font-size: 16px;
    margin: 0 auto 16px auto;
  }
}

@media (max-width: 640px) {
  #otp-modal .modal-content.modal-card {
    width: 95%;
    padding: 24px;
  }
  
  #otp-modal .otp-input {
    width: 42px;
    height: 42px;
    font-size: 20px;
  }
  
  #otp-modal .modal-card-title {
    font-size: 22px;
  }
  
  #otp-modal .modal-card-subtitle {
    font-size: 15px;
  }
  
  #otp-modal .submit-button {
    width: 100%;
    padding: 14px 16px;
    font-size: 15px;
    margin: 0 auto 16px auto;
  }
}

@media (max-width: 480px) {
  #otp-modal .modal-content.modal-card {
    width: 98%;
    padding: 20px;
  }
  
  #otp-modal .otp-input {
    width: 38px;
    height: 38px;
    font-size: 20px;
  }
  
  #otp-modal .otp-input-container {
    gap: 8px;
  }
  
  #otp-modal .modal-card-title {
    font-size: 20px;
  }
  
  #otp-modal .modal-card-subtitle {
    font-size: 13px;
  }
  
  #otp-modal .modal-card-image {
    width: 80px;
    height: 80px;
  }
  
  #otp-modal .submit-button {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    margin: 0 auto 16px auto;
  }
}

@media (max-width: 360px) {
  #otp-modal .modal-content.modal-card {
    width: 99%;
    padding: 16px;
  }
  
  #otp-modal .otp-input {
    width: 35px;
    height: 35px;
    font-size: 18px;
  }
  
  #otp-modal .otp-input-container {
    gap: 6px;
  }
  
  #otp-modal .modal-card-title {
    font-size: 18px;
  }
  
  #otp-modal .modal-card-subtitle {
    font-size: 12px;
  }
  
  #otp-modal .modal-card-image {
    width: 70px;
    height: 70px;
  }
  
  #otp-modal .submit-button {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    margin: 0 auto 16px auto;
  }
}

/* Landscape orientation for mobile devices */
@media (max-height: 600px) and (orientation: landscape) {
  #otp-modal .modal-content.modal-card {
    max-height: 90vh;
    overflow-y: auto;
    padding: 1rem;
  }
  
  #otp-modal .modal-card-image {
    width: 60px;
    height: 60px;
    margin-bottom: 0.5rem;
  }
  
  #otp-modal .modal-card-title {
    font-size: 1.125rem;
    margin: 0.25rem 0;
  }
  
  #otp-modal .modal-card-subtitle {
    margin-bottom: 1rem;
  }
  
  #otp-modal .otp-input-container {
    margin-bottom: 1rem;
  }
}

/* Touch-friendly improvements */
@media (pointer: coarse) {
  #otp-modal .otp-input {
    min-width: 44px;
    min-height: 44px;
  }
  
  #otp-modal .submit-button {
    min-height: 44px;
    padding: 14px 20px;
    width: 100%;
    margin: 0 auto 16px auto;
  }
  
  #otp-modal .close-button {
    padding: 8px;
    font-size: 28px;
  }
}

/* High DPI display support */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
  #otp-modal .modal-card-image {
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
  }
}
