/* ── BANCO CENTRAL DE PERGUNTAS ─────────────────────────────── */
/* .bank-config usa o mesmo design base de .subjects-config (azul/branco)
   O h3 já tem border-bottom amarelo pela regra geral */

.bank-subject-item { transition: background .2s; }
.bank-subject-item:hover { background: rgba(255,204,0,0.08); }

.bank-count {
    font-size: .75em; color: #888;
    margin-left: 8px; font-style: italic;
}
.bank-checkbox:checked + .subject-label .bank-count {
    color: var(--prf-blue, #003366); font-style: normal; font-weight: 700;
}

.file-status-bar {
    font-size: .82em; color: #666; padding: 4px 0; margin-top: 6px;
}

/* .file-upload-optional usa o mesmo estilo base de .file-upload (azul/branco)
   Sem overrides — herda tudo de .file-upload */
.optional-badge {
    font-size: .7em; background: #eee; color: #888;
    padding: 2px 8px; border-radius: 10px;
    font-weight: 400; text-transform: none; letter-spacing: 0;
}


/* ── QUADRO DE EQUIPES COM JOGADORES (Config Screen) ─────────── */
.team-input-wrapper {
    margin-bottom: 10px;
    border: 2px solid #dee2e6;
    border-left-width: 6px; /* será sobrescrito inline pela cor da equipe */
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    transition: border-color .2s, border-left-color .2s;
}
.team-input-wrapper:hover { border-color: var(--prf-blue); }

/* Linha superior: input nome + excluir */
.team-input-wrapper .team-input {
    border: none;
    border-bottom: 1px solid #f0f0f0;
    border-radius: 0;
    margin-bottom: 0;
    padding: 8px 10px;
    background: #f8f9fa;
}

/* Lista de jogadores dentro da equipe */
.team-players-list {
    padding: 6px 10px 8px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-height: 32px;
}

.team-no-players {
    color: #aaa;
    font-style: italic;
    font-size: 0.8em;
    padding: 4px 0;
}

/* Linha de cada jogador */
.team-player-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 4px;
    border-radius: 6px;
    background: #f1f3f5;
    font-size: 0.85em;
}
.team-player-row.team-player-self {
    background: rgba(0,51,102,0.08);
    border: 1px solid rgba(0,51,102,0.15);
    font-weight: 700;
}

.team-player-name {
    flex: 1;
    color: var(--prf-blue);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.team-player-row.team-player-self .team-player-name {
    color: var(--prf-blue);
    font-weight: 800;
}

/* Botões ▲▼ */
.team-move-btns {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
}
.team-move-btn {
    background: linear-gradient(145deg, var(--prf-yellow), var(--prf-gold)) !important;
    border: 1px solid var(--prf-blue) !important;
    color: var(--prf-blue) !important;
    width: 26px !important;
    height: 26px !important;
    padding: 0 !important;
    margin: 0 !important;
    font-size: 0.7em !important;
    font-weight: 900 !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    line-height: 1 !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    transition: background .2s, color .2s !important;
}
.team-move-btn:hover {
    background: linear-gradient(145deg, var(--prf-blue), var(--prf-dark-blue)) !important;
    color: var(--prf-yellow) !important;
    border-color: var(--prf-yellow) !important;
}

/* ── BANNER CÓDIGO DA PARTIDA (game-screen) ──────────────── */
.game-room-code-banner {
    position: absolute !important;
    top: 55px !important;
    right: 20px !important;
    background: rgba(255,204,0,0.12) !important;
    border: 1.5px solid var(--prf-yellow) !important;
    border-radius: 6px !important;
    padding: 5px 12px !important;
    text-align: center !important;
    color: var(--prf-yellow) !important;
    font-size: 0.78em !important;
    font-weight: 700 !important;
    letter-spacing: 1px !important;
    z-index: 10 !important;
    min-width: 100px !important;
    cursor: default !important;
    box-shadow: none !important;
    text-transform: uppercase !important;
    white-space: nowrap !important;
}
.game-room-code-banner .room-code-display {
    font-size: 1em !important;
    letter-spacing: 3px !important;
    font-weight: 900 !important;
    color: var(--prf-yellow) !important;
}

/* ── BADGE CÓDIGO DA SALA (canto sup-esq da game-screen) ─── */
#game-room-code-badge {
    position: absolute;
    top: 55px;
    right: 20px;
    background: rgba(255,204,0,0.12);
    border: 1.5px solid var(--prf-yellow);
    border-radius: 6px;
    padding: 5px 12px;
    color: var(--prf-yellow);
    font-size: 0.85em;
    font-weight: 900;
    letter-spacing: 3px;
    z-index: 10;
    user-select: all;
    cursor: pointer;
    white-space: nowrap;
}

/* ── CONFIG BLOQUEADA PARA PARTICIPANTES ─────────────────── */
/* Quando .config-locked, bloqueia painéis de banco/assuntos/arquivo */
.config-locked .bank-config,
.config-locked .subjects-config,
.config-locked .file-upload {
    pointer-events: none;
    opacity: 0.6;
    position: relative;
}
.config-locked .bank-config::after,
.config-locked .subjects-config::after,
.config-locked .file-upload::after {
    content: '🔒 Apenas o Mestre pode editar';
    position: absolute;
    inset: 0;
    background: rgba(255,255,255,0.0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75em;
    color: #999;
    font-style: italic;
    pointer-events: none;
}
/* Manter visible o painel de assuntos (leitura) para o jogador ver o que o mestre escolheu */
.config-locked .subjects-config { opacity: 0.85; }
/* Botão iniciar sempre bloqueado para não-mestre */
.config-locked .start-game-btn {
    pointer-events: none !important;
    opacity: 0.4 !important;
}
/* Equipes: bloquear add/remove mas não os botões ▲▼ do próprio jogador */
.config-locked .add-team-btn {
    pointer-events: none !important;
    opacity: 0.4 !important;
}
.config-locked .remove-team {
    pointer-events: none !important;
    opacity: 0.3 !important;
}
/* ▲▼ não são afetados — jogador pode mover a si mesmo */

/* ── BOTÃO VOLTAR À PARTIDA (usa lobby-btn como base, só ajusta layout) ── */
.back-to-game-btn {
    width: 100%;
    margin-top: 10px;
    display: block;
}

/* ── SALA DA PARTIDA CARD ──────────────────────────────────── */
/* h3 inherits .subjects-config h3 (blue, uppercase, yellow border) */
.sala-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.sala-visibility-btn {
    font-size: 1.3em;
    background: transparent !important;
    border: none !important;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    box-shadow: none !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    transition: transform .2s;
    margin: 0 !important;
    flex-shrink: 0;
}
.sala-visibility-btn:hover { transform: scale(1.15); }
.sala-visibility-btn:disabled { cursor: default; transform: none; opacity: 0.6; }
.sala-code-label, .sala-limit-label, .sala-sep {
    font-size: 0.82em;
    color: var(--prf-blue) !important;
    font-weight: 700 !important;
}
.sala-code-value {
    font-size: 1em;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--prf-blue) !important;
}
.sala-limit-input {
    width: 54px !important;
    padding: 4px 6px !important;
    text-align: center !important;
    font-size: 0.9em !important;
    font-weight: 700 !important;
    border: 1.5px solid var(--prf-blue) !important;
    border-radius: 6px !important;
    color: var(--prf-blue) !important;
    background: #f0f4ff !important;
}
.sala-save-btn {
    padding: 5px 10px !important;
    font-size: 0.78em !important;
    font-weight: 700 !important;
    background: var(--prf-yellow) !important;
    color: var(--prf-blue) !important;
    border: none !important;
    border-radius: 6px !important;
    cursor: pointer !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
}
.sala-limit-count {
    font-size: 0.78em;
    color: #555;
    font-weight: 600;
}

/* ── SALA: two-row layout ──────────────────────────────────── */
.sala-row-code { margin-bottom: 10px; }
.sala-row-limit { padding-top: 10px; border-top: 1px solid rgba(0,51,102,0.1); }
