/**
 * Per-client navigation header (components/nav/_client_navigation_header.html).
 *
 * An icon-tab bar: client name on the left, area tabs (profile / portfolio /
 * recommendations) on the right. Mirrors the platform chrome look of the
 * top app header (.app-nav-icon) but scoped to page content.
 *
 * Tenant-aware: every color comes from a brand/theme token (--contract-*,
 * --do-*, --brand-on-primary), so it adapts to any palette and to the dark
 * theme without per-tenant overrides.
 *
 * Fully namespaced under .nav-header — no global selectors — so adding this
 * sheet to base.html leaves every existing page pixel-identical (the
 * visual-regression gate stays green except on pages that include the partial).
 */

/* Back link — sits above the card, outside it. */
.nav-header__back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.85rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--do-text-muted);
    text-decoration: none;
    transition: var(--transition-base);
}

.nav-header__back:hover {
    color: var(--do-text);
    gap: 0.6rem;
    text-decoration: none;
}

.nav-header__back i {
    font-size: 0.9rem;
}

.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding: 0.9rem 1.25rem;
    margin-bottom: 1.5rem;
    background: var(--do-card-bg);
    border: 1px solid var(--contract-gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
}

/* Identity block: client name + current-area subtitle, stacked. */
.nav-header__identity {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.nav-header__title {
    min-width: 0;
    overflow: hidden;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--do-text);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-header__subtitle {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--do-text-muted);
}

.nav-header__tabs {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.5rem;
}

.nav-header__tab {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    font-size: 1.2rem;
    color: var(--do-text-muted);
    background: transparent;
    border: 1px solid transparent;
    border-radius: var(--radius-md);
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-base);
}

.nav-header__tab:hover {
    color: var(--do-text);
    background: var(--contract-gray-100);
    text-decoration: none;
    transform: translateY(-1px);
}

/* Active area — underline under the icon. Uses the dark brand variant (not the
   bright --contract-primary, which washes out on light brands like Omney yellow). */
.nav-header__tab.is-active,
.nav-header__tab.is-active:hover {
    color: var(--do-text);
    background: transparent;
    border-color: transparent;
    transform: none;
}

.nav-header__tab.is-active::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 1px;
    transform: translateX(-50%);
    width: 22px;
    height: 3px;
    border-radius: 2px;
    background: var(--contract-primary-dark);
}

/* Placeholder areas (page not built yet) — muted and non-interactive. */
.nav-header__tab.is-disabled {
    color: var(--contract-gray-300);
    cursor: not-allowed;
    pointer-events: none;
}

/* "Soon" corner flag on placeholder tabs. */
.nav-header__soon {
    position: absolute;
    top: -7px;
    right: -9px;
    padding: 1px 4px;
    font-size: 0.5rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--do-text-muted);
    background: var(--contract-gray-200);
    border-radius: var(--radius-sm);
}

@media (max-width: 575.98px) {
    .nav-header {
        padding: 0.625rem 1rem;
    }

    .nav-header__title {
        font-size: 1.25rem;
    }

    .nav-header__tab {
        width: 40px;
        height: 40px;
        font-size: 1.1rem;
    }
}
