/* =========================================================
   Fixed Navbar Styles
   ========================================================= */
.fixed-navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  height: var(--navbar-height, 48px);
  background: rgba(249, 249, 251, 0.92);
  border-bottom: 1px solid var(--border, #E5E7EB);
  backdrop-filter: blur(8px);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-sizing: border-box;
}

.fixed-navbar__inner {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(20px, 6vw, 48px);
  height: 100%;
  box-sizing: border-box;
}

body.dark-mode .fixed-navbar {
  background: rgba(17, 17, 17, 0.92);
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

.navbar-logo {
  display: flex;
  align-items: center;
  height: 100%;
  padding: 8px 0;
  text-decoration: none;
  color: var(--text, #3c3c3c);
}

body.dark-mode .navbar-logo {
  color: #FFFFFF;
}

.navbar-logo svg {
  height: 20px;
  width: auto;
  display: block;
}

.fixed-navbar .theme-toggle {
  margin: 0;
}

/* Styles for navbar content (top-nav, language controls, menu toggle) */
.fixed-navbar .top-bar-right {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: nowrap;
  margin-left: auto;
}

.fixed-navbar .top-nav {
  display: flex;
  gap: 20px;
  flex-wrap: nowrap;
  align-items: center;
  font-family: 'TikTokSans-Regular', 'TikTokSans', sans-serif;
  font-size: 0.8rem; /* Adjusted from 0.875rem */
  font-weight: 400;
  order: 1;
}

.fixed-navbar .top-nav a {
  color: var(--text-muted, #9CA3AF);
  transition: color 0.2s ease;
  white-space: nowrap;
  text-decoration: none;
  font-weight: 400;
}

.fixed-navbar .top-nav a:hover {
  color: var(--text-primary, #3c3c3c);
}

.fixed-navbar .language-controls {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  order: 2;
  flex-shrink: 0;
}

.fixed-navbar .language-menu__trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px; /* Reduced padding for flag-only display */
  border-radius: 999px;
  border: 1px solid var(--border, #E5E7EB);
  background: #fff;
  cursor: pointer;
  font-family: 'TikTokSans-Medium', 'TikTokSans', sans-serif;
  font-size: 0.85rem; /* Adjusted from 0.9rem */
  box-shadow: 0 12px 28px -18px rgba(22, 23, 26, 0.45);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fixed-navbar .language-menu__trigger img {
  width: 20px; /* Smaller flag for compact display */
  height: auto;
  object-fit: contain;
}

.fixed-navbar .menu-toggle {
  display: none;
  border: 1px solid var(--border, #E5E7EB);
  background: #fff;
  border-radius: 999px;
  font-family: 'TikTokSans-Medium', 'TikTokSans', sans-serif;
  padding: 6px 14px; /* Adjusted from 8px 16px */
  font-size: 0.85rem; /* Adjusted from 0.92rem */
  gap: 8px;
  align-items: center;
  order: 3;
  cursor: pointer;
}

/* Dark mode styles for navbar content */
body.dark-mode .fixed-navbar .top-nav a {
  color: var(--muted, #9ca3af);
}

body.dark-mode .fixed-navbar .top-nav a:hover {
  color: var(--text, #e5e7eb);
}

body.dark-mode .fixed-navbar .language-menu__trigger {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text, #e5e7eb);
}

body.dark-mode .fixed-navbar .menu-toggle {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--text, #e5e7eb);
}

/* Add padding-top to body when fixed-navbar exists */
body:has(.fixed-navbar) {
  padding-top: var(--navbar-height, 48px);
}

/* Adjust page padding when fixed-navbar exists (for index.html) */
body:has(.fixed-navbar) .page {
  padding-top: 0; /* Remove top padding since body already has padding-top */
}

/* Mobile responsive styles for navbar */
@media (max-width: 768px) {
  .fixed-navbar .top-nav {
    display: none;
  }

  .fixed-navbar .top-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(249, 249, 251, 0.98);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border, #E5E7EB);
    padding: 16px clamp(20px, 6vw, 48px);
    gap: 12px;
    z-index: 999;
  }

  body.dark-mode .fixed-navbar .top-nav.is-open {
    background: rgba(17, 17, 17, 0.98);
    border-bottom-color: rgba(255, 255, 255, 0.12);
  }

  .fixed-navbar .menu-toggle {
    display: flex;
  }

  .fixed-navbar .language-menu__current {
    display: none !important;
  }
}

