/* Top bar players menu + status (from app.css) */
/* Ghost desde banco rival: ficha redonda de cancha, no el rectángulo del menú. */
.player.red.topbar-rival-chip--ghost {
    min-height: 0;
    min-width: 0;
    border-radius: 50%;
    border: 2px solid #fff;
    background-color: #b91c1c;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    font-family: inherit;
    color: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.45);
}
.topbar-rival-chip--on-field {
    opacity: 0.38;
    cursor: not-allowed;
    border-color: rgba(248, 113, 113, 0.18);
    background: rgba(30, 30, 30, 0.55);
    pointer-events: none;
}
.topbar-rival-chip--on-field .topbar-rival-chip__num {
    color: rgba(254, 202, 202, 0.45);
}
.topbar-rival-chip__num {
    font-size: 0.7rem;
    font-weight: 800;
    font-family: ui-monospace, monospace;
    color: #fecaca;
}
.topbar-players-menu.hidden { display: none !important; }
.topbar-players-menu__header {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 4px 8px;
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.1);
}
.topbar-players-menu__title {
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #f1f5f9;
}
.topbar-players-menu__hint {
    font-size: 0.58rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    color: rgba(148, 163, 184, 0.95);
    text-transform: none;
}
.topbar-players-section {
    margin-bottom: 12px;
    width: 100%;
    min-width: 0;
}
.topbar-players-section:last-child {
    margin-bottom: 0;
}
.topbar-players-section__title {
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #bae6fd;
    margin-bottom: 8px;
    opacity: 0.92;
}
.topbar-players-section--suplentes {
    padding-top: 8px;
    border-top: 1px solid rgba(56, 189, 248, 0.12);
}
.topbar-players-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(72px, 1fr));
    gap: 8px;
    width: 100%;
    min-width: 0;
}
.topbar-player-chip {
    border: 1px solid rgba(71, 85, 105, 0.65);
    border-radius: 9px;
    background: rgba(30, 41, 59, 0.75);
    min-height: 48px;
    min-width: 0;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 2px;
    padding: 6px 8px;
    overflow: hidden;
    transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.topbar-player-chip:hover {
    border-color: rgba(96, 165, 250, 0.45);
    background: rgba(30, 41, 59, 0.92);
}
.topbar-player-chip__num {
    font-size: 0.72rem;
    font-family: ui-monospace, "Cascadia Code", monospace;
    color: #7dd3fc;
    font-weight: 800;
    line-height: 1.15;
}
.topbar-player-chip__name {
    font-size: 0.62rem;
    font-weight: 600;
    color: #cbd5e1;
    max-width: 100%;
    width: 100%;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
/* Conectado: color por sección del menú (titular vs suplente), no por número de dorsal. */
.topbar-player-chip--online-titular {
    border-color: rgba(52, 211, 153, 0.5);
    background: rgba(6, 78, 59, 0.38);
    box-shadow:
        inset 0 0 0 1px rgba(52, 211, 153, 0.14),
        0 0 12px rgba(34, 197, 94, 0.12);
}
.topbar-player-chip--online-titular .topbar-player-chip__num {
    color: #6ee7b7;
}
.topbar-player-chip--online-titular .topbar-player-chip__name {
    color: #ecfdf5;
}
.topbar-player-chip--online-suplente {
    border-color: rgba(56, 189, 248, 0.55);
    background: rgba(12, 74, 110, 0.35);
    box-shadow:
        inset 0 0 0 1px rgba(56, 189, 248, 0.16),
        0 0 12px rgba(14, 165, 233, 0.14);
}
.topbar-player-chip--online-suplente .topbar-player-chip__num {
    color: #7dd3fc;
}
.topbar-player-chip--online-suplente .topbar-player-chip__name {
    color: #e0f2fe;
}
.topbar-player-chip--dragging {
    opacity: 0.88;
    border-color: rgba(56, 189, 248, 0.55);
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.25);
    cursor: grabbing;
}
.topbar-player-chip[draggable="true"] {
    cursor: grab;
}
.topbar-room-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid rgba(34, 197, 94, 0.55);
    background: rgba(21, 128, 61, 0.28);
    cursor: pointer;
}
.topbar-room-badge.hidden { display: none !important; }
.topbar-room-badge__label {
    font-size: 0.64rem;
    letter-spacing: 0.06em;
    color: #86efac;
    font-weight: 800;
    white-space: nowrap;
}
.topbar-room-badge__code { display: none; }
.topbar-room-badge__qr {
    width: 22px;
    height: 22px;
    min-width: 22px;
    color: #bbf7d0;
    display: block;
    flex-shrink: 0;
}
.top-bar-coach-centered {
    font-size: clamp(0.76rem, 2.5vw, 0.95rem);
    font-weight: 800;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: #f8fafc;
    font-family: "Inter", system-ui, sans-serif;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(92vw, 560px);
}
.top-bar-team-mode {
    display: block;
    width: 100%;
    font-size: clamp(0.72rem, 2.2vw, 0.88rem);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--rtp-brand-text);
    font-family: var(--rtp-font-ui);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.top-bar-coach-name {
    font-size: clamp(0.72rem, 2vw, 0.85rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: none;
    color: var(--rtp-brand-muted);
    font-family: var(--rtp-font-ui);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: min(28vw, 200px);
}

.top-bar-coach-name--center {
    max-width: min(46vw, 420px);
    font-size: clamp(0.8rem, 2.2vw, 0.95rem);
    font-weight: 700;
    color: var(--rtp-brand-text);
    text-align: center;
}
.top-bar-brand {
    font-size: clamp(0.72rem, 2.4vw, 0.95rem);
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #f1f5f9;
    font-family: "Inter", system-ui, sans-serif;
    text-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}
.top-bar-btn {
    border: none;
    border-radius: 8px;
    padding: 8px 12px;
    font-weight: 700;
    font-size: 0.8rem;
    cursor: pointer;
    font-family: "Inter", system-ui, sans-serif;
    background: #1e293b;
    color: #e2e8f0;
    border: 1px solid #475569;
    flex-shrink: 0;
}
.top-bar-btn-home:hover { background: #334155; border-color: #60a5fa; }
.top-bar-team-sub {
    max-width: min(160px, 28vw);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    color: #94a3b8;
    font-family: "Inter", system-ui, sans-serif;
    flex-shrink: 1;
}
.top-bar-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex: 1 1 auto;
    text-align: right;
    min-width: 0;
}
.top-bar-select {
    max-width: 168px;
    width: max-content;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid #475569;
    background: #020617;
    color: #f1f5f9;
    cursor: pointer;
}
.top-bar-select:focus { outline: none; border-color: #38bdf8; }

/* —— Top bar: pantalla completa —— */
.topbar-projection-btn--solo {
    margin-right: 8px;
}
.topbar-projection-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border-radius: 9px;
    border: 1px solid #475569;
    background: #0f172a;
    color: #e2e8f0;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
.topbar-projection-btn:hover {
    border-color: #60a5fa;
    background: #1e293b;
    color: #fff;
}
.topbar-projection-btn--active {
    border-color: var(--rtp-brand-primary, #ff4500);
    background: color-mix(in srgb, var(--rtp-brand-primary, #ff4500) 28%, #0f172a);
    color: var(--rtp-brand-primary, #ff4500);
    box-shadow:
        0 0 0 1px color-mix(in srgb, var(--rtp-brand-primary, #ff4500) 50%, transparent),
        0 0 14px rgba(255, 69, 0, 0.35);
}

.topbar-projection-btn--active .topbar-projection-btn__icon {
    color: var(--rtp-brand-primary, #ff4500);
}
.topbar-projection-btn__icon {
    width: 18px;
    height: 18px;
    display: block;
}

/* Menú JUGADORES: estado cancha / banco (liveBoard + members) */
.topbar-player-chip__status {
    font-size: 0.55rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.95);
    line-height: 1.1;
}
.topbar-player-chip--on-field {
    border-color: rgba(52, 211, 153, 0.35);
}
.topbar-player-chip--on-field .topbar-player-chip__status {
    color: #6ee7b7;
}
.topbar-player-chip--on-bench {
    opacity: 0.72;
    border-color: rgba(100, 116, 139, 0.55);
    background: rgba(15, 23, 42, 0.55);
}
.topbar-player-chip--on-bench .topbar-player-chip__status {
    color: #94a3b8;
}
.topbar-player-chip--on-bench .topbar-player-chip__num {
    color: #64748b;
}

