/* Shared navbar/account menu styles.
   Loaded by includes/navbar.php so every authenticated app surface gets the
   same navigation behaviour without reloading the full page stylesheet. */

.nav-plan-badge {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}
.plan-badge-free     { background: var(--border); color: var(--muted-light); }
.plan-badge-pro      { background: var(--teal-glow); color: var(--teal); border: 1px solid var(--teal); }
.plan-badge-groepen  { background: rgba(34,197,94,0.12); color: var(--green); border: 1px solid var(--green); }
.plan-badge-business { background: rgba(234,179,8,0.12); color: var(--yellow); border: 1px solid var(--yellow); }

.navbar-user-meta {
    display: flex;
    align-items: center;
    margin-right: 4px;
}
.navbar-user-meta > * + * { margin-left: 8px; }
.navbar-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--teal);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.navbar-user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-lock { font-size: 10px; opacity: 0.7; }
.nav-link-locked,
.ham-link-locked { opacity: 0.6; }


.nav-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9997;
}
.nav-backdrop.open { display: block; }

#themeToggle,
.account-menu-button {
    min-width: 44px;
    min-height: 44px;
}
#themeToggle:focus-visible,
.account-menu-button:focus-visible,
.account-menu__item:focus-visible {
    outline: 3px solid var(--teal, #0ea5e9);
    outline-offset: 2px;
}
.account-menu-button {
    position: relative;
    border: 0;
    padding: 0;
    cursor: pointer;
}
.navbar-user-chevron {
    position: absolute;
    right: -3px;
    bottom: -2px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--card, #fff);
    color: var(--text, #0f172a);
    font-size: 14px;
    line-height: 13px;
    text-align: center;
    box-shadow: 0 0 0 1px var(--border, #e2e8f0);
}
.account-menu {
    position: fixed;
    top: calc(var(--nav-height, 60px) + 8px);
    right: 12px;
    z-index: 10001;
    width: min(320px, calc(100vw - 24px));
    padding: 12px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg, 0 8px 40px rgba(0,0,0,.16));
}
.account-menu[hidden] { display: none !important; }
.account-menu__identity {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 4px 12px;
    border-bottom: 1px solid var(--border);
}
.account-menu__identity strong,
.account-menu__identity span { display: block; }
.account-menu__identity strong { color: var(--text); }
.account-menu__identity div > span { color: var(--muted); font-size: 12px; }
.account-menu__avatar { flex: 0 0 44px; cursor: default; }
.account-menu__item {
    display: flex;
    align-items: center;
    min-height: 44px;
    padding: 10px 8px;
    color: var(--text);
    text-decoration: none;
    border-radius: 8px;
    font-weight: 600;
}
.account-menu__item:hover { background: var(--teal-glow); color: var(--teal); }
.account-menu__divider { height: 1px; background: var(--border); margin: 6px 0; }
.account-menu__logout { color: var(--red); }


@media (max-width: 767px) {
    .navbar { padding-left: 12px; padding-right: 12px; }
    .navbar-actions { gap: 8px; }
    .navbar-user-name,
    .navbar-user-logout,
    .navbar-user-meta .nav-plan-badge { display: none; }
    .account-menu {
        top: calc(var(--nav-height, 60px) + env(safe-area-inset-top, 0px) + 8px);
        left: 12px;
        right: 12px;
        width: auto;
    }
}

@media (orientation: landscape) and (max-width: 900px) {
    .account-menu {
        max-height: calc(100vh - var(--nav-height, 60px) - 16px);
        overflow-y: auto;
    }
}
