/* Global App Switcher */
:root {
    --nav-height: 32px;
}

.app-switcher {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: 12px;
    padding: 0 16px;
    transition: background 250ms ease;
}

.app-switcher-inner {
    display: flex;
    align-items: center;
    max-width: 1100px;
    width: 100%;
}

.app-switcher-brand {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    margin-right: 16px;
    letter-spacing: -0.02em;
    white-space: nowrap;
    transition: color 150ms ease;
}

.app-switcher-brand:hover {
    color: var(--accent-hover);
}

.app-switcher-nav {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.app-switcher-nav a {
    display: block;
    padding: 4px 10px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    border-radius: 4px;
    transition: color 150ms ease, background 150ms ease;
    white-space: nowrap;
}

.app-switcher-nav a:hover {
    color: var(--text-primary);
    background: var(--bg-tertiary);
}

/* Active state via data-app attribute on body */
body[data-app="monodraft"] .app-switcher-nav a[href*="MonoDraft"],
body[data-app="monoflow"] .app-switcher-nav a[href*="MonoFlow"],
body[data-app="monotask"] .app-switcher-nav a[href*="MonoTask"],
body[data-app="monotimer"] .app-switcher-nav a[href*="MonoTimer"] {
    color: var(--accent);
    font-weight: 600;
}

/* Focus mode */
body.focus-mode .app-switcher {
    opacity: 0;
    pointer-events: none;
    transition: opacity 250ms ease;
}

/* Responsive */
@media (max-width: 480px) {
    .app-switcher {
        padding: 0 8px;
    }

    .app-switcher-brand {
        font-size: 12px;
        margin-right: 8px;
    }

    .app-switcher-nav a {
        padding: 4px 6px;
        font-size: 11px;
    }
}

@media (max-width: 360px) {
    .app-switcher-brand {
        display: none;
    }
}

@media print {
    .app-switcher {
        display: none;
    }
}
