/**
 * sorteio.css
 * Painel de configuração do sorteio e o "Quadro de Escalação" (elemento
 * visual de assinatura do app) com os times sorteados.
 */
.draw-panel {
  background: var(--giz); color: var(--preto); border-radius: var(--radius); box-shadow: var(--sombra);
  padding: 22px; margin-bottom: 24px;
}
.draw-controls { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }

.mode-toggle { display: flex; border: 1px solid rgba(23, 21, 18, 0.18); border-radius: 8px; overflow: hidden; }
.mode-toggle button {
  flex: 1; background: transparent; border: none; padding: 10px 8px; cursor: pointer;
  font-family: 'Inter'; font-size: 0.82rem; font-weight: 600; color: rgba(23, 21, 18, 0.55);
}
.mode-toggle button.on { background: var(--campo); color: var(--branco); }

.captains-box { border-top: 1px dashed rgba(23, 21, 18, 0.18); padding-top: 16px; margin-top: 4px; }
.captains-box .chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.chip {
  font-size: 0.82rem; padding: 7px 12px; border-radius: 20px; border: 1px solid rgba(23, 21, 18, 0.2);
  background: transparent; cursor: pointer; font-family: 'Inter'; font-weight: 600;
}
.chip.on { background: var(--terra); color: var(--branco); border-color: var(--terra); }
.chip:disabled { opacity: 0.35; cursor: not-allowed; }

.draw-actions { display: flex; gap: 10px; margin-top: 20px; flex-wrap: wrap; }

/* Quadro de escalação — elemento de assinatura visual */
.board {
  background: var(--campo-escuro);
  border: 2px solid var(--preto);
  border-radius: var(--radius);
  padding: 26px 20px;
  position: relative;
  box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.4);
}
.board::before {
  content: "QUADRO DE ESCALAÇÃO";
  position: absolute; top: -13px; left: 20px;
  background: var(--amarelo); color: var(--preto);
  font-family: 'Bebas Neue'; letter-spacing: 0.08em; font-size: 0.78rem;
  padding: 4px 12px; border-radius: 4px;
}
.teams-grid {
  display: grid; gap: 16px; margin-top: 10px;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}
.team-card {
  background: var(--giz); color: var(--preto);
  border-radius: 10px; padding: 16px;
  transform: rotate(var(--tilt, 0deg));
  box-shadow: var(--sombra);
  animation: dealIn .45s ease backwards;
  border-top: 6px solid var(--team-color, var(--terra));
}
@keyframes dealIn {
  from { opacity: 0; transform: translateY(18px) rotate(var(--tilt, 0deg)) scale(0.95); }
  to { opacity: 1; transform: translateY(0) rotate(var(--tilt, 0deg)) scale(1); }
}
.team-card h3 { font-family: 'Bebas Neue'; font-size: 1.2rem; margin: 0 0 2px; letter-spacing: 0.03em; }
.team-card .capitao {
  font-size: 0.72rem; color: var(--terra); font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 6px;
}
.team-card .team-pos {
  font-family: 'JetBrains Mono', monospace; font-size: 0.68rem; letter-spacing: 0.02em;
  color: rgba(23, 21, 18, 0.55); margin-bottom: 10px;
}
.team-card ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.team-card li {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 0.85rem; border-bottom: 1px dotted rgba(23, 21, 18, 0.15); padding-bottom: 5px;
}
.team-card li .k { color: var(--terra); }
.team-card li.is-capt { font-weight: 800; }
.team-card li.is-capt::before { content: "© "; font-size: 0.7rem; }

/* ---- edição da escalação ---- */
.board-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.team-card.editing { animation: none; transform: none; }
.team-card-bench { border-top-color: rgba(23, 21, 18, 0.3); opacity: 0.95; }
.team-card li.edit-row {
  flex-direction: column; align-items: stretch; gap: 6px;
  border-bottom: 1px dotted rgba(23, 21, 18, 0.15); padding: 6px 0 8px;
}
.edit-name { font-weight: 600; }
.edit-name .k { color: var(--terra); font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; }
.edit-moves { display: flex; gap: 4px; flex-wrap: wrap; }
.edit-moves .mv {
  font-family: 'Inter'; font-size: 0.7rem; font-weight: 700;
  border: 1px solid rgba(23, 21, 18, 0.25); background: rgba(23, 21, 18, 0.04);
  color: rgba(23, 21, 18, 0.75);
  border-radius: 14px; padding: 4px 9px; cursor: pointer;
}
.edit-moves .mv:hover { background: var(--campo); color: var(--branco); border-color: var(--campo); }
.edit-moves .mv-out { color: var(--vermelho); border-color: rgba(184, 74, 62, 0.4); }
.edit-moves .mv-out:hover { background: var(--vermelho); color: var(--branco); border-color: var(--vermelho); }

.history { margin-top: 22px; display: flex; gap: 8px; flex-wrap: wrap; }
.history-chip {
  font-family: 'JetBrains Mono', monospace; font-size: 0.72rem;
  background: rgba(245, 242, 231, 0.06); border: 1px solid var(--linha); color: rgba(245, 242, 231, 0.7);
  padding: 6px 10px; border-radius: 6px; cursor: pointer;
}
.history-chip:hover { border-color: var(--amarelo); color: var(--giz); }

@media (max-width: 720px) {
  .draw-controls { grid-template-columns: 1fr; }
}
