/* ===== modals.css — Modais e overlays (deck, bolsa via soul-bag, tutorial, painel de som) =====
   Gerado por tools/split-css-modules.mjs (Fase B-CSS). Nao editar a divisao manualmente sem
   reconferir a cascata. Ver VaultBrain/Brain/Padroes/Padroes CSS.md ===== */
#bestiary-modal {
  display: none;
  position: absolute;
  inset: 0;
  background: rgba(var(--black-rgb), 0.88);
  z-index: var(--z-modal);
  flex-direction: column;
  overflow: hidden;
}
#bestiary-modal.open {
  display: flex;
}
#deck-editor-modal .animal-cost {
  font-size: clamp(9px, 2.5vw, 11px);
  top: 3px;
  right: 5px;
}
#deck-editor-modal .animal-name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(7px, 2vw, 10px);
}
#deck-slots .animal-name {
  font-size: clamp(7.5px, 2.1vw, 10.5px);
}
#deck-editor-modal .animal-name.name-long {
  font-size: clamp(6px, 1.6vw, 8px);
}
#deck-slots .animal-cost {
  font-size: clamp(11px, 3vw, 13px);
  top: 3px;
  right: 6px;
}
#deck-editor-modal .animal-card[data-cost] {
  border-width: 1.5px;
}
#deck-editor-modal {
  display: none;
  position: absolute;
  inset: 0;
  background: #0d1520 url('../img/escolher_time_buff.webp') center/cover no-repeat;
  z-index: var(--z-modal);
  flex-direction: column;
  overflow: hidden;
}
#deck-editor-modal.open {
  display: flex;
}
.bestiary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  padding-top: calc(10px + env(safe-area-inset-top));
  border-bottom: 2px solid var(--accent);
  background: var(--surface);
  flex-shrink: 0;
}
.bestiary-title {
  font-family: 'Righteous', cursive;
  font-size: 18px;
  color: var(--accent);
}
.bestiary-close {
  background: var(--surface2);
  border: none;
  color: var(--text);
  font-size: 18px;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-md);
  cursor: pointer;
}
.bestiary-list {
  flex: 1;
  overflow-y: auto;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.bestiary-entry {
  background: linear-gradient(135deg, rgba(var(--surface-rgb), 0.95), rgba(20, 32, 52, 0.95));
  border: 1.5px solid rgba(var(--white-rgb), 0.08);
  border-radius: var(--radius-lg);
  padding: 8px;
  display: flex;
  gap: 8px;
  box-shadow:
    inset 0 1px 1px rgba(var(--white-rgb), 0.04),
    0 2px 6px rgba(var(--black-rgb), 0.2);
}
.bestiary-icon {
  font-size: 32px;
  flex-shrink: 0;
}
.bestiary-info {
  flex: 1;
}
.bestiary-name {
  font-family: 'Righteous', cursive;
  font-size: 14px;
  color: var(--accent);
  margin-bottom: 3px;
}
.bestiary-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-bottom: 4px;
}
.bestiary-stat {
  background: var(--surface2);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-size: 9px;
  font-weight: 700;
}
.bestiary-sp {
  font-size: 10px;
  color: var(--green);
  font-weight: 700;
}
.bestiary-spdesc {
  font-size: 9px;
  color: var(--text2);
}
#pick-sound-panel {
  display: none;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: var(--z-modal-panel);
  background: linear-gradient(180deg, rgba(10, 16, 28, 0) 0%, rgba(10, 16, 28, 0.97) 14px);
  padding: 14px 16px 12px;
  border-top: 1.5px solid rgba(var(--accent-rgb), 0.25);
  box-shadow: 0 -8px 30px rgba(var(--black-rgb), 0.55);
  animation: pick-snd-in 0.18s ease-out;
}
#pick-sound-panel.open {
  display: block;
}
.pick-snd-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}
.pick-snd-row:last-child {
  margin-bottom: 0;
}
.pick-snd-label {
  font-family: 'Righteous', cursive;
  font-size: 11px;
  color: var(--text2);
  letter-spacing: 1px;
  min-width: 34px;
}
.pick-snd-row input[type='range'] {
  flex: 1;
  height: 4px;
  accent-color: var(--accent);
  cursor: pointer;
}
.pick-snd-val {
  font-family: 'Righteous', cursive;
  font-size: 11px;
  color: var(--accent);
  min-width: 28px;
  text-align: right;
}
#pick-snd-mute-btn {
  flex: 1;
  padding: 7px 0;
  border: 1.5px solid rgba(var(--accent-rgb), 0.3);
  border-radius: var(--radius-lg);
  background: rgba(var(--accent-rgb), 0.08);
  color: var(--text);
  font-family: 'Righteous', cursive;
  font-size: 12px;
  cursor: pointer;
  transition: all 0.15s;
}
#pick-snd-mute-btn.muted {
  border-color: rgba(var(--red-rgb), 0.4);
  background: rgba(var(--red-rgb), 0.1);
  color: var(--red);
}

#tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-overlay-tutorial);
  pointer-events: none;
  font-family: 'Righteous', cursive;
}
#tutorial-overlay.active {
  pointer-events: all;
}
/* ===== Tela de cadastro de nick — aviso de nick negado ===== */
/* Caixa de alerta com borda marcante. So aparece quando ha mensagem (:empty zera tudo). O
   posicionamento/cor/fonte do #nick-reg-error vem do estilo inline no index.html. */
#nick-reg-error {
  border: 2px solid #ff3b3b;
  background: rgba(40, 6, 6, 0.94);
  border-radius: 9px;
  padding: 7px 10px;
  box-sizing: border-box;
  box-shadow:
    0 0 12px rgba(255, 60, 60, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.6);
}
#nick-reg-error:empty {
  border: none;
  background: none;
  box-shadow: none;
  padding: 0;
}
