/* ==========================
   Navbar base
   ========================== */
.navbar--site-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030;
    height: 3.2rem;
    /* fixed height */
  background: var(--bs-custom-bg-white-fill);
    overflow: visible;
    display: flex;
    align-items: center;
    padding: 0;
}

.navbar--minimal-nav {
    background: var(--bs-custom-fill);
    box-shadow: none !important;
}

/* Container inside navbar */
.navbar__container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    height: 100%;
    padding: 0 1rem;
}

/* ==========================
   Navbar controls (right side)
   ========================== */
.navbar__controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-left: auto;
}

.navbar__controls .nav-item {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Sidebar toggle button */
.navbar__sidebar-toggle-btn {
    margin-left: 230px;
    /* adjust if sidebar is collapsed */
    transition: margin-left 0.3s ease;
}

/* ==========================
   Mode toggle
   ========================== */
.navbar__mode-toggle-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 1rem;
}

.navbar__mode-change-button {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    padding: 0;
}

.navbar__mode-change-button i {
    font-size: 1.3rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

/* Default icons */
.navbar__mode-change-button .bi-brightness-low {
    display: inline-flex;
}

.navbar__mode-change-button .bi-moon {
    display: none;
}

/* Dark mode icon swap */
.site-html[data-bs-theme="dark"] .navbar__mode-change-button .bi-brightness-low {
    display: none;
}

.site-html[data-bs-theme="dark"] .navbar__mode-change-button .bi-moon {
    display: inline-flex;
}

/* ==========================
   User dropdown
   ========================== */
.navbar-nav {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.navbar__nav-item {
    position: relative;
}

.navbar__nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    color: inherit;
}

.navbar__user-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    margin-right: 0.25rem;
}

.navbar__dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 1035;
    min-width: 300px;
    background: var(--bs-custom-bg-white-fill);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.navbar__dropdown-mode-switch {
    cursor: pointer;
}

/* Divider styling */
.dropdown-divider {
    margin: 0.5rem 0;
    border-top: 1px solid var(--bs-dropdown-divider-bg);
}

/* ==========================
   Links & icons
   ========================== */
/* Base links */
.navbar__nav a,
.navbar__nav .nav-link,
.navbar__nav .dropdown-item {
    color: var(--bs-custom-text-strong) !important;
    /* grey by default */
    background-color: transparent !important;
    text-decoration: none;
    transition: color 0.2s ease;
}

/* Hover state (blue text, no bg) */
.navbar__nav a:hover,
.navbar__nav .nav-link:hover,
.navbar__nav .dropdown-item:hover {
    color: var(--bs-primary) !important;
    background-color: transparent !important;
}

/* Active / selected state (blue text, no bg) */
.navbar__nav .nav-link.active,
.navbar__nav .dropdown-item.active {
    color: var(--bs-primary) !important;
    font-weight: 600;
    background-color: transparent !important;
}

/* Ensure dropdown-item.active outside navbar also works */
.dropdown-item.active {
    color: var(--bs-primary) !important;
    font-weight: 600;
    background-color: transparent !important;
}

/* SVG icons inside nav links */
.navbar__nav svg {
    stroke: var(--bs-custom-options-icon) !important;
    fill: none !important;
    width: 24px !important;
    height: 24px !important;
}

/* Flex gap helper */
.navbar__link.d-flex.gap-2 {
    gap: 0.5rem;
}

/* Rounded helper */
.rounded-circle-custom {
    border-radius: 50%;
}

/* ==========================
   Offcanvas / Mobile drawer
   ========================== */
#mobileNavDrawer {
    width: 350px !important;
    max-width: 80vw;
}

.navbar_responsive {
    transition: transform 0.3s ease-in-out;
}

/* ==========================
   Animations
   ========================== */
.animated--grow-in {
    animation: growIn 0.2s ease-in-out;
}

@keyframes growIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ==========================
   Mobile search input
   ========================== */
.mobile-search-input {
    color: var(--bs-custom-text-strong);
}

.mobile-search-input::placeholder {
    color: var(--bs-custom-text-strong);
    opacity: 0.6;
}

/* ==========================
   Dark mode labels
   ========================== */
.navbar__dark-mode-label span {
    color: inherit;
    transition: color 0.2s ease;
}

.site-html[data-bs-theme="dark"] .navbar__dark-mode-label span {
    color: var(--bs-primary);
}

/* Fix mobile drawer dark mode label in light mode */
.site-html[data-bs-theme="light"] #mobileNavDrawer .navbar__dark-mode-label span {
    color: var(--bs-custom-text-strong) !important;
}

/* ==========================
   Dark mode link overrides
   ========================== */
.site-html[data-bs-theme="dark"] .navbar__nav a,
.site-html[data-bs-theme="dark"] .navbar__nav .nav-link,
.site-html[data-bs-theme="dark"] .navbar__nav .dropdown-item {
    color: var(--bs-custom-text-strong) !important;
}

.site-html[data-bs-theme="dark"] .navbar__nav a:hover,
.site-html[data-bs-theme="dark"] .navbar__nav .nav-link:hover,
.site-html[data-bs-theme="dark"] .navbar__nav .dropdown-item:hover {
    color: var(--bs-primary) !important;
}

.site-html[data-bs-theme="dark"] .navbar__nav .nav-link.active,
.site-html[data-bs-theme="dark"] .navbar__nav .dropdown-item.active {
    color: var(--bs-primary) !important;
    background-color: transparent !important;
}

/* ==========================
   Fix navbar height issue
   ========================== */
.navbar--site-nav,
.navbar__container {
    min-height: 3.2rem;
    height: 3.2rem;
    /* ensures consistent height */
}