/* الجسم */
body {
  font-family: "Tajawal", sans-serif;
  background: linear-gradient(180deg, #f8fbff, #e9f1ff);
  margin: 0;
  padding: 0;
  overflow-x: hidden;

}

/* الغلاف الخارجي للمودال */
.razaq-auth-overlay {
  position: fixed;
  inset: 0;
  background-color: rgba(0, 0, 0, 0.5);
  display: none;
  justify-content: center;
  align-items: center; /* ✅ يجعل المودال بالمنتصف عموديًا */
  z-index: 9999;
  overflow-y: auto; /* يسمح بتمرير المودال نفسه عند الطول الزائد */
  padding: 30px 10px; /* فراغ علوي وسفلي خفيف حتى بالموبايل */
}

/* ✅ عرض المودال */
.razaq-auth-overlay.open {
  display: flex;
}

/* ✅ صندوق المودال نفسه */
.razaq-auth-modal {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  width: 95vw;
  max-width: 480px;
  max-height: 90vh; /* ما يتعدى 90% من الشاشة */
  overflow-y: auto; /* تمرير داخلي فقط */
  overflow-x: hidden;
  padding: 35px 25px 30px;
  position: relative;
  text-align: center;
  animation: fadeIn 0.4s ease;
  box-sizing: border-box;
}

  /* ✅ يمنع أي تمرير أفقي */
  overflow-x: hidden !important;
  overflow-y: auto; /* يسمح فقط بالتمرير العمودي */
}

body {
  overflow-x: hidden !important; /* يمنع التمرير الأفقي من الصفحة كلها */
}


/* زر X */
.razaq-auth-close {
  position: absolute;
  top: 15px;
  left: 15px;
  background-color: #007bff;
  color: #fff;
  border: none;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-size: 18px;
  cursor: pointer;
  transition: background 0.3s ease;
  z-index: 10;
}

.razaq-auth-close:hover {
  background-color: #0056b3;
}

/* العنوان */
.razaq-auth-brand {
  font-size: 20px;
  font-weight: 700;
  color: #0077ff;
  margin-bottom: 20px;
}

/* تبويبات تسجيل الدخول/حساب */
.razaq-auth-tabs {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 25px;
}

.razaq-tab {
  flex: 1;
  padding: 10px 15px;
  background: #f0f0f0;
  border: none;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s ease;
}

.razaq-tab.active {
  background: linear-gradient(90deg, #0077ff, #00bfff);
  color: #fff;
}

.razaq-tab:hover {
  background-color: #e0e0e0;
}

/* محتوى تسجيل الدخول / إنشاء الحساب */
.razaq-auth-content {
  position: relative;
  z-index: 1;
  max-height: 70vh;       /* المودال ما يتعدى 70% من الشاشة */
  overflow-y: auto;        /* يخلي المحتوى يمرّر */
  padding-right: 8px;      /* حتى السكروول ما يغطي النص */
  scrollbar-width: thin;   /* شريط تمرير نحيف */
  scrollbar-color: #ccc transparent;
}


.razaq-auth-modal input[type="text"],
.razaq-auth-modal input[type="email"],
.razaq-auth-modal input[type="password"],
.razaq-auth-modal input[type="tel"] {
  width: 100%;
  padding: 12px 15px;
  margin-bottom: 15px;
  border: 1px solid #ccd6e3;
  border-radius: 10px;
  font-size: 15px;
  transition: 0.3s ease;
  box-sizing: border-box;
  background: #fff;
}
.razaq-auth-modal input:focus {
  border-color: #0077ff;
  box-shadow: 0 0 6px rgba(0, 119, 255, 0.3);
  outline: none;
}
.razaq-auth-modal button[type="submit"] {
  width: 100%;
  padding: 12px;
  background: linear-gradient(90deg, #0077ff, #00bfff);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.razaq-auth-modal button[type="submit"]:hover {
  transform: scale(1.03);
  background: linear-gradient(90deg, #0066e6, #00a9e6);
  box-shadow: 0 6px 20px rgba(0, 119, 255, 0.25);
}
.razaq-auth-modal .links {
  margin-top: 10px;
  font-size: 14px;
  color: #666;
}

.razaq-auth-modal .links a {
  color: #0077ff;
  text-decoration: none;
  margin: 0 6px;
  font-weight: 600;
  transition: 0.2s;
}

.razaq-auth-modal .links a:hover {
  color: #005fd1;
}
/* ✅ ضمان إلغاء أي شريط أفقي من الجسم */
body {
  overflow-x: hidden !important;
}

/* ✅ تأكيد عدم السماح للـ modal بتجاوز */
.razaq-auth-modal {
  overflow-x: visible !important;
  box-sizing: border-box;
}

/* ✅ تأكد أن أي عنصر داخل modal ما يتجاوز */
.razaq-auth-modal * {
  max-width: 100% !important;
  box-sizing: border-box;
  word-wrap: break-word;
    
}
/* ✅ الحل النهائي لمنع التمدد الأفقي تماماً */
.razaq-auth-modal {
  width: calc(100vw - 30px); /* يقلل العرض قليلًا لتفادي الشريط */
  max-width: 420px;
  overflow-x: hidden !important;
  box-sizing: border-box;
}

.razaq-auth-modal * {
  max-width: 100% !important;
  box-sizing: border-box;
  overflow-x: hidden !important;
  word-wrap: break-word;
}
.razaq-auth-modal * {
  max-width: 100% !important;
  max-height: 100% !important;
  box-sizing: border-box;
  overflow: hidden !important;
}
/* توحيد شكل كل الحقول داخل المودال */
.razaq-auth-form input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 12px;
  text-align: right;
  font-family: inherit;
  transition: border-color 0.2s ease-in-out;
}

.razaq-auth-form input:focus {
  border-color: #2563eb;
  outline: none;
}
/* عمودين متساويين */
.razaq-auth-grid {
  display: grid !important;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
  width: 100%;
  margin: 0 auto;
  padding: 0;
}

/* جعل الحقول داخل الشبكة نفس التنسيق */
.razaq-auth-grid input {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ddd;
  border-radius: 10px;
  padding: 12px;
  text-align: right;
  font-family: inherit;
  transition: border-color 0.2s ease-in-out;
}

.razaq-auth-grid input:focus {
  border-color: #2563eb;
  outline: none;
}
/* ✅ منع التمرير الجانبي بدون ما يتأثر الشكل */
html, body {
  overflow-x: hidden !important;
  width: 100%;
}

/* المودال يبقى مضبوط وجميل */
.razaq-auth-modal {
  overflow-x: hidden !important;   /* يمنع أي تمرير جانبي */
  overflow-y: auto;                /* يسمح فقط بالعمودي */
  margin: 0 auto;
  max-width: 480px;
  width: 95vw;
  box-sizing: border-box;
  border-radius: 18px;
}

/* محتوى المودال الداخلي */
.razaq-auth-content {
  overflow-x: hidden !important;
  max-width: 100%;
  padding-right: 8px;
  box-sizing: border-box;
}

/* ضمان عدم تمدد أي عنصر داخلي بدون ما نكسر التخطيط */
.razaq-auth-modal * {
  max-width: 100%;
  box-sizing: border-box;
  word-wrap: break-word;
}
/* ✅ يمنع تمرير الصفحة أثناء فتح المودال */
body.razaq-modal-open {
  overflow: hidden !important;
}

/* ✅ المودال نفسه يسمح بالتمرير العمودي داخله فقط */
.razaq-auth-modal {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 90vh;  /* يمنع المودال من تجاوز ارتفاع الشاشة */
}

/* ✅ تأكد أن المحتوى الداخلي ما يولّد تمرير خارجي */
.razaq-auth-content {
  overflow-y: auto;
  overflow-x: hidden;
  max-height: 80vh;  /* يخلي المحتوى يتمرّر داخليًا فقط */
}
/* ✅ تأثير عند التركيز على الحقول */
.razaq-auth-modal input:focus {
  border-color: #0077ff;
  background: #ffffff;
  box-shadow: 0 0 8px rgba(0, 119, 255, 0.3),
              0 0 0 2px rgba(0, 191, 255, 0.1); /* توهج أزرق ناعم */
  outline: none;
  transition: all 0.25s ease;
}

/* ✨ تأثير دخول ناعم لما يمرّ المؤشر على الحقل */
.razaq-auth-modal input:hover {
  border-color: #00bfff;
  transition: all 0.2s ease;
}
.razaq-auth-overlay {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.55);
  z-index: 9999 !important;
}

.razaq-auth-overlay.open {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
}
