/* Auth Modal Styles */
.auth-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  z-index: 1000;
  justify-content: center;
  align-items: center;
  font-family: 'Cairo', sans-serif;
  direction: rtl;
}

.auth-modal-content {
  background-color: #b7a9f1;
  padding: 2rem;
  border-radius: 8px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  position: relative;
  animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
  from { opacity: 0; transform: translateY(-20px); }
  to { opacity: 1; transform: translateY(0); }
}

.close-modal {
  position: absolute;
  left: 1rem;
  top: 1rem;
  font-size: 1.9rem;    
  font-weight: 900;
  cursor: pointer;
  color: hsl(0, 0%, 3%);
  transition: color 0.2s;
}

.close-modal:hover {
  color: #333;
}

.auth-modal h2 {
  margin-top: 0;
  color: hsl(0, 0%, 1%);
  text-align: center;
  margin-bottom: 1.5rem;
    font-size: 2rem;    
    font-weight: 1500;
}

.auth-form .form-group {
  margin-bottom: 1.2rem;
}

.auth-form label {
  display: block;
  margin-bottom: 0.5rem;
  color: hwb(0 2% 98%);
  font-weight: 800;
    font-size: 1.1rem;
}

.auth-form input {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: border-color 0.3s;
}

.auth-form input:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}

.auth-form .btn-primary {
  width: 100%;
  padding: 0.75rem;
  background-color: #3498db;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 1.5rem;
  font-weight: 900;
  cursor: pointer;
  transition: background-color 0.3s;
}

.auth-form .btn-primary:hover {
  background-color: #2980b9;
}

.auth-message {
  margin-top: 1rem;
  padding: 0.75rem;
  border-radius: 4px;
  text-align: center;
  font-size: 0.9rem;
}

.auth-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.auth-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* User info in header */
.user-info {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-info span {
  color: #2c3e50;
  font-weight: 600;
}

/* ===============================================
   User Dropdown Menu Styles
   - Added for the user profile dropdown functionality
   - Includes styles for the menu button and dropdown
   =============================================== */
.header-actions {
  position: relative;
  display: inline-block;
}

#userMenuBtn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  background: transparent !important; /* يخلي الخلفية شفافة */
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
}

 #userMenuBtn .user-caret {
  font-size: 0.9rem;
  opacity: 0.85;
 }

#userMenuBtn:hover {
  background-color: #2980b9;
}

#userMenuBtn i {
  font-size: 1rem;
}

.user-dropdown {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  min-width: 220px;
  margin-top: 0.6rem;
  border-radius: 14px;
  z-index: 1001;
  overflow: hidden;

  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.28);

  opacity: 0;
  visibility: hidden;
  transform: translateY(8px) scale(0.98);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

 .user-dropdown.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
 }

 .dropdown-header {
  padding: 0.85rem 0.95rem;
 }

 .dropdown-name {
  display: block;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.05rem;
  line-height: 1.3;
 }

 .dropdown-separator {
  height: 1px;
  background: rgba(255, 255, 255, 0.14);
 }

.dropdown-item {
  width: 100%;
  padding: 0.8rem 0.95rem;
  text-align: right;
  border: none;
  background: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.92);
  font-size: 1.05rem;
  font-weight: 900;
  transition: background-color 0.2s, transform 0.12s;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0.6rem;
}

 .dropdown-item span[aria-hidden="true"] {
  width: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
 }

.dropdown-item:hover {
  background: rgba(255, 255, 255, 0.10);
}

 .dropdown-item:active {
  transform: translateY(1px);
 }

 .dropdown-danger {
  color: rgba(255, 255, 255, 0.95);
 }

 .dropdown-danger i {
  color: rgba(255, 122, 150, 0.95);
 }

/* Adjust header actions for RTL */
.header-actions {
  margin-right: 0;
  margin-left: 1rem;
}


/* ===========================
   Sidebar Navigation Centering
   =========================== */
/* الوضع العادي - Desktop */
.main-nav ul {
  display: flex;
  flex-direction: row;   /* يخلي العناصر جنب بعض */
  justify-content: flex-start;
  align-items: center;
  gap: 1rem;             /* مسافة بين العناصر */
  list-style: none;
  margin: 0;
  padding: 0;
}

/* الوضع في الموبايل - القائمة الجانبية */
@media (max-width: 991px) {
  .auth-modal .main-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;   /* وسطن العمود */
    align-items: center;       /* وسطن أفقي */
    height: 100vh;             /* يخلي القائمة بطول الشاشة */
    background: rgba(123, 151, 243, 0.95); /* شبه شفاف */
          /* خليها بنفس لون القائمة */
  }

  .auth-modal .main-nav ul {
    display: flex;
    flex-direction: column;   /* يخليهم تحت بعض */
    justify-content: center;  /* وسطن عمودي */
    align-items: center;      /* وسطن أفقي */
    height: 100%;
    text-align: center;
    padding: 0;
    margin: 0;
    width: 100%;
  }

  .auth-modal .main-nav ul li {
    margin: 1rem 0;
    width: 100%;
  }

  .auth-modal .main-nav ul li a {
    display: block;
    width: 100%;
    font-size: 1.8rem;
    font-weight: 900;
    color: hsl(0, 82%, 98%);
    text-decoration: none;
  }
}



/* Responsive styles */
/* ===============================================
   Responsive Adjustments for Mobile Devices
   - Ensures proper display on smaller screens
   - Adjusts dropdown positioning for RTL layout
   =============================================== */
@media (max-width: 480px) {
  .auth-modal-content {
    width: 90%;
    margin: 0 auto;
    padding: 1.5rem;
  }
  
  .user-info {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
  
  .user-dropdown {
    right: 0;
  }
 
  
  
/* للتابلت */
@media (max-width: 991px) {
  .header-actions .btn-secondary {
    padding: 0.5rem 1rem;
    font-size: 1rem;
  }
}

/* للموبايل */
@media (max-width: 600px) {
  .header-actions .btn-secondary {
    width: 100%;          /* يخلي الزر بعرض الشاشة */
    text-align: center;   /* يخلي النص في النص */
    font-size: 1rem;
    padding: 0.6rem;
  }
}

}
