/* ============================================================
   online-base.css — Subviews, campo de futebol, botão "Jogar Online" e modal de entrada
   Fatia SEQUENCIAL de online.css (linhas 1-256 do original).
   ⚠️ A ordem dos <link> no index.html reproduz a ordem original — não
   reordenar, senão a cascata muda.
   ============================================================ */
/* online.css — Modo multiplayer online */

/* ── Subviews ───────────────────────────────────────────────────────────── */
#tela-online { padding: 0; }
.online-subview           { display: block; }
.online-subview.escondida { display: none; }

/* O modo online ocupa a página inteira: alinha ao topo e usa uma largura confortável
   para o layout de 3 colunas (o .tela base centralizaria e encolheria o conteúdo). */
#tela-online {
  justify-content: flex-start;
  padding: 28px 16px 48px;
}
.online-subview {
  width: 100%;
  max-width: min(1500px, 96vw);   /* adapta à tela: usa mais espaço em monitores grandes */
  margin: 0 auto;
}

/* Respiro entre a linha do header e o conteúdo (vale pra todas as telas online) */
#tela-online .jogo-header-linha { margin-bottom: 1.9rem; }

/* ── Campo de futebol (compartilhado por lobby / draft / elencos) ────────── */
.campo-jogo {
  position: relative;
  width: 100%;
  max-width: 500px;             /* teto igual ao modo Um Jogador (evita o campo gigante) */
  margin: 0 auto;
  aspect-ratio: 2 / 3;
  border-radius: var(--raio-sm);
  border: 2px solid rgba(255,255,255,0.28);
  overflow: visible;
  background: repeating-linear-gradient(
    to bottom,
    #2a8018 0px, #2a8018 30px,
    #309120 30px, #309120 60px
  );
}

.campo-linha-meio {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 2px;
  background: rgba(255,255,255,0.25);
}
.campo-circulo {
  position: absolute;
  left: 50%; top: 50%;
  width: 28%; aspect-ratio: 1;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.2);
  transform: translate(-50%,-50%);
}
.campo-area {
  position: absolute;
  left: 50%;
  width: 55%; height: 20%;
  border: 2px solid rgba(255,255,255,0.2);
  transform: translateX(-50%);
}
.campo-area-ataque  { top: 0;    border-top: none; }
.campo-area-defesa  { bottom: 0; border-bottom: none; }

/* Slot no campo online */
.slot-ol {
  position: absolute;
  /* Tamanho/fonte agora vêm do modelo único em campo.css (cqw). */
  border-radius: 50%;
  border: 2px dashed rgba(255,255,255,0.4);
  background: rgba(0,0,0,0.28);
  color: rgba(255,255,255,0.6);
  font-family: 'Archivo Black', sans-serif;
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  transform: translate(-50%,-50%);
  transition: left 0.4s ease, top 0.4s ease;
}
.slot-ol.preenchido {
  border-style: solid;
  border-color: rgba(255,255,255,0.85);
  background: rgba(255,255,255,0.9);
  color: #1A1813;
  font-size: var(--fs-legenda);
  font-weight: 700;
  flex-direction: column;
  gap: 1px;
  z-index: 2;
}
/* Ficha com nome em cima fica acima das vizinhas, p/ a etiqueta nunca sumir atrás. */
.slot-ol.nome-acima { z-index: 3; }
.slot-ol .slot-ol-forca {
  font-size: clamp(0.6rem, 2.5cqw, 0.82rem);
  font-family: 'Archivo', sans-serif;
  font-weight: 700;
  color: #444;
  line-height: 1;
}
.slot-ol .slot-nome {
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  margin-top: 3px;
  background: rgba(0,0,0,0.72);
  color: #fff;   /* fundo é escuro FIXO (contraste sobre o campo verde), então texto branco fixo —
                    NÃO usar var(--txt): no modo claro o token vira escuro e some sobre o fundo preto */
  font-family: 'Archivo', sans-serif;
  font-size: clamp(0.74rem, 2.4cqw, 0.92rem);
  font-weight: 700;
  white-space: nowrap;
  padding: 2px 6px;
  border-radius: var(--raio-xs);
  pointer-events: none;
  z-index: 5;
}

/* Quando há uma ficha logo abaixo, a etiqueta sobe para cima da bolinha. */
.slot-ol.nome-acima .slot-nome {
  top: auto;
  bottom: 100%;
  margin-top: 0;
  margin-bottom: 3px;
}

/* Vaga ABERTA e VÁLIDA para o jogador selecionado (clicável e pulsando) */
.slot-ol.vaga-valida {
  border-style: solid;
  border-color: var(--ouro);
  background: rgba(217,178,90,0.18);
  color: var(--ouro-claro);
  cursor: pointer;
  animation: vagaPulsa 1.1s ease-in-out infinite;
}
.slot-ol.vaga-valida:hover { background: rgba(217,178,90,0.32); }
.slot-ol.vaga-selecionada {
  border-style: solid;
  border-color: var(--accent);
  background: rgba(43,212,106,0.55);
  color: #06210F;
  cursor: pointer;
  animation: none;
  box-shadow: 0 0 0 3px rgba(43,212,106,0.45), 0 0 18px rgba(43,212,106,0.6);
}
@keyframes vagaPulsa {
  0%,100% { box-shadow: 0 0 0 3px rgba(217,178,90,0.22), 0 0 10px rgba(217,178,90,0.35); }
  50%     { box-shadow: 0 0 0 4px rgba(217,178,90,0.38), 0 0 16px rgba(217,178,90,0.55); }
}
/* Jogador já escalado que está sendo remanejado (vaga de origem) */
#draft-campo .slot-ol.preenchido { cursor: pointer; }
.slot-ol.vaga-origem {
  cursor: pointer;
  box-shadow: 0 0 0 3px #2BD46A, 0 0 16px rgba(43,212,106,0.75);
  filter: brightness(1.12);
}
/* Slot recém-adicionado */
.slot-ol.novo {
  animation: slotNovo 0.35s ease;
}
@keyframes slotNovo {
  from { transform: translate(-50%,-50%) scale(0.5); opacity: 0; }
  to   { transform: translate(-50%,-50%) scale(1);   opacity: 1; }
}

/* ── Botão "Jogar Online" (home) ────────────────────────────────────────── */
.btn-jogar-online {
  display: inline-block;
  margin-top: 0.7rem;
  padding: 0.6rem 1.4rem;
  border: 1.5px solid rgba(217,178,90,0.45);
  border-radius: var(--raio-md);
  background: transparent;
  color: var(--ouro);
  font-family: 'Archivo Black', sans-serif;
  font-size: var(--fs-sm);
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.btn-jogar-online:hover {
  background: rgba(217,178,90,0.1);
  border-color: var(--ouro);
}

/* ── Modal Online (criar/entrar) ────────────────────────────────────────── */
.modal-online-card {
  background: #1c1c1c;
  border: 1px solid var(--linha);
  border-radius: var(--raio-xl);
  padding: 2rem 1.8rem 1.6rem;
  width: 100%;
  max-width: 560px;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal-online-cols {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: var(--sp-7);
  margin: 1.2rem 0 0.8rem;
  align-items: start;
}
.modal-online-lado {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}
.modal-online-h3 {
  font-family: 'Archivo Black', sans-serif;
  font-size: var(--fs-sm);
  color: var(--txt);
  margin: 0;
}
.modal-online-rotulo {
  font-size: var(--fs-legenda);
  letter-spacing: 0.12em;
  color: var(--txt-dim);
  text-transform: uppercase;
}
.modal-online-codigo-wrap {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}
.modal-codigo-display-row {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}
.modal-codigo-display {
  font-family: 'Archivo Black', sans-serif;
  font-size: var(--fs-2xl);
  color: var(--ouro);
  letter-spacing: 0.35em;
  line-height: 1;
}
.btn-copiar {
  background: none;
  border: 1px solid var(--linha);
  border-radius: var(--raio-sm);
  padding: 0.3rem 0.5rem;
  color: var(--txt-soft);
  cursor: pointer;
  font-size: var(--fs-base);
  transition: color 0.15s, border-color 0.15s;
}
.btn-copiar:hover { color: var(--ouro); border-color: var(--ouro); }
.modal-online-divisor {
  width: 1px;
  background: var(--elev-1);
  min-height: 80px;
  align-self: stretch;
}

