/* خلفية منبثقة */
#loginModal {
  display: none; /* مخفي افتراضياً */
  position: fixed;
  z-index: 99999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5); /* أسود شفاف 50% */
  justify-content: center;
  align-items: flex-start;
  padding-top: 60px;
}

/* الصندوق */
.login-container {
  max-width: 400px;
  margin: 50px auto;
  padding: 30px;
  background: #f9f9f9; /* خلفية داكنة */
  border-radius: 10px;
  border: 1px solid #ffcc00; /* حدود ذهبية */
  box-shadow: 0 4px 12px rgba(255,174,0,0.4); /* ظل ذهبي أنيق */
  text-align: center;
  font-family: 'Cairo', sans-serif;
  color: #000; /* النص أبيض */

  max-height: 0;
  opacity: 0;
  transition: max-height 0.5s ease, opacity 0.5s ease;
}

/* عند الفتح */
#loginModal.show .login-container {
  max-height: 600px;
  opacity: 1;
}

/* الحقول مع أيقونات */
.input-group {
  position: relative;
  width: 80%;
  margin: 0 auto 15px;
}

.icon-img {
  position: absolute;
  top: 50%;
  left: 10px;
  transform: translateY(-50%);
  width: 20px;   /* حجم الأيقونة */
  height: 20px;
  pointer-events: none; /* لا تتداخل مع الكتابة */
}

.input-group input {
  width: 100%;
  padding: 12px 12px 12px 12px; /* مساحة للأيقونة */
  border: 1px solid #444;
  border-radius: 6px;
  font-size: 15px;
  background: #f9f9f9;
  color: #000;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.input-group input:focus {
  border-color: #ffcc00;
  outline: none;
  box-shadow: 0 0 5px rgba(255,174,0,0.6);
}


/* زر الدخول */
.login-container button {
  margin-top: 10px;
  width: 100%;
  padding: 12px;
  background-color: #ffcc00; /* زر ذهبي */
  color: #000;
  border: none;
  border-radius: 6px;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-container button:hover {
  background-color: #cc8c00; /* أغمق عند الهوفر */
  color: #fff;
}



/* زر الإغلاق */
.login-container .close {
  position: absolute;
  top: 10px;
  left: 10px;              /* أعلى يسار */
  font-size: 22px;
  font-weight: bold;
  color: #666;
  cursor: pointer;
  transition: color 0.3s;
}
.login-container .close:hover {
  color: #ff4d4d;          /* أحمر عند المرور */
}

/* رسالة الخطأ */
#error {
  margin: 10px 0;
  font-size: 14px;
  color: #ff4d4d;       /* أحمر واضح */
  text-align: center;
  font-weight: bold;
  white-space: nowrap;  /* يمنع تكسير الكلمات */
  white-space: normal; /* يسمح بظهور النص كسطر واحد متصل */

}

/* على الشاشات الصغيرة */
@media (max-width: 600px) {
  #error {
    font-size: 13px;
    white-space: normal; /* يسمح بظهور النص كسطر واحد متصل */
  }
}




/* استجابة للشاشات الصغيرة */
@media (max-width: 600px) {
  .login-container {
    width: 95%;
    margin: 20px auto;
    padding: 20px;
  }
  .login-container h2 { font-size: 1.2rem; }
  .input-group input,
  .login-container button {
    font-size: 14px;
    padding: 10px;
  }
}
