/**
 * v3 careerweb — nav.
 * Sticky header: logo (image, max 200×44), search (max 520px), location
 * pill, filters button, phone button (hidden until JS shows), theme
 * toggle. Mobile layout / icon-only collapses live in responsive.css.
 */

.nav {
    display: flex;
    align-items: center;
    gap: 24px;
    padding: 14px 32px;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}

/* ─── Logo slot ─── */
.logo {
    display: flex;
    align-items: center;
    height: 44px;
    flex-shrink: 0;
    text-decoration: none;
    color: inherit;
}
.logo-img {
    max-height: 44px;
    max-width: 200px;
    width: auto;
    height: auto;
    display: block;
    object-fit: contain;
    object-position: left center;
}
/* Most tenant logos are dark on light — invert in dark mode when the
   tenant has opted in via the .invert-on-dark class. JS may add that
   class once we know the logo's dominant color (TBD). */
[data-theme="dark"] .logo-img.invert-on-dark {
    filter: invert(1) hue-rotate(180deg);
}

/* ─── Keyword search input ─── */
.nav-search {
    flex: 1;
    max-width: 520px;
    position: relative;
}
.nav-search input {
    width: 100%;
    height: 40px;
    /* No keyboard-shortcut hint anymore (mobile devices have no kbd,
       and the visual hint ate ~36px of input). responsive.css bumps
       the right padding back up to ~52px on ≤860px to clear the
       embedded .nav-search-filter button. */
    padding: 0 14px 0 40px;
    font-size: 13.5px;
    background: var(--surface-2);
    border: 1px solid transparent;
    border-radius: var(--radius);
    color: var(--ink);
    transition: all 150ms ease;
    outline: none;
}
.nav-search input::placeholder { color: var(--ink-3); }
.nav-search input:hover { background: var(--surface-3); }
.nav-search input:focus {
    background: var(--surface);
    border-color: var(--border-2);
    box-shadow: 0 0 0 3px var(--brand-ring);
}
.nav-search .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--ink-3);
    font-size: 16px;
    pointer-events: none;
}
/* Embedded filter trigger inside the search bar. Hidden by default
   (the standalone .filters-btn carries the label on desktop) and
   shown on ≤860px via responsive.css so mobile users get filter
   right next to the keyword field, reading as one cohesive control.
   Anchored absolute to the search bar; a hairline divider on its
   left edge signals the boundary between input and action. */
.nav-search-filter {
    display: none;
    position: absolute;
    top: 4px;
    right: 4px;
    bottom: 4px;
    width: 36px;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-left: 1px solid var(--border);
    color: var(--ink-2);
    cursor: pointer;
    padding: 0;
    transition: color 120ms ease, background 120ms ease;
}
.nav-search-filter:hover {
    color: var(--ink);
    background: var(--surface-3);
    border-radius: 0 var(--radius) var(--radius) 0;
}
/* Suppress the default browser focus outline; the :focus-visible
   rule below paints the brand ring only for keyboard navigation
   so a mouse click → close → focus-still-on-button doesn't leave a
   stray ring behind. */
.nav-search-filter:focus { outline: none; }
.nav-search-filter:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: -2px;
    border-radius: 0 var(--radius) var(--radius) 0;
}
.nav-search-filter i { font-size: 17px; }
/* Position the count badge in the top-right corner of the embedded
   filter button so an active-filter count is visible without the
   text label. */
.nav-search-filter .filters-count {
    position: absolute;
    top: -3px;
    right: -3px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    font-size: 10px;
    line-height: 16px;
}

/* ─── Location pill ─── */
.nav-location {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 12px 0 14px;
    background: transparent;
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    color: var(--ink);
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    transition: all 150ms ease;
    flex-shrink: 0;
}
.nav-location:hover {
    background: var(--surface-2);
    border-color: var(--ink-3);
}
.nav-location:focus-visible {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
}
.nav-location > i:first-child {
    font-size: 18px;
    color: var(--ink-2);
    flex-shrink: 0;
}
.nav-location .chevron {
    font-size: 14px;
    color: var(--ink-3);
    margin-left: 2px;
}
.nav-location-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
    gap: 2px;
}
.nav-location-label {
    font-size: 10px;
    color: var(--ink-3);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    font-family: 'Archivo', sans-serif;
}
.nav-location-value {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
    font-family: 'Archivo', sans-serif;
    letter-spacing: -0.01em;
}

/* ─── Phone CTA ─── */
.nav-phone {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    padding: 0 14px;
    background: transparent;
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    color: var(--ink);
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
    transition: all 150ms ease;
    flex-shrink: 0;
}
.nav-phone:hover {
    background: var(--surface-2);
    border-color: var(--ink-3);
}
.nav-phone:focus-visible {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
}
.nav-phone > i:first-child {
    font-size: 18px;
    color: var(--brand);  /* icon picks up brand so the number reads as the action */
    flex-shrink: 0;
}
.nav-phone-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    line-height: 1;
    gap: 3px;
}
.nav-phone-label {
    font-size: 10px;
    color: var(--ink-3);
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
    font-family: 'Archivo', sans-serif;
}
.nav-phone-number {
    font-family: 'Archivo', sans-serif;
    font-size: 13.5px;
    font-weight: 700;
    color: var(--ink);
    letter-spacing: -0.01em;
}

/* ─── Filters button (with count badge) ─── */
.filters-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 14px;
    background: transparent;
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
    transition: all 120ms ease;
    white-space: nowrap;
    flex-shrink: 0;
}
.filters-btn:hover {
    background: var(--surface-2);
    border-color: var(--ink-3);
}
.filters-btn:focus-visible {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-ring);
}
.filters-btn i { font-size: 16px; color: var(--ink-2); }
.filters-count {
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    background: var(--brand);
    color: var(--brand-on);
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-family: 'JetBrains Mono', monospace;
}
.filters-count[hidden] { display: none; }

/* ─── Right-side icon group ─── */
.nav-actions { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.icon-btn {
    width: 36px;
    height: 36px;
    border-radius: var(--radius);
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--ink-2);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all 120ms ease;
}
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn i { font-size: 18px; }
