/* =============================================
   auth.css — تصميم نافذة تسجيل الدخول
   منصة مسار
   ============================================= */

/* ===== الغطاء الخلفي ===== */
.auth-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.auth-modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ===== النافذة المنبثقة ===== */
.auth-modal {
  background: linear-gradient(145deg, #1a1a2e, #16213e, #0f3460);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 24px;
  padding: 40px 36px;
  width: 100%;
  max-width: 420px;
  text-align: center;
  position: relative;
  direction: rtl;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 168, 83, 0.15);
  transform: scale(0.9) translateY(20px);
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.auth-modal-overlay.active .auth-modal {
  transform: scale(1) translateY(0);
}

/* ===== زر الإغلاق ===== */
.auth-modal-close {
  position: absolute;
  top: 16px;
  left: 16px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.6);
  font-size: 1.3rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  line-height: 1;
}

.auth-modal-close:hover {
  background: rgba(239, 68, 68, 0.2);
  border-color: rgba(239, 68, 68, 0.4);
  color: #f87171;
}

/* ===== الشعار ===== */
.auth-modal-logo {
  margin-bottom: 20px;
  display: flex;
  justify-content: center;
}

/* ===== العنوان ===== */
.auth-modal-title {
  font-family: 'Cairo', sans-serif;
  font-size: 1.5rem;
  font-weight: 900;
  color: #ffffff;
  margin: 0 0 10px;
}

.auth-modal-subtitle {
  font-family: 'Cairo', sans-serif;
  font-size: 0.95rem;
  color: rgba(255, 255, 255, 0.55);
  margin: 0 0 28px;
  line-height: 1.6;
}

/* ===== أزرار تسجيل الدخول ===== */
.auth-btns {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 22px;
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  padding: 14px 20px;
  border-radius: 14px;
  border: none;
  font-family: 'Cairo', sans-serif;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s ease;
  position: relative;
  overflow: hidden;
}

.auth-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0);
  transition: background 0.2s ease;
}

.auth-btn:hover::after {
  background: rgba(255, 255, 255, 0.08);
}

.auth-btn:active {
  transform: scale(0.97);
}

/* جوجل */
.auth-btn-google {
  background: #ffffff;
  color: #1a1a2e;
  box-shadow: 0 4px 20px rgba(255, 255, 255, 0.1);
}

.auth-btn-google:hover {
  box-shadow: 0 8px 30px rgba(255, 255, 255, 0.2);
  transform: translateY(-2px);
}

/* فيسبوك */
.auth-btn-facebook {
  background: linear-gradient(135deg, #1877f2, #0d5fc9);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(24, 119, 242, 0.3);
}

.auth-btn-facebook:hover {
  box-shadow: 0 8px 30px rgba(24, 119, 242, 0.5);
  transform: translateY(-2px);
}

/* ===== ملاحظة الخصوصية ===== */
.auth-modal-note {
  font-family: 'Cairo', sans-serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.3);
  line-height: 1.6;
}

/* ===== تجاوبي ===== */
@media (max-width: 480px) {
  .auth-modal {
    padding: 32px 20px;
    border-radius: 20px;
  }

  .auth-modal-title {
    font-size: 1.25rem;
  }
}

/* ===== القائمة المنسدلة للمستخدم ===== */
.user-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 230px;
  background: linear-gradient(145deg, #1e1e35, #16213e);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  padding: 8px;
  z-index: 9999;
  box-shadow: 0 16px 50px rgba(0, 0, 0, 0.5);
  direction: rtl;
  animation: dropdownIn 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dropdownIn {
  from { opacity: 0; transform: scale(0.9) translateY(-8px); }
  to   { opacity: 1; transform: scale(1) translateY(0); }
}

.user-dropdown-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
}

.user-dropdown-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d4a853;
  flex-shrink: 0;
}

.user-dropdown-avatar-placeholder {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(212, 168, 83, 0.15);
  border: 2px solid #d4a853;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  flex-shrink: 0;
}

.user-dropdown-name {
  font-family: 'Cairo', sans-serif;
  font-weight: 700;
  font-size: 0.92rem;
  color: #fff;
}

.user-dropdown-email {
  font-family: 'Cairo', sans-serif;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.45);
  direction: ltr;
  text-align: right;
}

.user-dropdown-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 6px 0;
}

.user-dropdown-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  color: #f87171;
  font-family: 'Cairo', sans-serif;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.2s ease;
  text-align: right;
}

.user-dropdown-item:hover {
  background: rgba(239, 68, 68, 0.12);
}

.user-dropdown-item-profile {
  color: rgba(255, 255, 255, 0.85) !important;
}
.user-dropdown-item-profile:hover {
  background: rgba(212, 168, 83, 0.12) !important;
  color: #d4a853 !important;
}
