/* =====================================================================
   Black Archlord — Class Rebalance (rebalance.php)
   Índice de clases a la izquierda y una clase a la derecha; el cambio de
   clase lo hace assets/js/rebalance.js (atributo hidden y aria-current).
   ===================================================================== */

.nw-reb-date {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--nw-gold);
  font-family: var(--nw-font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.nw-reb-stats {
  display: flex;
  gap: 12px;
}

.rebalance-book {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  align-items: start;
  gap: 22px;
  padding-bottom: 60px;
}

/* ---------- Índice ---------- */

.rebalance-navigation {
  position: sticky;
  top: calc(var(--nw-header-h) + 16px);
  padding-bottom: 10px;
}

.nw-reb-nav-head {
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--nw-line-soft);
}

.nw-reb-nav-title {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  font-family: var(--nw-font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nw-reb-nav-title i {
  color: var(--nw-gold);
  font-size: 14px;
}

.nw-reb-nav-head small {
  display: block;
  margin-top: 4px;
  color: var(--nw-muted);
  font-size: 12px;
}

.nw-reb-nav-list {
  display: grid;
  gap: 2px;
  padding: 10px 10px 0;
}

.nw-reb-nav-list a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-left: 2px solid transparent;
  color: #d9ccc6;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.nw-reb-nav-list a small {
  min-width: 26px;
  padding: 1px 6px;
  border: 1px solid var(--nw-line-soft);
  color: var(--nw-muted);
  font-size: 11px;
  text-align: center;
}

.nw-reb-nav-list a:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.nw-reb-nav-list a[aria-current="true"] {
  border-left-color: var(--nw-red-hot);
  color: #fff;
  background: linear-gradient(90deg, rgba(227, 52, 42, 0.22), rgba(227, 52, 42, 0.04));
}

.nw-reb-nav-list a[aria-current="true"] small {
  border-color: rgba(255, 90, 60, 0.5);
  color: var(--nw-red-hot);
}

/* ---------- Clase ---------- */

.rebalance-classes {
  min-width: 0;
}

.rebalance-card[hidden] {
  display: none !important;
}

.rebalance-card:not([hidden]) {
  animation: nw-reb-in 0.25s ease both;
}

@keyframes nw-reb-in {
  from { opacity: 0; transform: translateX(10px); }
  to { opacity: 1; transform: translateX(0); }
}

.nw-reb-card-head {
  flex-wrap: wrap;
}

.nw-reb-count {
  color: var(--nw-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.nw-reb-count b {
  color: var(--nw-gold);
  font-size: 14px;
}

.nw-reb-skills {
  margin: 0;
  padding: 8px 22px 18px;
}

.nw-reb-skill {
  display: grid;
  grid-template-columns: minmax(170px, 0.32fr) minmax(0, 1fr);
  gap: 6px 18px;
  padding: 13px 0;
  border-bottom: 1px solid var(--nw-line-soft);
}

.nw-reb-skill:last-child {
  border-bottom: 0;
}

.nw-reb-skill dt {
  color: var(--nw-gold);
  font-weight: 700;
  font-size: 14px;
}

.nw-reb-skill dd {
  margin: 0;
  color: #d9ccc6;
  font-size: 14px;
  line-height: 1.6;
}

/* ---------- Responsive ---------- */

@media (max-width: 991px) {
  .rebalance-book {
    grid-template-columns: 1fr;
  }

  .rebalance-navigation {
    position: relative;
    top: auto;
  }

  .nw-reb-nav-list {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding-bottom: 4px;
  }
}

@media (max-width: 640px) {
  .nw-reb-stats {
    width: 100%;
  }

  .nw-reb-stats .nw-page-count {
    flex: 1 1 0;
    min-width: 0;
  }

  .nw-reb-nav-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .nw-reb-skills {
    padding: 4px 16px 14px;
  }

  .nw-reb-skill {
    grid-template-columns: 1fr;
  }
}
