
/* ------------------------------
     🌍 LANGUAGE DIRECTION
  ------------------------------ */
html[dir="rtl"] {
  direction: rtl;
  text-align: right;
}

html[dir="ltr"] {
  direction: ltr;
  text-align: left;
}

/* ------------------------------
     🧱 HEADER STYLES
  ------------------------------ */

/* Container */
.header-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0;
}

/* Header */
.header {
  width: 100%;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: all 0.3s ease;
  /* background: var(--body-bg); */
  display: flex;
  align-items: center;
  justify-content: center;

   box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1); /* subtle shadow */
  background: var(--body-bg); /* keep background for visibility */
}

.header.scrolled {
  background: var(--body-bg);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--header-border);
  box-shadow: 0 2px 5px var(--header-shadow);
}

/* Nav */
.nav {
  padding: 1rem 0;
  padding-inline: 20px;
}

.logo {
  font-size: 1.8rem;
  font-weight: 600;
  display: flex;
  gap: 50px;
  color: var(--text-white);
}

/* Desktop Links */
.nav-links {
  display: flex;
  align-items: center;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: var(--text-secondary-invert);
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

/* Button */
.btn-apply {
  background: var(--text-primary) !important;
  color: var(--gray-100) !important;
  padding: 0.6rem 1.4rem;
  border: none;
  border-radius: 20px;
  cursor: pointer;
  text-align: center;
      transition: all 0.3s ease;
  justify-content: center !important;
}

.btn-apply:hover {
      transition: all 0.3s ease;
  background: var(--text-secondary) !important;
  color: white !important;

}

/* Mobile Menu Button */
.menu-btn {
  background: none;
  border: none;
  font-size: 1.8rem;
  cursor: pointer;
  display: none;
  color: var(--text-secondary-invert);
}

/* Mobile Menu */
.mobile-menu {
  display: none;
  flex-direction: column;
  gap: 1rem;
  padding: 1rem 1.5rem 1.5rem;
  background: var(--body-bg);
  border-bottom: 1px solid var(--mobile-border);
}

.mobile-menu a {
  text-decoration: none;
  color: var(--text-secondary-invert);
  font-size: 1rem;
}

.mobile-menu .btn-apply {
  width: 100%;
}

/* When mobile menu open */
.header.menu-open {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* Responsive */
@media (max-width: 768px) {
  .nav-links {
    display: none;
  }

  .header {
    flex-direction: column;
  }

  .menu-btn {
    display: block;
  }

  .mobile-menu.active {
    display: flex;
    width: 100%;
  }
}

/* ------------------------------
     🌗 TOGGLE BUTTONS (Dark / Lang)
  ------------------------------ */
.theme-toggle,
.lang-toggle {
  position: fixed;
  bottom: 20px;
  border: 1px solid var(--header-border);
  border-radius: 50%;
  width: 45px;
  height: 45px;
  cursor: pointer;
  font-size: 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
  background: var(--mobile-bg);
  color: var(--text-white);
  z-index: 2000;
}

.theme-toggle:hover,
.lang-toggle:hover {
  background: var(--header-bg-scrolled);
}

.theme-toggle {
  right: 20px;
}

.lang-toggle {
  right: 75px;
}


.lang-btn {
  background: transparent;
  border: 1px solid var(--text-secondary-invert);
  color: var(--text-secondary-invert);
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.3s ease;
  font-weight: 500;
}

.lang-btn:hover {
  background: var(--text-secondary-invert);
   color: var(--text-invert);
}



/* From Uiverse.io by cuzpq */
.theme-checkbox {
  --toggle-size: 16px;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 3.25em;
  height: 2.125em;
  background: -webkit-gradient(linear, left top, right top, color-stop(50%, #efefef), color-stop(50%, #2a2a2a)) no-repeat;
  background: -o-linear-gradient(left, #efefef 50%, #2a2a2a 50%) no-repeat;
  background: linear-gradient(to right, #efefef 50%, #2a2a2a 50%) no-repeat;
  background-size: 205%;
  background-position: 0;
  -webkit-transition: 0.4s;
  -o-transition: 0.4s;
  transition: 0.4s;
  border-radius: 99em;
  position: relative;
  cursor: pointer;
  font-size: var(--toggle-size);
}

.theme-checkbox::before {
  content: "";
  width: 1.1em;
  height: 1.1em;
  position: absolute;
  top: 0.438em;
  left: 0.438em;
  background: -webkit-gradient(linear, left top, right top, color-stop(50%, #efefef), color-stop(50%, #2a2a2a)) no-repeat;
  background: -o-linear-gradient(left, #efefef 50%, #2a2a2a 50%) no-repeat;
  background: linear-gradient(to right, #efefef 50%, #2a2a2a 50%) no-repeat;
  background-size: 205%;
  background-position: 100%;
  border-radius: 50%;
  -webkit-transition: 0.4s;
  -o-transition: 0.4s;
  transition: 0.4s;
}

.theme-checkbox:checked::before {
  left: calc(100% - 1.20em - 0.438em);
  background-position: 0;
}

.theme-checkbox:checked {
  background-position: 100%;
}


/* ======================================= */

.avatar-block{
  color: var(--btn-bg-hover);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;

  border:solid 1px var(--btn-bg-hover);
  padding-left: 20px;
  border-radius: 32px;

  p{
    margin: 0;
    font-size: 20px;
  }
}



/* Force dropdown items to NOT have Bootstrap's default link behavior */
.admin-profile .dropdown-item {
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 500;
  font-size: 14px;
  color: var(--text-secondary-invert);
  background: transparent;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  text-decoration: none; /* ← ADD THIS */
}

.admin-profile .dropdown-item:hover {
  background: rgba(0, 0, 0, 0.04);
  color: var(--text-primary);
  transform: translateX(2px);
  text-decoration: none; /* ← ADD THIS */
}

/* Dark mode dropdown item hover */
body.dark-mode .admin-profile .dropdown-item:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-primary);
}

/* Force Bootstrap dropdown to stay open on click (if you want manual close) */
.admin-profile.show .dropdown-menu {
  display: block;
}

/* Optional: Close dropdown only when clicking outside */
.admin-profile .dropdown-menu {
  /* ...existing styles... */
  
  /* Add this if dropdown should close automatically */
  pointer-events: auto;
}

/* ===============================
   👤 ADMIN PROFILE DROPDOWN
================================ */

/* Hide Bootstrap default arrow */
.admin-profile .dropdown-toggle::after {
  display: none !important;
}

/* Admin dropdown button */
.admin-profile .dropdown-toggle {
  background: var(--text-primary) !important; /* Always orange */
  color: var(--gray-100) !important; /* Always white text */
   border-radius: 12px;
  padding: 8px 16px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 12px;
  border: none;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.admin-profile .dropdown-toggle:hover {
   color: var(--text-secondary-invert);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.admin-profile .dropdown-toggle:active {
  transform: translateY(0);
}

/* ===============================
   🏢 PLATFORM + USER IDENTITY
================================ */

.admin-profile .admin-identity {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.3;
  flex: 1;
  min-width: 0;
 }

/* Platform name (Company/Context) */
.admin-profile .platform-name {
  font-size: 13px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.85) !important;
  text-transform: uppercase;
  letter-spacing: 1.8px;
  white-space: normal; /* ← CHANGE FROM nowrap */
  overflow: visible; /* ← CHANGE FROM hidden */
  text-overflow: clip; /* ← CHANGE FROM ellipsis */
  max-width: none; /* ← REMOVE max-width */
  line-height: 1.2; /* ← ADD for multi-line spacing */
}

/* Light mode override for platform name */
body:not(.dark-mode) .admin-profile .platform-name {
  color: rgba(255, 255, 255, 0.85); /* Slightly brighter on orange */
}

/* User name (Identity) */
.admin-profile .admin-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-100) !important;
  white-space: normal; /* ← CHANGE FROM nowrap */
  overflow: visible; /* ← CHANGE FROM hidden */
  text-overflow: clip; /* ← CHANGE FROM ellipsis */
  max-width: none; /* ← REMOVE max-width */
  line-height: 1.3; /* ← ADD for multi-line spacing */
}

/* Admin avatar icon */
.admin-profile .admin-avatar {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.3s ease;
}

.admin-profile .admin-avatar i {
  font-size: 16px;
  color: var(--text-primary-invert);
}

.admin-profile .dropdown-toggle:hover .admin-avatar {
  background: rgba(255, 255, 255, 0.25);
  transform: scale(1.05);
}

/* ===============================
   📋 DROPDOWN MENU
================================ */

.admin-profile .dropdown-menu {
  background: var(--body-bg);
  border: 1px solid var(--header-border);
  border-radius: 12px;
  padding: 8px;
  min-width: 280px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.15);
  margin-top: 8px;
}

/* ===============================
   👤 PROFILE HEADER (in dropdown)
================================ */

.admin-profile .dropdown-header {
  padding: 0;
  margin-bottom: 4px;
}

.admin-profile .profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
  border-radius: 8px;
  margin-bottom: 4px;
}

.admin-profile .profile-avatar {
  width: 48px;
  height: 48px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.admin-profile .profile-avatar i {
  font-size: 20px;
  color: var(--gray-100);
}

.admin-profile .profile-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1;
}

.admin-profile .profile-platform {
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-profile .profile-user {
  font-size: 15px;
  font-weight: 600;
  color: var(--gray-100);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-profile .profile-email {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ===============================
   🔗 DROPDOWN ITEMS
================================ */
 
 

 

.admin-profile .dropdown-item i {
  width: 20px;
  opacity: 0.7;
}

/* Logout item */
.admin-profile .dropdown-item.text-danger {
  color: #dc3545 !important;
}

.admin-profile .dropdown-item.text-danger:hover {
  background: rgba(220, 53, 69, 0.08);
  color: #dc3545 !important;
}

/* Divider */
.admin-profile .dropdown-divider {
  margin: 8px 0;
  border-color: rgba(0, 0, 0, 0.08);
}

body.dark-mode .admin-profile .dropdown-divider {
  border-color: rgba(255, 255, 255, 0.1);
}

/* ===============================
   🌐 RTL SUPPORT
================================ */

html[dir="rtl"] .admin-profile .admin-identity {
  align-items: flex-end;
}

html[dir="rtl"] .admin-profile .dropdown-item:hover {
  transform: translateX(-2px);
}

/* ===============================
   📱 RESPONSIVE
================================ */

@media (max-width: 768px) {
  .admin-profile .platform-name {
    display: none;
  }
  
  .admin-profile .admin-name {
    font-size: 13px;
    max-width: 100px;
  }
  
  .admin-profile .dropdown-menu {
    min-width: 260px;
  }
  
  .admin-profile .admin-avatar {
    width: 32px;
    height: 32px;
  }
  
  .admin-profile .admin-avatar i {
    font-size: 14px;
  }
}