/* ============================================
   Top Header - Logo Bar
   ============================================ */

.top-header {
    position: relative;
    z-index: 50;
    background: var(--color-bg);
    box-shadow: rgb(51 48 48 / 20%) 0px 8px 24px;
}

.top-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: var(--space-sm) var(--space-md);
    height: 70px;
}

/* Left / Right spacers - equal width for centering */
.top-header__left,
.top-header__right {
    width: 40px;
    flex-shrink: 0;
}

/* Back button — color auto-contrasts against header background */
.top-header__back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    color: var(--color-header-fg, var(--color-text));
    transition: all var(--transition-fast);
}

body.theme-light .top-header__back {
    background: rgb(255 255 255 / 0%);
}

body:not(.theme-light) .top-header__back {
    background: var(--color-bg-glass-strong);
}

.top-header__back:active {
    transform: scale(0.9);
    opacity: 0.7;
}

/* Center logo */
.top-header__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-width: 0;
    text-decoration: none;
}

.top-header__logo-img {
    max-height: 66px;
    max-width: 140px;
    width: auto;
    object-fit: contain;
}

body.theme-light .top-header__logo-img {
    filter: none;
}

body:not(.theme-light) .top-header__logo-img {
    filter: brightness(1.1);
}

.top-header__logo-text {
    font-family: var(--font-display);
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--color-header-fg, var(--color-text));
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
