/* ==============================
   PODERES — Page styles (STR)
   ============================== */

/* começa oculto; JS mostra quando o usuário clicar em "Classe" */
#classFilters {
  display: none;
}

/* filtros secundários */
.secondary-filters {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, .25);
  padding-top: 12px;
}

.filters-sep {
  opacity: .55;
  user-select: none;
}

.toggle-paths.is-open {
  background: var(--str-accent);
  color: #fff;
}

/* caminhos: colapsável + scroll horizontal */
.paths-wrap {
  width: 100%;
  display: none;
  gap: 8px;
  align-items: center;
  padding: 8px 0 2px;
  overflow-x: auto;
  white-space: nowrap;
}

.secondary-filters.show-paths .paths-wrap {
  display: flex;
}

.paths-wrap .path-btn {
  flex: 0 0 auto;
}

.paths-wrap::-webkit-scrollbar {
  height: 6px;
}

.paths-wrap::-webkit-scrollbar-thumb {
  background: rgba(0, 0, 0, .18);
  border-radius: 999px;
}

/* ===== GRID de poderes ===== */
.powers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}

/* ===== CARD ===== */
.power-card {
  background: var(--card-bg);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .04);
  transition: .12s;
}

.power-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 18px rgba(0, 0, 0, .08);
}

.power-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.power-name {
  font-family: "Tormenta";
  font-size: 1.12rem;
  color: var(--str-accent);
  flex: 1 1 240px;
  min-width: 0;
  margin: 0;
}

/* TAG: agora quebra em até 2 linhas */
.power-type {
  background: var(--str-slate-2);
  color: #fff;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.2;
  max-width: 100%;

  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.power-meta {
  margin-top: 10px;
  color: var(--text-muted);
  font-size: .9rem;
}

.power-desc {
  margin-top: 10px;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.power-hint {
  font-size: .85rem;
  color: var(--str-accent);
  margin-top: 10px;
  font-style: italic;
}

/* ===== MODAL conteúdo (interno) ===== */
.modal-header {
  display: flex;
  gap: 12px;
  align-items: baseline;
  justify-content: space-between;
  padding-right: 44px;
  margin-bottom: 10px;
}

.modal-meta {
  color: var(--text-muted);
  line-height: 1.55;
}

/* Mobile tweaks */
@media (max-width:720px) {
  .powers-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   CARRINHO DE PODERES
   ============================================================ */

/* --- FAB (botão flutuante) --- */
.cart-fab {
  position: fixed;
  bottom: 72px;
  right: 24px;
  z-index: 1100;
  background: var(--str-accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 12px 20px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(0, 0, 0, .28);
  display: flex;
  align-items: center;
  gap: 8px;
  transition: transform .15s, box-shadow .15s, background .15s;
}

.cart-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
}

.cart-count {
  background: #fff;
  color: var(--str-accent);
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 800;
  min-width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
  line-height: 1;
}

.cart-count.zero {
  background: rgba(255, 255, 255, .35);
  color: #fff;
}

/* --- Overlay escuro --- */
.cart-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .45);
  z-index: 1150;
}

.cart-overlay.active {
  display: block;
}

/* --- Painel lateral --- */
.cart-panel {
  position: fixed;
  top: 0;
  right: -420px;
  width: min(420px, 100vw);
  height: 100dvh;
  background: var(--bg, #fff);
  border-left: 2px solid var(--border);
  z-index: 1200;
  display: flex;
  flex-direction: column;
  transition: right .28s cubic-bezier(.4, 0, .2, 1);
  box-shadow: -6px 0 32px rgba(0, 0, 0, .18);
}

.cart-panel.open {
  right: 0;
}

.cart-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--str-accent);
  color: #fff;
}

.cart-panel-title {
  font-family: "Tormenta", serif;
  font-size: 1.15rem;
  font-weight: 700;
}

.cart-close-btn {
  background: none;
  border: none;
  color: #fff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  opacity: .85;
  padding: 0 4px;
  transition: opacity .1s;
}

.cart-close-btn:hover {
  opacity: 1;
}

/* --- Lista vazia --- */
.cart-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
  padding: 32px 24px;
  color: var(--text-muted, #888);
  text-align: center;
}

.cart-empty small {
  font-size: .82rem;
}

.cart-empty.hidden {
  display: none;
}

/* --- Lista de poderes --- */
.cart-list {
  list-style: none;
  margin: 0;
  padding: 12px 16px;
  overflow-y: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-list.hidden {
  display: none;
}

.cart-item {
  background: var(--card-bg, #f8f8f8);
  border: 1px solid var(--border);
  border-radius: var(--radius, 8px);
  padding: 10px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: cartItemIn .18s ease;
}

@keyframes cartItemIn {
  from {
    opacity: 0;
    transform: translateX(14px);
  }

  to {
    opacity: 1;
    transform: translateX(0);
  }
}

.cart-item-info {
  flex: 1;
  min-width: 0;
}

.cart-item-name {
  font-family: "Tormenta", serif;
  font-size: .97rem;
  color: var(--str-accent);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cart-item-meta {
  font-size: .76rem;
  color: var(--text-muted, #888);
  margin-top: 2px;
}

.cart-item-remove {
  background: none;
  border: none;
  color: #c0392b;
  font-size: 1.15rem;
  cursor: pointer;
  padding: 0 2px;
  line-height: 1;
  flex-shrink: 0;
  opacity: .7;
  transition: opacity .1s;
  margin-top: 1px;
}

.cart-item-remove:hover {
  opacity: 1;
}

/* --- Rodapé do painel --- */
.cart-panel-footer {
  padding: 16px 16px 20px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.cart-export-btn,
.cart-clear-btn {
  width: 100%;
  padding: 11px 0;
  border-radius: var(--radius, 8px);
  font-size: .93rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  transition: opacity .15s, transform .12s;
}

.cart-export-btn {
  background: var(--str-accent);
  color: #fff;
}

.cart-export-btn:disabled,
.cart-clear-btn:disabled {
  opacity: .38;
  cursor: not-allowed;
}

.cart-export-btn:not(:disabled):hover {
  opacity: .88;
  transform: translateY(-1px);
}

.cart-clear-btn {
  background: #f0f0f0;
  color: #555;
  border: 1px solid var(--border);
}

.cart-clear-btn:not(:disabled):hover {
  background: #fde8e8;
  color: #c0392b;
}

/* --- Botão no modal --- */
.modal-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
}

.modal-cart-btn {
  background: var(--str-accent);
  color: #fff;
  border: none;
  border-radius: var(--radius, 8px);
  padding: 10px 22px;
  font-size: .95rem;
  font-weight: 700;
  cursor: pointer;
  transition: opacity .15s, transform .12s;
}

.modal-cart-btn:hover {
  opacity: .88;
  transform: translateY(-1px);
}

.modal-cart-btn.in-cart {
  background: #27ae60;
}

.modal-cart-btn.in-cart::before {
  content: "✓ ";
}


/* css/poderes.css */
.paths-wrap {
  display: flex;
  /* Transforma em um container flexível */
  flex-wrap: wrap;
  /* Permite que os botões quebrem linha se necessário */
  justify-content: center;
  /* Centraliza os botões horizontalmente */
  gap: 8px;
  /* Mantém o espaçamento entre os botões */
  width: 100%;
  /* Garante que ocupe a largura total para poder centralizar */
  margin: 10px auto;
  /* Adiciona margem em cima/baixo e centraliza o bloco */
  text-align: center;
  /* Backup para alinhamento de texto */
}
