/* ============================================
   Modern Header/Navigation Styles
   ============================================ */

/* Modern Header Base */
.header {
  background: linear-gradient(135deg, hsl(var(--base-h), var(--base-s), calc(var(--base-l) - 45%)) 0%, hsl(var(--base-h), var(--base-s), calc(var(--base-l) - 50%)) 100%) !important;
  backdrop-filter: blur(20px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
  transition: all 0.3s ease;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.header.fixed-header {
  background: linear-gradient(135deg, hsl(var(--base-h), var(--base-s), calc(var(--base-l) - 45%)) 0%, hsl(var(--base-h), var(--base-s), calc(var(--base-l) - 50%)) 100%) !important;
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.4);
}

/* Modern Navbar */
.header .navbar {
  padding: 12px 0;
}

@media (max-width: 1199px) {
  .header .navbar {
    padding: 10px 0;
  }
}

/* Modern Logo */
.navbar-brand.modern-logo {
  position: relative;
  padding: 8px 0;
  transition: transform 0.3s ease;
}

.navbar-brand.modern-logo:hover {
  transform: scale(1.02);
}

.navbar-brand.modern-logo img {
  max-height: 42px;
  width: auto;
  transition: all 0.3s ease;
}

@media (max-width: 991px) {
  .navbar-brand.modern-logo img {
    max-height: 36px;
  }
}

/* Modern Nav Menu */
.navbar-nav.nav-menu {
  gap: 8px !important;
}

.nav-item .nav-link {
  color: rgba(255, 255, 255, 0.9) !important;
  font-weight: 500;
  font-size: 15px;
  padding: 0 16px !important;
  height: 44px;
  display: flex;
  align-items: center;
  border-radius: 10px;
  transition: all 0.3s ease;
  position: relative;
}

.nav-item .nav-link:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #fff !important;
}

.nav-item .nav-link.active,
.nav-item .nav-link[aria-current="page"] {
  background: rgba(255, 255, 255, 0.2);
  color: #fff !important;
}

/* Modern Dropdown Icon */
.nav-item__icon {
  margin-left: 4px;
  transition: transform 0.3s ease;
}

.nav-item.dropdown.show .nav-item__icon {
  transform: rotate(180deg);
}

/* Modern Dropdown Menu */
.dropdown-menu {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
  padding: 6px !important;
  margin-top: 8px !important;
  min-width: 140px;
}

.dropdown-menu__list {
  margin-bottom: 2px;
}

.dropdown-menu__list:last-child {
  margin-bottom: 0;
}

.dropdown-menu__link {
  color: #2c3e50 !important;
  padding: 8px 12px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 500;
  transition: all 0.2s ease !important;
  display: block;
}

.dropdown-menu__link:hover {
  background: hsla(var(--base-h), var(--base-s), var(--base-l), 0.1) !important;
  color: hsl(var(--base)) !important;
}

/* Modern Header Right Section */
.header-right {
  gap: 3px;
  align-items: center;
}

/* Modern Header Buttons */
.header-right__button {
  width: 44px !important;
  height: 44px !important;
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 12px !important;
  color: rgba(255, 255, 255, 0.9) !important;
  font-size: 20px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  transition: all 0.3s ease !important;
  cursor: pointer;
}

.header-right__button:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
}

.header-right__button.language {
  padding: 4px !important;
  overflow: hidden;
}

.header-right__button.language img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 8px;
}

/* Modern Wallet Wrapper */
.header-right .wallet-wrapper .wallet {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 12px;
  padding: 0 16px;
  height: 44px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.header-right .wallet-wrapper .wallet:hover {
  background: rgba(255, 255, 255, 0.25);
  transform: translateY(-2px);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.header-right .wallet-wrapper .wallet .text {
  color: #fff;
  font-weight: 600;
  font-size: 14px;
}

/* .header-right .wallet-wrapper .wallet::after {
  color: hsl(var(--base));
} */

/* Modern Wallet List */
.header-right .wallet-wrapper .wallet-list {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
  padding: 8px !important;
  margin-top: 8px !important;
}

.header-right .wallet-wrapper .wallet-list__item {
  padding: 4px !important;
}

.header-right .wallet-wrapper .wallet-list__link {
  color: #2c3e50 !important;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 500;
  transition: all 0.3s ease !important;
}

.header-right .wallet-wrapper .wallet-list__link:hover {
  background: hsla(var(--base-h), var(--base-s), var(--base-l), 0.1) !important;
  color: hsl(var(--base)) !important;
  transform: translateX(4px);
}

/* Modern Account Popup */
.header-right .account-wrapper .account-popup {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 16px !important;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
  padding: 0 !important;
  margin-top: 8px !important;
  min-width: 280px;
  overflow: hidden;
}

.header-right .account-wrapper .account-popup .account-header {
  background: linear-gradient(135deg, hsl(var(--base)) 0%, hsl(var(--base-h), var(--base-s), calc(var(--base-l) - 10%)) 100%);
  padding: 20px !important;
  border-radius: 0 !important;
}

.header-right .account-wrapper .account-popup .account-header h5 {
  margin-bottom: 8px;
  font-size: 18px;
}

.header-right .account-wrapper .account-popup .account-header .badge {
  border-radius: 6px !important;
  padding: 4px 10px !important;
  font-size: 11px !important;
  font-weight: 600 !important;
}

.header-right .account-wrapper .account-popup .account-list {
  padding: 12px 8px !important;
  border-top: none !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.header-right .account-wrapper .account-popup .account-list__item {
  margin-bottom: 4px !important;
}

.header-right .account-wrapper .account-popup .account-list__link {
  color: #2c3e50 !important;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 500;
  transition: all 0.3s ease !important;
}

.header-right .account-wrapper .account-popup .account-list__link:hover {
  background: hsla(var(--base-h), var(--base-s), var(--base-l), 0.1) !important;
  color: hsl(var(--base)) !important;
  transform: translateX(4px);
}

.header-right .account-wrapper .account-popup .logout-btn {
  padding: 14px 20px !important;
  color: #e74c3c !important;
  font-weight: 600 !important;
  text-align: center;
  border-radius: 0 !important;
  transition: all 0.3s ease !important;
}

.header-right .account-wrapper .account-popup .logout-btn:hover {
  background: rgba(231, 76, 60, 0.1) !important;
  color: #c0392b !important;
}

/* Modern Language List */
.header-right .language-wrapper .language-list {
  background: #fff !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12) !important;
  padding: 8px !important;
  margin-top: 8px !important;
}

.header-right .language-wrapper .language-list__item {
  margin-bottom: 4px !important;
}

.header-right .language-wrapper .language-list__item:last-child {
  margin-bottom: 0 !important;
}

.header-right .language-wrapper .language-list__link {
  color: #2c3e50 !important;
  padding: 10px 16px !important;
  border-radius: 8px !important;
  font-size: 14px !important;
  font-weight: 500;
  transition: all 0.3s ease !important;
  display: flex !important;
  align-items: center !important;
  gap: 10px;
}

.header-right .language-wrapper .language-list__link:hover {
  background: hsla(var(--base-h), var(--base-s), var(--base-l), 0.1) !important;
  color: hsl(var(--base)) !important;
}

.header-right .language-wrapper .language-list__link .thumb {
  width: 28px !important;
  height: 28px !important;
  border-radius: 6px;
  overflow: hidden;
}

.header-right .language-wrapper .language-list__link .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.header-right .language-wrapper .language-list__link .text {
  flex: 1;
}

/* Modern Mobile Toggle Button */
.navbar-toggler.header-button {
  background: rgba(255, 255, 255, 0.15) !important;
  border: 1px solid rgba(255, 255, 255, 0.2) !important;
  border-radius: 8px !important;
  padding: 0 !important;
  color: rgba(255, 255, 255, 0.9) !important;
  transition: all 0.3s ease;
  width: 40px !important;
  height: 40px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

.navbar-toggler.header-button:hover {
  background: rgba(255, 255, 255, 0.25) !important;
  color: #fff !important;
  transform: scale(1.05);
}

.navbar-toggler.header-button i {
  font-size: 20px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
}

/* Desktop Menu Styles - Reset mobile styles */
@media (min-width: 1200px) {
  .navbar-collapse {
    background: transparent !important;
    backdrop-filter: none !important;
    border-radius: 0 !important;
    margin-top: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
    border: none !important;
  }

  .navbar-toggler.header-button {
    display: none !important;
  }
}

/* Mobile Menu Styles */
@media (max-width: 1199px) {
  .header {
    background: linear-gradient(135deg, hsl(var(--base-h), var(--base-s), calc(var(--base-l) - 45%)) 0%, hsl(var(--base-h), var(--base-s), calc(var(--base-l) - 50%)) 100%) !important;
  }

  .navbar-collapse {
    background: rgba(0, 0, 0, 0.85) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 16px !important;
    margin-top: 16px !important;
    padding: 16px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
  }

  .navbar-nav.nav-menu {
    gap: 4px;
  }

  .nav-item .nav-link {
    padding: 12px 16px !important;
    color: rgba(255, 255, 255, 0.9) !important;
  }

  .nav-item .nav-link:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
  }

  .dropdown-menu {
    border: none !important;
    box-shadow: none !important;
    background: rgba(255, 255, 255, 0.08) !important;
    margin-top: 4px !important;
    margin-left: 16px !important;
  }

  .dropdown-menu__link {
    color: rgba(255, 255, 255, 0.9) !important;
  }

  .dropdown-menu__link:hover {
    background: rgba(255, 255, 255, 0.15) !important;
    color: #fff !important;
  }

  .header-right {
    padding: 12px 0 0 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin-top: 12px;
  }
}

/* Smooth Animations */
@keyframes slideDown {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dropdown-menu.show,
.wallet-list.show,
.language-list.show,
.account-popup.show {
  animation: slideDown 0.3s ease;
}

/* Notification Badge Modern Style */
.header-right .notification-wrapper .notification .badge {
  background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%) !important;
  border: 2px solid #fff;
  box-shadow: 0 2px 8px rgba(255, 107, 107, 0.4);
}

/* Sticky Header Enhancement */
.header.fixed-header {
  animation: slideDown 0.3s ease;
}

/* Focus States for Accessibility */
.nav-link:focus,
.header-right__button:focus,
.dropdown-menu__link:focus {
  outline: 2px solid hsl(var(--base));
  outline-offset: 2px;
}

/* Responsive Adjustments */
@media (max-width: 767px) {
  .navbar-brand.modern-logo img {
    max-height: 32px;
  }

  .header-right__button {
    width: 40px !important;
    height: 40px !important;
    font-size: 18px !important;
  }

  .header-right .wallet-wrapper .wallet {
    padding: 8px 12px;
    font-size: 13px;
  }
}

/* Dark Mode Support (if needed in future) */
@media (prefers-color-scheme: dark) {
  .header {
    border-bottom-color: rgba(255, 255, 255, 0.1);
  }

  .nav-item .nav-link {
    color: #e2e8f0 !important;
  }
}