/* Organism: global-nav — top-level tab bar for report navigation */

.bn-global-nav {
    display: flex;
    align-items: stretch;
    gap: 0;
    border-bottom: 1px solid var(--bn-colour-border);
    margin-bottom: var(--bn-space-lg);
}

.bn-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--bn-space-sm);
    padding: 0.6rem 1rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-family: var(--bn-font-body);
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--bn-colour-muted);
    cursor: pointer;
    transition: color var(--bn-transition-fast), border-color var(--bn-transition-fast);
    white-space: nowrap;
}

.bn-tab:hover {
    color: var(--bn-colour-text);
}

.bn-tab.active {
    color: var(--bn-colour-accent);
    border-bottom-color: var(--bn-colour-accent);
}

/* Spacer pushes icon tabs to the right */
.bn-tab-spacer {
    flex: 1;
}

/* Icon-only utility tabs (Settings, About) */
.bn-tab-icon {
    padding: 0.6rem 0.75rem;
}

.bn-tab-icon svg {
    display: block;
}

/* Tab panels — only the active one is visible */
.bn-tab-panel {
    display: none;
}

.bn-tab-panel.active {
    display: block;
}

/* Session sub-navigation (inside Sessions tab) */
.bn-session-subnav {
    display: flex;
    align-items: center;
    gap: var(--bn-space-md);
    padding: 0.5rem 0;
    margin-bottom: var(--bn-space-md);
    border-bottom: 1px solid var(--bn-colour-border);
}

.bn-session-back {
    display: inline-flex;
    align-items: center;
    gap: var(--bn-space-sm);
    background: none;
    border: none;
    font-family: var(--bn-font-body);
    font-size: 0.88rem;
    color: var(--bn-colour-accent);
    cursor: pointer;
    padding: 0.3rem 0.5rem;
    border-radius: var(--bn-radius-md);
    transition: background var(--bn-transition-fast);
}

.bn-session-back:hover {
    background: var(--bn-hover-bg);
}

.bn-session-label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--bn-colour-text);
}

/* Project tab: dashboard grid */
.bn-dashboard {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--bn-space-lg);
}

.bn-dashboard-pane {
    border: 1px solid var(--bn-colour-border);
    border-radius: var(--bn-radius-lg);
    padding: var(--bn-space-lg);
    min-width: 0; /* prevent grid blowout from wide tables */
    overflow-x: auto;
}

.bn-dashboard-pane h3 {
    margin-top: 0;
}

/* Full-width pane spans both columns */
.bn-dashboard-full {
    grid-column: 1 / -1;
}

/* Compact list tables (sections/themes) — no row borders */
.bn-dashboard-list td {
    border-bottom: none;
    padding: 0.3rem var(--bn-space-md);
}

/* Stat cards inside the stats pane */
.bn-project-stats {
    display: flex;
    flex-wrap: wrap;
    gap: var(--bn-space-md);
}

.bn-project-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: var(--bn-space-md) var(--bn-space-lg);
    border: 1px solid var(--bn-colour-border);
    border-radius: var(--bn-radius-md);
    min-width: 5.5rem;
}

.bn-project-stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bn-colour-text);
    line-height: 1.2;
}

.bn-project-stat-label {
    font-size: 0.8rem;
    color: var(--bn-colour-muted);
    margin-top: 0.15rem;
    text-align: center;
}

/* Featured quotes row — 3 cards across the top of the dashboard */
.bn-featured-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--bn-space-md);
}

.bn-featured-quote {
    border: 1px solid var(--bn-colour-border);
    border-radius: var(--bn-radius-lg);
    padding: var(--bn-space-md) var(--bn-space-lg);
    min-width: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.bn-featured-quote .quote-text {
    font-size: 0.92rem;
    line-height: 1.55;
    flex: 1;
}

.bn-featured-quote .context {
    display: block;
    font-size: 0.8rem;
    color: var(--bn-colour-muted);
    margin-bottom: var(--bn-space-xs);
}

/* Footer: timecode — speaker, with optional badge */
.bn-featured-footer {
    display: flex;
    align-items: center;
    gap: var(--bn-space-sm);
    margin-top: var(--bn-space-sm);
    font-size: 0.82rem;
    color: var(--bn-colour-muted);
    flex-wrap: wrap;
}

.bn-featured-footer .speaker {
    white-space: nowrap;
}

/* Responsive: collapse dashboard to single column, scroll nav */
@media (max-width: 600px) {
    .bn-global-nav {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .bn-tab {
        font-size: 0.82rem;
        padding: 0.5rem 0.75rem;
    }

    .bn-dashboard {
        grid-template-columns: 1fr;
    }

    .bn-featured-row {
        grid-template-columns: 1fr;
    }
}
