/* ================================
   Kahlonetrics — Shared App Header
   Requires theme.css variables.

   The .theme-toggle class itself is defined in shared/theme.css and is
   already loaded by every service — don't re-declare it here.

   Usage:
     <header class="kn-app-header kn-app-header--fixed">
       <a href="/" class="kn-logo-container">
         <img class="kn-logo" src="...">
         <span class="kn-logo-text">Title</span>
       </a>
       <div class="kn-header-actions">
         <a href="/" class="kn-back-link">…</a>
         <div class="kn-lang-switcher">
           <a class="kn-lang-option active">DE</a>
           <span class="kn-lang-divider">|</span>
           <a class="kn-lang-option">EN</a>
         </div>
         <button class="theme-toggle">…</button>
         <a class="kn-logout-button">…</a>
       </div>
     </header>

   Use --fixed for fixed-positioned header (e.g. auth pages). Default
   layout flows in document order, suitable for full-height app shells.
   ================================ */

.kn-app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    height: 72px;
    background: transparent;
    flex-shrink: 0;
}

/* Position variant: fixed across viewport top */
.kn-app-header--fixed {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

/* ── Logo + title ─────────────────── */
.kn-logo-container {
    display: flex;
    align-items: center;
    gap: 1vw;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.3s ease;
}
.kn-logo-container:hover {
    opacity: 0.8;
}

.kn-logo {
    height: clamp(30px, 4vh, 50px);
    width: auto;
}

.kn-logo-text {
    font-size: clamp(16px, 2vw, 24px);
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 1px;
}

/* ── Right-side actions ───────────── */
.kn-header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
}

/* ── Language switcher (DE | EN) ──── */
.kn-lang-switcher {
    display: flex;
    align-items: center;
    gap: 6px;
}
.kn-lang-option {
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: clamp(11px, 1.1vw, 13px);
    font-weight: 400;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}
.kn-lang-option:hover,
.kn-lang-option.active {
    color: var(--color-accent);
}
.kn-lang-divider {
    color: var(--color-text-muted);
    font-size: clamp(11px, 1.1vw, 13px);
    font-weight: 400;
    user-select: none;
}

/* ── Logout link/button ───────────── */
.kn-logout-button {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: clamp(13px, 1.4vw, 16px);
    transition: color 0.3s ease;
}
.kn-logout-button:hover {
    color: var(--color-accent);
}
.kn-logout-icon {
    width: 14px;
    height: 14px;
}

/* ── Back link ─────────────────────── */
.kn-back-link {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--color-text-muted);
    text-decoration: none;
    font-size: clamp(11px, 1.1vw, 13px);
    font-weight: 400;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}
.kn-back-link:hover {
    color: var(--color-accent);
}
.kn-back-link svg {
    width: 14px;
    height: 14px;
}
