/* ──────────────────────────────────────────────────────────────────
   JobsProfileNavbar — shared navbar for Jobs + ProfileCore
   Served from ScholaroWeb RCL at /_content/ScholaroWeb/css/jobs-profile-navbar.css
   Self-contained: hex values throughout so consumers need no token supply.
   Mirrors JobsCore/Jobs/wwwroot/css/site.css so the Razor-rendered navbar
   renders identically to the old Vue AppNavbar.
   Brand: minimal slate (mirrors JobsCore --jb-* tokens)
     #60688b (primary / nav-label)     #434C75 (primary-dark)
     #0F1729 (ink)   #475569 (ink2)    #94A3B8 (ink3)
   ────────────────────────────────────────────────────────────────── */

/* Layout */
.site-navbar {
    background: #ffffff;
    border-bottom: 1px solid #e2e8f0;
    position: sticky;
    top: 0;
    z-index: 1030;
    font-family: 'DM Sans', -apple-system, system-ui, sans-serif;
}

/* Consumers may hide the shared navbar by setting body.hide-shared-navbar
   (e.g. Vue SPA route guard). Keeps Vue/Razor coordination declarative. */
body.hide-shared-navbar #jobsProfileNavbar { display: none; }

.site-navbar .navbar-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 52px;
}

/* Left section — logo + pipe + product name */
.site-navbar .nav-left {
    display: flex;
    align-items: center;
    gap: 8px;
}
.site-navbar .nav-logo {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    text-decoration: none;
}
.site-navbar .logo-img {
    height: 26px;
    width: auto;
    object-fit: contain;
}
.site-navbar .nav-logo-pipe {
    font-family: 'DM Sans', -apple-system, system-ui, sans-serif;
    color: #7b767a;
    font-size: 1.75rem;
    font-weight: 400;
    line-height: 1;
    user-select: none;
}
.site-navbar .nav-logo-product {
    font-family: 'DM Sans', -apple-system, system-ui, sans-serif;
    font-size: 1.6rem;
    font-weight: 400;
    color: #615d60;
    text-decoration: none;
    letter-spacing: -0.01em;
    text-transform: lowercase; /* wordmark reads "jobs" to match the "scholaro" logo */
    transition: color 0.2s cubic-bezier(.4, 0, .2, 1);
}
.site-navbar .nav-logo-product:hover,
.site-navbar .nav-logo-product:visited {
    color: #615d60;
    text-decoration: none;
}
.site-navbar .nav-logo-product:focus-visible {
    outline: 2px solid #60688b;
    outline-offset: 2px;
    border-radius: 2px;
}

/* Right section — nav items */
.site-navbar .nav-right {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
}

/* Nav items — flat with bottom bar */
.site-navbar .nav-item {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    text-decoration: none;
    color: #60688b;
    cursor: pointer;
    position: relative;
    background: transparent;
    font-family: inherit;
    border: none;
    border-radius: 0;
    height: auto;
    transition: color 0.2s ease;
}
.site-navbar .nav-item::after {
    content: '';
    position: absolute;
    bottom: -14px;
    left: 0;
    right: 0;
    height: 3px;
    background: transparent;
    border-radius: 3px 3px 0 0;
    transition: background 0.2s ease;
}
.site-navbar .nav-item:hover {
    color: #60688b;
    text-decoration: none;
}
.site-navbar .nav-item:hover::after { background: #60688b; }
.site-navbar .nav-item.active {
    color: #60688b;
    font-weight: 600;
}
.site-navbar .nav-item.active::after { background: #60688b; }

.site-navbar .nav-icon {
    font-size: 15px;
    line-height: 1;
    opacity: 0.75;
}
.site-navbar .nav-item:hover .nav-icon,
.site-navbar .nav-item.active .nav-icon { opacity: 1; }

.site-navbar .nav-label {
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.site-navbar .nav-divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 8px;
    flex-shrink: 0;
}

/* ── Profile pill button ── */
.site-navbar .jb-profile-wrapper {
    position: relative;
    padding: 0 4px;
}
.site-navbar .jb-profile-btn {
    display: flex;
    align-items: center;
    gap: 0;
    padding: 0;
    border: 1px solid rgba(96, 104, 139, 0.18);
    background: transparent;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    border-radius: 1.375rem;
    overflow: visible;
    height: 34px;
    position: relative;
    font-family: inherit;
    color: inherit;
    text-decoration: none;
}
.site-navbar .jb-profile-btn:hover {
    border-color: rgba(96, 104, 139, 0.42);
    box-shadow: 0 3px 10px rgba(96, 104, 139, 0.18);
    text-decoration: none;
}

/* Signed-in avatar (white circle, slate ring + initials) */
.site-navbar .jb-profile-avatar {
    width: 40px;
    height: 37px;
    background: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    margin: -3px 0 -3px -3px;
    border-radius: 50%;
    box-shadow: inset 0 0 0 1.5px #434C75;
    z-index: 1;
}

/* Guest avatar — light slate fill, tinted ring */
.site-navbar .jb-profile-avatar-guest {
    background: #EFF0F3;
    box-shadow: inset 0 0 0 1.5px rgba(96, 104, 139, 0.30);
    color: #60688b;
    z-index: 2;
}

.site-navbar .jb-profile-initials {
    color: #434C75;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.site-navbar .jb-profile-info {
    display: flex;
    align-items: center;
    padding: 0 5px 0 10px;
    gap: 10px;
    height: 100%;
}
.site-navbar .jb-profile-email-text {
    font-size: 0.9125rem;
    font-weight: 500;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #60688b;
}
/* Guest "Sign In" text — slate accent */
.site-navbar .jb-profile-btn-guest .jb-profile-email-text {
    color: #434C75;
    font-weight: 600;
}

.site-navbar .jb-profile-arrow {
    transition: transform 0.2s ease, color 0.2s ease;
    color: #94A3B8;
    flex-shrink: 0;
    padding-right: 6px;
}
.site-navbar .jb-profile-btn[aria-expanded="true"] .jb-profile-arrow {
    transform: rotate(180deg);
    color: #475569;
}

/* ── Dropdown menu ── */
.site-navbar .jb-profile-dropdown {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    min-width: 280px;
    width: max-content;
    max-width: 330px;
    z-index: 2000;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    padding: 0 0 0.75rem 0;
    animation: jbDropdownIn 0.2s ease-out;
}
.site-navbar .jb-profile-dropdown[hidden] { display: none; }

@keyframes jbDropdownIn {
    from { opacity: 0; transform: translateY(-6px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.site-navbar .jb-profile-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    margin-bottom: 0.5rem;
    background: #f5f5f5;
    white-space: nowrap;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
    border-bottom: 1px solid #e9ecef;
}
.site-navbar .jb-avatar-lg {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    box-shadow: inset 0 0 0 2px #434C75;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
}
.site-navbar .jb-avatar-lg-initials {
    color: #434C75;
    font-size: 1.125rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.site-navbar .jb-profile-name {
    font-size: 1rem;
    text-align: center;
    overflow-wrap: anywhere;
    margin: 0;
}
.site-navbar .jb-profile-email {
    font-size: 0.9rem;
    color: #6c757d;
    text-align: center;
    word-break: break-all;
    margin: 2px 0 0;
}
.site-navbar .jb-profile-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0 0 0.5rem 0;
    border: none;
}

.site-navbar .jb-profile-link {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 1rem;
    border: none;
    background: none;
    text-align: left;
    cursor: pointer;
    transition: all 0.15s ease;
    font-size: 0.875rem;
    font-family: inherit;
    color: #495057;
    text-decoration: none;
    box-sizing: border-box;
}
.site-navbar .jb-profile-link:hover {
    background: #f8f9fa;
    text-decoration: none;
    color: #212529;
}
.site-navbar .jb-profile-link:hover svg { color: #60688b; }
.site-navbar .jb-profile-link svg {
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.15s ease;
}
.site-navbar .jb-profile-logout-form {
    margin: 0;
    padding: 0;
}
.site-navbar .jb-profile-link-button {
    font-family: inherit;
}

/* ── Mobile toggle + menu ── */
.site-navbar .nav-mobile-toggle {
    display: none;
    border: none;
    background: none;
    color: rgba(0, 0, 0, 0.6);
    cursor: pointer;
    padding: 4px;
    margin-left: auto;
    border-radius: 4px;
    transition: background 0.2s ease;
}
.site-navbar .nav-mobile-toggle:hover { background: #f3f3f3; }

.site-navbar .mobile-menu {
    border-top: 1px solid #e2e8f0;
    padding: 8px 0;
    background: #ffffff;
    animation: jbMobileMenuIn 0.2s ease-out;
}
.site-navbar .mobile-menu[hidden] { display: none; }

@keyframes jbMobileMenuIn {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

.site-navbar .mobile-menu-item {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    padding: 10px 16px;
    font-size: 15px;
    color: #0F1729;
    text-decoration: none;
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
}
.site-navbar .mobile-menu-item:hover {
    background: #f3f3f3;
    text-decoration: none;
    color: #60688b;
}
.site-navbar .mobile-menu-item svg {
    color: #60688b;
    flex-shrink: 0;
}
.site-navbar .mobile-menu-item:hover svg { color: #60688b; }

/* ── Responsive breakpoints ── */
@media (max-width: 768px) {
    .site-navbar .nav-logo-pipe,
    .site-navbar .nav-logo-product { display: none; }
    .site-navbar .nav-right { display: none; }
    .site-navbar .nav-mobile-toggle { display: flex; align-items: center; }
}

@media (min-width: 769px) {
    .site-navbar .mobile-menu { display: none !important; }
}

@media (max-width: 480px) {
    .site-navbar .jb-profile-email-text { display: none; }
    .site-navbar .jb-profile-btn {
        border: none;
        box-shadow: none;
        background: transparent;
    }
    .site-navbar .jb-profile-info { display: none; }
    .site-navbar .jb-profile-avatar {
        margin: 0;
        width: 42px;
        height: 42px;
    }
    .site-navbar .jb-profile-arrow { display: none; }
}

/* ── Saved jobs pill + popover (desktop, non-employer) ── */
.site-navbar .saved-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.site-navbar .saved-trigger {
    position: relative;
    font-family: inherit;
    font-size: inherit;
}
.site-navbar .nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 2px;
    border-radius: 999px;
    background: #60688b;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
}
.site-navbar .saved-popover {
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    width: 340px;
    max-width: 90vw;
    z-index: 2000;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    padding: 0;
    animation: jbDropdownIn 0.18s ease-out;
    overflow: hidden;
}
.site-navbar .saved-popover[hidden] { display: none; }
.site-navbar .saved-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.site-navbar .saved-popover-title {
    font-size: 14px;
    font-weight: 700;
    color: #0F1729;
}
.site-navbar .saved-popover-clear {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #94A3B8;
    font-size: 12px;
    font-family: inherit;
    transition: color 0.15s ease;
}
.site-navbar .saved-popover-clear:hover { color: #0F1729; }
.site-navbar .saved-popover-empty {
    padding: 24px 16px;
    text-align: center;
    font-size: 14px;
    color: #94A3B8;
    line-height: 1.5;
}
.site-navbar .saved-popover-empty[hidden] { display: none; }
.site-navbar .saved-popover-list {
    max-height: 300px;
    overflow-y: auto;
    padding: 8px 0;
}
.site-navbar .saved-popover-list[hidden] { display: none; }
.site-navbar .saved-popover-footer {
    padding: 8px 16px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
    background: #fff;
}
.site-navbar .saved-popover-footer-link {
    font-size: 13px;
    font-weight: 600;
    color: #60688b;
    text-decoration: none;
}
.site-navbar .saved-popover-footer-link:hover { text-decoration: underline; }

.site-navbar .mobile-menu-item-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    margin-left: auto;
    padding: 0 6px;
    border-radius: 999px;
    background: #60688b;
    color: #ffffff;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}
.site-navbar .mobile-menu-item-badge[hidden] { display: none; }

.site-navbar .saved-popover-signin {
    padding: 10px 16px;
    border-top: 1px solid #e2e8f0;
    font-size: 12px;
    color: #64748b;
    text-align: center;
    background: #f4f6f9;
}
.site-navbar .saved-popover-signin a {
    color: #60688b;
    font-weight: 600;
    margin-left: 4px;
    text-decoration: none;
}
.site-navbar .saved-popover-signin a:hover { text-decoration: underline; }
.site-navbar .saved-popover-item {
    display: flex;
    gap: 12px;
    padding: 10px 16px;
    color: #0F1729;
    text-decoration: none;
    transition: background 0.15s ease;
}
.site-navbar .saved-popover-item:hover {
    background: #fff7ed;
    text-decoration: none;
    color: #0F1729;
}
.site-navbar .saved-popover-item .saved-icon {
    flex-shrink: 0;
    margin-top: 2px;
    color: #60688b;
    fill: currentColor;
}
.site-navbar .saved-popover-item-title {
    font-size: 13px;
    font-weight: 600;
    line-height: 1.35;
}
.site-navbar .saved-popover-item-company {
    font-size: 11px;
    color: #94A3B8;
}
