/**
 * Top bar: chips y menús con paleta fija estilo modo oscuro (en ambos temas).
 */

.topbar-players-btn,
.topbar-projection-btn,
.top-bar-nav-trigger,
.top-bar-btn,
.top-bar-select {
    font-family: var(--rtp-font-ui);
    transition: var(--rtp-transition-ui);
}

.topbar-players-btn,
.topbar-projection-btn,
.top-bar-nav-trigger,
.top-bar-select {
    border: 1px solid var(--rtp-topbar-menu-border);
    background: var(--rtp-topbar-chip-bg);
    color: var(--rtp-topbar-chip-text);
}

.topbar-players-btn:hover,
.topbar-projection-btn:hover,
.top-bar-nav-trigger:hover,
.top-bar-select:hover {
    border-color: var(--rtp-brand-primary);
    background: color-mix(in srgb, var(--rtp-navy) 78%, var(--rtp-brand-primary) 22%);
    color: var(--rtp-on-navy);
    box-shadow: var(--rtp-hover-glow);
}

.topbar-projection-btn:active,
.topbar-players-btn:active,
.top-bar-nav-trigger:active {
    transform: scale(0.98);
}

.topbar-projection-btn--active {
    border-color: var(--rtp-brand-primary);
    background: color-mix(in srgb, var(--rtp-brand-primary) 32%, var(--rtp-navy));
    color: var(--rtp-brand-primary);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--rtp-brand-primary) 55%, transparent),
        var(--rtp-hover-glow);
}

.topbar-projection-btn--active .topbar-projection-btn__icon {
    color: var(--rtp-brand-primary);
}

.topbar-players-menu,
.top-bar-nav-menu {
    background: var(--rtp-topbar-menu-bg);
    border: 1px solid var(--rtp-topbar-menu-border);
    font-family: var(--rtp-font-ui);
    box-shadow: var(--rtp-shadow-soft);
    color: var(--rtp-topbar-chip-text);
}

.topbar-players-menu__title,
.topbar-players-section__title,
.top-bar-nav-item {
    color: var(--rtp-topbar-chip-text);
    font-family: var(--rtp-font-ui);
}

.topbar-players-menu__body--attack,
.topbar-players-section--suplentes,
.topbar-players-menu__header {
    border-color: color-mix(in srgb, var(--rtp-brand-primary) 18%, var(--rtp-topbar-menu-border));
}

.topbar-player-chip {
    background: color-mix(in srgb, #000 22%, transparent);
    border-color: color-mix(in srgb, var(--rtp-on-navy) 22%, transparent);
}

.topbar-player-chip__name {
    color: var(--rtp-topbar-chip-text);
}

.topbar-player-chip:hover {
    border-color: color-mix(in srgb, var(--rtp-brand-primary) 50%, transparent);
    background: color-mix(in srgb, var(--rtp-brand-primary) 10%, transparent);
}

.topbar-player-chip__num {
    color: color-mix(in srgb, var(--rtp-brand-primary) 70%, #fff);
}

.topbar-player-chip--online-suplente {
    border-color: color-mix(in srgb, var(--rtp-brand-primary) 45%, transparent);
    background: color-mix(in srgb, var(--rtp-brand-primary) 12%, transparent);
}

.topbar-player-chip--dragging {
    border-color: var(--rtp-brand-primary);
    box-shadow: 0 0 0 2px var(--rtp-focus-ring);
}

.top-bar-coach-name,
.top-bar-coach-name--center,
.top-bar-team-block {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    max-width: 100%;
    min-width: 0;
}

.top-bar-club-logo {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--rtp-border);
    background: var(--rtp-surface-raised);
    flex-shrink: 0;
}

.top-bar-team-mode {
    color: var(--rtp-brand-text);
    font-family: var(--rtp-font-ui);
}

.top-bar-brand {
    font-family: var(--rtp-font-ui);
    color: var(--rtp-brand-text);
    text-shadow: none;
}

.top-bar-select:focus {
    outline: none;
    border-color: var(--rtp-brand-primary);
    box-shadow: var(--rtp-hover-glow);
}

.top-bar-nav-item:hover:not(:disabled) {
    background: color-mix(in srgb, var(--rtp-brand-primary) 16%, transparent);
    color: var(--rtp-topbar-chip-text);
}

.topbar-room-badge {
    border: 1px solid color-mix(in srgb, var(--rtp-brand-primary) 50%, transparent);
    background: color-mix(in srgb, var(--rtp-brand-primary) 20%, var(--rtp-navy));
    transition: var(--rtp-transition-ui);
}

.topbar-room-badge__label {
    color: color-mix(in srgb, var(--rtp-brand-primary) 30%, var(--rtp-on-navy));
    font-weight: 800;
    font-family: var(--rtp-font-ui);
}

.topbar-room-badge__qr {
    color: color-mix(in srgb, var(--rtp-brand-primary) 50%, var(--rtp-on-navy));
}

.topbar-room-badge:hover {
    border-color: var(--rtp-brand-primary);
    background: color-mix(in srgb, var(--rtp-brand-primary) 28%, var(--rtp-navy));
    box-shadow: var(--rtp-hover-glow);
}
