/* Top bar layout / logo / team (from app.css) */
/* Barra superior global */
.app-top-bar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--app-top-bar-height);
    z-index: 10000;
    padding: 0 14px 0 16px;
    gap: 10px;
    background: var(--rtp-surface);
    border-bottom: 1px solid var(--rtp-border);
    /* Ancla para centrar nombre de equipo en toda la barra */
    isolation: isolate;
    box-shadow:
        0 1px 0 rgba(15, 23, 42, 0.9),
        0 8px 28px rgba(0, 0, 0, 0.35);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    overflow: visible;
}
/* Grid de 3 columnas vive en dashboard-topbar-nav.css (#vue-top-bar-app) */
.top-bar-vue-mount:not(#vue-top-bar-app) {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 4px 0 0;
    flex: 1;
    min-width: 0;
    min-height: 100%;
    box-sizing: border-box;
}
#vue-top-bar-app.top-bar-vue-mount {
    display: grid;
    flex: 1;
    min-width: 0;
    min-height: 100%;
    padding: 0 4px 0 0;
    box-sizing: border-box;
}
.top-bar-left,
.top-bar-right {
    flex: 1;
    display: flex;
    align-items: center;
    position: relative;
    z-index: 1;
}
.top-bar-left {
    justify-content: flex-start;
    gap: 15px;
}
.top-bar-right {
    justify-content: flex-end;
    gap: 15px;
}
.top-bar-center {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: min(46vw, 420px);
    padding: 0 8px;
    box-sizing: border-box;
    text-align: center;
    pointer-events: none;
}
.top-bar-nav-chevron {
    font-size: 1.15rem;
    line-height: 1;
    font-weight: 800;
}
.topbar-players-btn {
    font-family: "Inter", system-ui, sans-serif;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid #475569;
    border-radius: 10px;
    background: #0f172a;
    color: #f1f5f9;
    padding: 8px 14px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease;
}
.topbar-players-btn__label {
    white-space: nowrap;
}
.topbar-players-btn__chevron {
    flex-shrink: 0;
    font-size: 1.05rem;
    line-height: 1;
    font-weight: 800;
    opacity: 0.92;
}
.topbar-players-btn:hover {
    border-color: #60a5fa;
    background: #1e293b;
    color: #fff;
}
.topbar-players-menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    width: min(420px, 94vw);
    max-height: min(72vh, 560px);
    overflow-x: hidden;
    overflow-y: auto;
    font-family: "Inter", system-ui, sans-serif;
    background: linear-gradient(165deg, rgba(15, 23, 42, 0.98) 0%, rgba(7, 11, 20, 0.99) 45%, rgba(2, 6, 23, 0.99) 100%);
    border: 1px solid rgba(56, 189, 248, 0.14);
    border-radius: 12px;
    padding: 12px 14px 14px;
    box-shadow:
        0 1px 0 rgba(15, 23, 42, 0.85),
        0 20px 48px rgba(0, 0, 0, 0.5);
    z-index: 12010;
    box-sizing: border-box;
    -webkit-overflow-scrolling: touch;
    backdrop-filter: blur(12px);
}
.topbar-players-menu__body {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100%;
    min-width: 0;
}
.topbar-players-menu__body--attack {
    padding-bottom: 10px;
    margin-bottom: 10px;
    border-bottom: 1px solid rgba(56, 189, 248, 0.12);
}
.topbar-rivals-section {
    width: 100%;
    min-width: 0;
    border-radius: 10px;
    transition: box-shadow 0.15s, background 0.15s;
}
.topbar-rivals-section--drop-target {
    background: rgba(127, 29, 29, 0.25);
    box-shadow: 0 0 0 2px rgba(248, 113, 113, 0.65);
}
.topbar-rivals-section__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}
.topbar-rivals-section__hint {
    margin: 0 0 8px;
    font-size: 0.62rem;
    color: rgba(148, 163, 184, 0.9);
    line-height: 1.35;
}
.topbar-defense-btn {
    border: 1px solid rgba(56, 189, 248, 0.35);
    border-radius: 8px;
    padding: 6px 10px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    cursor: pointer;
    color: #e2e8f0;
    background: rgba(30, 41, 59, 0.85);
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    flex-shrink: 0;
    max-width: 100%;
}
.topbar-defense-btn:hover {
    border-color: rgba(56, 189, 248, 0.65);
    background: rgba(51, 65, 85, 0.95);
}
.topbar-defense-btn--auto {
    border-color: rgba(56, 189, 248, 0.45);
    color: #bae6fd;
}
.topbar-defense-btn--clear {
    border-color: rgba(248, 113, 113, 0.55);
    background: rgba(127, 29, 29, 0.45);
    color: #fecaca;
}
.topbar-defense-btn--clear:hover {
    border-color: rgba(248, 113, 113, 0.85);
    background: rgba(153, 27, 27, 0.55);
}
.topbar-defense-btn:focus-visible {
    outline: 2px solid var(--rtp-brand-primary);
    outline-offset: 2px;
}
.topbar-rivals-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(44px, 1fr));
    gap: 6px;
}
.topbar-rival-chip {
    border: 1px solid rgba(248, 113, 113, 0.35);
    border-radius: 8px;
    background: rgba(69, 10, 10, 0.4);
    min-height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: border-color 0.15s, background 0.15s;
}
.topbar-rival-chip:hover {
    border-color: rgba(248, 113, 113, 0.65);
    background: rgba(127, 29, 29, 0.45);
}
.topbar-rival-chip:not(.topbar-rival-chip--on-field) {
    touch-action: none;
}
.topbar-rival-chip--ghost {
    position: fixed;
    margin: 0;
    pointer-events: none;
    touch-action: none;
    opacity: 0.92;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
    cursor: grabbing;
}

