/* Mobile Modal Styles - Full Screen / Bottom Sheet */
.mobile-modal-overlay {
  position: fixed !important; /* تأكد من أن الموضع ثابت ولا يتم تجاوزه */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: flex-end; /* Align content to bottom for mobile sheet effect */
  justify-content: center;
  z-index: 999999999 !important; /* زيادة z-index لضمان الظهور فوق كل شيء */
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  padding: 0; /* No padding for full screen/bottom sheet */
  box-sizing: border-box;
}
.mobile-modal-overlay.active {
  opacity: 1;
  visibility: visible;
  display: flex;
}
.mobile-modal-content {
  background: white;
  border-radius: 20px 20px 0 0; /* Rounded top corners */
  box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
  padding: 20px;
  max-width: 100%; /* Full width on mobile */
  width: 100%;
  max-height: 90vh; /* Max height for bottom sheet */
  overflow-y: auto;
  position: relative;
  opacity: 0;
  transform: translateY(100%); /* Start off-screen */
  transition: opacity 0.3s ease, transform 0.3s ease;
  box-sizing: border-box;
}
.mobile-modal-overlay.active .mobile-modal-content {
  opacity: 1 !important;
  transform: translateY(0%) !important; /* Slide up */
}
.mobile-modal-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #6b7280;
  line-height: 1;
  padding: 5px;
  z-index: 1;
  -webkit-tap-highlight-color: transparent;
}
.mobile-modal-close:hover {
  color: #1f2937;
}
/* Adjust form inside modal */
.mobile-modal-content .multi-otp-container {
  margin: 0;
  box-shadow: none;
  border: none;
  padding: 0;
}
.mobile-modal-content .multi-otp-card {
  box-shadow: none;
  border: none;
  padding: 0;
}
.mobile-modal-content .multi-otp-card::before {
  display: none;
}

/* Trigger Icon Styles */
.mobile-otp-trigger-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 45px;
  height: 45px;
  background: linear-gradient(135deg, #0ea5e9, #3b82f6); /* Example color */
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  color: white;
  font-size: 20px;
  font-weight: bold;
  text-decoration: none;
  position: relative;
  border: none;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.mobile-otp-trigger-icon:hover,
.mobile-otp-trigger-icon:focus {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}
.mobile-otp-trigger-icon svg {
  fill: currentColor;
  width: 20px;
  height: 20px;
}

/* Prevent body scroll when modal is open */
body.mobile-modal-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
}

/* Desktop Responsive for Mobile Modal (should ideally not be shown on desktop) */
@media (min-width: 769px) {
  .mobile-modal-overlay {
    align-items: center; /* Center on desktop if it appears */
  }
  .mobile-modal-content {
    max-width: 420px; /* Constrain width on desktop */
    border-radius: 20px; /* Full rounded corners on desktop */
    transform: translateY(0%); /* No slide up on desktop */
  }
}
