/* Talent Tree Modal (Base Styles) */
.talent-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 10000;
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.talent-overlay.open {
  opacity: 1;
  pointer-events: auto;
}

.talent-modal {
  background: var(--panel, #fff);
  width: 720px;
  max-width: 92vw;
  max-height: 90vh;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  transform: translateY(16px);
  transition: transform 0.25s ease;
  overflow: hidden;
}

.talent-modal.open {
  transform: translateY(0);
}

.talent-header {
  padding: 14px 18px;
  border-bottom: 1px solid var(--panel-border, #ddd);
  display: flex;
  align-items: center;
  gap: 12px;
}

.talent-points {
  margin-left: auto;
  font-weight: 600;
}

.talent-close {
  background: none;
  border: none;
  font-size: 22px;
  cursor: pointer;
  color: var(--muted, #888);
  padding: 0;
  line-height: 1;
}

.talent-close:hover {
  color: var(--text, #000);
}

.talent-lines {
  padding: 16px 20px;
  overflow-y: auto;
  background: var(--bg, #f9f9f9);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.talent-line {
  background: var(--panel, #fff);
  border: 1px solid var(--panel-border, #ddd);
  border-radius: 6px;
  padding: 12px;
}

.talent-line h4 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--text-head, #333);
}

.talent-node {
  border-top: 1px dashed var(--panel-border, #ddd);
  padding: 8px 0;
  cursor: pointer;
}

.talent-node:first-of-type {
  border-top: none;
}

.talent-node h5 {
  margin: 0 0 4px;
  font-size: 14px;
}

.talent-node p {
  margin: 0;
  color: var(--muted, #666);
}

.talent-node.locked {
  opacity: 0.6;
  cursor: not-allowed;
}

.talent-node.available {
  background: rgba(0, 0, 0, 0.04);
}

.talent-node.unlocked {
  background: rgba(46, 125, 50, 0.12);
}

@media (max-width: 900px) {
  .talent-lines {
    grid-template-columns: 1fr;
  }
}

/* Talent points badge on button */
.btn.badge-on {
  position: relative;
}

.btn-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 6px;
  margin-left: 6px;
  border-radius: 999px;
  background: var(--ok, #4caf50);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 0 0 1px rgba(0,0,0,0.25);
}
