/* Styles for the app-topbar component (components/topbar.js). */

.topbar {
    background: var(--surface);
    border-bottom: 1px solid var(--color-border-subtle);
    box-shadow: none;
    padding: 0 24px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
    min-width: 0;
}

.topbar-title {
    font-family: var(--font-sans);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: -0.1px;
    color: var(--color-text);
    flex: 0 1 auto;
    margin-right: auto;
    min-width: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Topbar controls (PrimeVue Select/Avatar) — keep the old pill
   silhouette. */
.topbar-select.p-select {
    border-radius: var(--radius-full);
}

/* Title-as-club-selector: reads like a heading, opens like a select. */
.title-select.p-select {
    border: none;
    background: transparent;
    box-shadow: none;
}

.title-select .p-select-label {
    font: inherit;
    letter-spacing: inherit;
    color: inherit;
    padding: 0 4px 0 0;
}

.title-select .p-select-dropdown {
    width: 20px;
    color: var(--color-text-secondary);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 6px;
}

.lang-option img {
    display: block;
    border-radius: 2px;
}

/* Role badge next to the avatar */
.role-badge {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.role-owner { background: var(--role-owner-bg); color: var(--role-owner-fg); }
.role-superadmin { background: var(--role-superadmin-bg); color: var(--role-superadmin-fg); }
.role-manager { background: var(--role-manager-bg); color: var(--role-manager-fg); }
.role-coach { background: var(--role-coach-bg); color: var(--role-coach-fg); }
.role-receptionist { background: var(--role-receptionist-bg); color: var(--role-receptionist-fg); }

/* User chip + popup identity block */
.user-menu {
    position: relative;
}

.user-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
}

.user-btn:hover {
    background: var(--color-bg-hover);
}

.user-btn .user-avatar.p-avatar {
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: var(--color-on-primary);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0;
    line-height: 1;
}

/* The user popup: identity block aligned with the item padding, tight
   against the separator, and Logout dressed as the destructive action. */
.p-menu.user-popover {
    min-width: 220px;
}

.user-menu-head {
    padding: 10px 14px;
}

.user-menu-name {
    font-family: var(--font-sans);
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text);
}

.user-menu-phone {
    margin-top: 2px;
    font-size: 13px;
    color: var(--color-text-secondary);
}

.user-popover .menu-item-danger .p-menu-item-label,
.user-popover .menu-item-danger .p-menu-item-icon {
    color: var(--color-danger);
}

/* Mobile: hamburger appears, spacing tightens, the role badge yields
   the room to the title. */
.menu-toggle {
    display: none;
    border: none;
    background: none;
    font-size: 18px;
    color: var(--text);
    cursor: pointer;
    padding: 8px;
    margin-right: 4px;
}

@media (max-width: 768px) {
    .menu-toggle { display: inline-flex; }
    .topbar { padding: 0 12px; }
    .role-badge { display: none; }
}
