/*
 * User menu: current profile label and the "switch profile" section (partials/_profile_switcher).
 * Design-system tokens with fallbacks, as the events layout does not load tokens.css.
 */

.navbar-right__menu .nav-author__info .nav-author__profile {
    display: block;
    color: var(--rg-color-text-muted, #8a8a8a);
    font-size: var(--rg-font-size-md, 13px);
    line-height: 1.35;
}

.profile-switcher {
    margin: 0 var(--rg-space-3, 12px) var(--rg-space-2, 8px);
    padding-bottom: var(--rg-space-2, 8px);
    border-bottom: 1px solid var(--rg-color-line, #f0f0ee);
}

.profile-switcher__title {
    margin: 0;
    padding: var(--rg-space-1, 4px) var(--rg-space-3, 12px) var(--rg-space-2, 8px);
    color: var(--rg-color-text-muted, #8a8a8a);
    font-size: var(--rg-font-size-xs, 11px);
    font-weight: var(--rg-font-weight-medium, 500);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.profile-switcher__list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.profile-switcher__item + .profile-switcher__item {
    margin-top: 2px;
}

.profile-switcher__link {
    display: flex;
    align-items: center;
    gap: var(--rg-space-3, 12px);
    padding: var(--rg-space-2, 8px) var(--rg-space-3, 12px);
    border-radius: var(--rg-radius-sm, 10px);
    color: var(--rg-color-ink, #0a0a0a);
    text-decoration: none;
    transition: background-color 0.15s ease;
}

.profile-switcher__link:hover {
    background: var(--rg-color-surface-hover, #f7f7f5);
    color: var(--rg-color-ink, #0a0a0a);
}

.profile-switcher__link:focus-visible {
    outline: 2px solid var(--rg-color-brand, #ff2a3c);
    outline-offset: 2px;
}

.profile-switcher__link--current,
.profile-switcher__link--current:hover {
    background: var(--rg-color-brand-tint, #ffe9eb);
}

.profile-switcher__text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.profile-switcher__name {
    overflow: hidden;
    font-size: var(--rg-font-size-base, 14px);
    font-weight: var(--rg-font-weight-medium, 500);
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-switcher__subtitle {
    overflow: hidden;
    color: var(--rg-color-text-muted, #8a8a8a);
    font-size: var(--rg-font-size-sm, 12px);
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-switcher__check {
    flex: 0 0 auto;
    color: var(--rg-color-brand, #ff2a3c);
    font-size: var(--rg-font-size-xl, 18px);
}

/* Keyboard users open the user menu by tabbing into it (desktop opens it on hover). */
@media (min-width: 768px) {
    .nav-author .dropdown-custom:focus-within .dropdown-wrapper {
        visibility: visible;
        opacity: 1;
        pointer-events: all;
        transform: scale(1);
    }
}
