/* =========================================================
   wowfarsi - talent trees page \u00b7 v8 minimal "sigil" edition
   Sharp hairlines, flat surfaces, no ornament: the tree
   itself is the decoration. Buttons/chips echo the logo
   flourish: a thin line broken by a small circle.
   ========================================================= */

.tt-page-head { text-align: center; margin-bottom: 2.25rem; }
.tt-page-head .sect-head { margin-bottom: 0; }

/* ---------- class tabs (switch on hover + click) ---------- */
.tt-class-tabs {
  display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center;
  column-gap: 2rem; row-gap: 1.5rem;
  margin-bottom: 2rem;
}
.tt-class-tab { display: flex; width: 76px; flex-direction: column; align-items: center; gap: 0.625rem; }
.tt-class-tab .wf-crest { transition: transform 0.25s ease; }
.tt-class-tab:hover .wf-crest { transform: translateY(-5px); }
.tt-class-tab span.label {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.14em; color: var(--parch-dim); transition: color 0.2s ease;
}

/* ---------- spec chips (switch on hover + click) ---------- */
.tt-spec-bar { display: flex; justify-content: center; min-height: 34px; margin-bottom: 1.5rem; }
.tt-spec-chips { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.5rem; direction: ltr; }
.tt-chip {
  position: relative;
  padding: 0.45rem 1.05rem;
  font-size: 13px; font-weight: 800; letter-spacing: 0.05em;
  color: var(--parch-dim);
  background: rgba(6, 9, 16, 0.55);
  border: 1px solid rgba(240, 199, 94, 0.2);
  border-radius: 0;
  transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}
.tt-chip:hover { color: var(--gold-1); border-color: rgba(240, 199, 94, 0.55); }
.tt-chip[data-active="true"] {
  color: var(--gold-1);
  border-color: rgba(240, 199, 94, 0.85);
  background: rgba(240, 199, 94, 0.1);
}
/* flourish dot sitting in the middle of the active chip's bottom hairline */
.tt-chip[data-active="true"]::after {
  content: "";
  position: absolute; left: 50%; bottom: 0;
  width: 5px; height: 5px;
  transform: translate(-50%, 50%);
  border-radius: 9999px;
  background: var(--gold-2);
  box-shadow: 0 0 0 2px var(--ink-0), 0 0 8px rgba(240, 199, 94, 0.7);
}

/* ---------- canvas panel (minimal flat) ---------- */
.tt-frame {
  position: relative;
  border: 1px solid rgba(240, 199, 94, 0.22);
  background: linear-gradient(180deg, rgba(5, 8, 14, 0.62) 0%, rgba(4, 6, 11, 0.8) 100%);
  backdrop-filter: blur(8px);
}
.tt-panel { position: relative; }
.tt-canvas {
  position: relative;
  height: clamp(580px, 86vh, 820px);
  touch-action: pan-y; /* one-finger vertical swipe keeps scrolling the page */
  cursor: grab;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
}
.tt-canvas.is-panning { cursor: grabbing; }
@media (max-width: 768px) { .tt-canvas { height: 540px; } }

.tt-canvas svg { width: 100%; height: 100%; display: block; direction: ltr; }

/* slide transition for spec/class switching */
.tt-view { transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease; }
.tt-view.enter-l { transform: translateX(-26px); opacity: 0; }
.tt-view.enter-r { transform: translateX(26px); opacity: 0; }

/* ---------- svg pieces: hairlines + flat discs ---------- */
.tt-edge { stroke: rgba(222, 195, 120, 0.2); stroke-width: 0.035; }
.tt-zone-frame { fill: none; stroke-width: 0.03; }
.tt-zone-frame.g-class { stroke: rgba(95, 109, 133, 0.38); }
.tt-zone-frame.g-hero { stroke: rgba(111, 149, 201, 0.32); }
.tt-zone-frame.g-spec { stroke: rgba(169, 136, 60, 0.42); }
.tt-zone-rule { stroke: rgba(240, 199, 94, 0.12); stroke-width: 0.016; }
.tt-zone-head {
  font-family: "Cinzel", serif;
  font-size: 0.215px;
  letter-spacing: 0.28em;
  fill: rgba(232, 227, 214, 0.48);
  text-transform: uppercase;
}
.tt-zone-head.g-hero { fill: rgba(143, 180, 232, 0.58); }
.tt-hero-label {
  font-family: "Cinzel", serif;
  font-size: 0.19px;
  letter-spacing: 0.1em;
  fill: rgba(143, 180, 232, 0.82);
  text-transform: uppercase;
}
.tt-hero-flourish line { stroke: rgba(143, 180, 232, 0.35); stroke-width: 0.016; }
.tt-hero-flourish circle { fill: #6f95c9; }
.tt-node { cursor: pointer; }
.tt-node .nd-body { transition: filter 0.15s ease; }
.tt-node:hover .nd-body { filter: brightness(1.45); }
.tt-node image { pointer-events: none; }
.tt-letter { pointer-events: none; }
.tt-gate-ring {
  fill: none;
  stroke: rgba(224, 185, 84, 0.42);
  stroke-width: 0.03;
  stroke-dasharray: 0.1 0.07;
}

/* ---------- toolbar (bottom-left, above the hint row) ---------- */
.tt-toolbar { position: absolute; left: 0.75rem; bottom: 3rem; z-index: 20; display: flex; align-items: center; gap: 0.4rem; direction: ltr; }
.tt-zoom-btn {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  color: var(--gold-1);
  background: rgba(5, 8, 14, 0.78);
  border: 1px solid rgba(240, 199, 94, 0.28);
  border-radius: 0;
  transition: border-color 0.15s ease, color 0.15s ease;
  backdrop-filter: blur(6px);
}
.tt-zoom-btn:hover { border-color: var(--gold-2); color: var(--gold-2); }
.tt-zoom-val { min-width: 46px; text-align: center; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; color: var(--parch-dim); }

.tt-build {
  position: absolute; right: 0.9rem; top: 0.9rem; z-index: 20;
  font-size: 11px; letter-spacing: 0.06em; color: #6a7389;
}

/* hint lives under the canvas now, so it never covers the tree */
.tt-hint {
  position: static; transform: none;
  padding: 0.7rem 1rem 0.85rem;
  text-align: center; white-space: normal;
  border-top: 1px solid rgba(240, 199, 94, 0.1);
  font-size: 12px; font-weight: 700; color: rgba(168, 162, 148, 0.85);
}
@media (max-width: 768px) { .tt-hint { font-size: 11px; } }

/* ---------- tooltip (sharp, hairline, flourish dot) ---------- */
.tt-tip {
  position: absolute;
  z-index: 30;
  width: 340px;
  max-width: 86vw;
  max-height: calc(100% - 16px);
  overflow: hidden;
  pointer-events: none;
  padding: 14px 16px 12px;
  border-radius: 0;
  background: rgba(5, 7, 12, 0.97);
  border: 1px solid rgba(240, 199, 94, 0.35);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(8px);
}
.tt-tip::before {
  content: "";
  position: absolute; top: 0; left: 14px;
  width: 6px; height: 6px;
  transform: translateY(-50%);
  border-radius: 9999px;
  background: var(--gold-2);
  box-shadow: 0 0 0 2px rgba(5, 7, 12, 1);
}
.tt-tip .ttip-name { font-size: 15px; font-weight: 700; line-height: 1.4; color: var(--gold-2); }
.tt-tip .ttip-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; margin-top: 0.5rem; }
.tt-tip .ttip-badge { border: 1px solid rgba(232, 227, 214, 0.16); padding: 0.125rem 0.4rem; font-size: 10px; font-weight: 700; color: var(--parch-dim); border-radius: 0; }
.tt-tip .ttip-badge.b-blue { border-color: rgba(143, 180, 232, 0.4); background: rgba(143, 180, 232, 0.08); color: var(--blue-1); }
.tt-tip .ttip-badge.b-rank { border-color: rgba(240, 199, 94, 0.35); color: #e9dfc8; }
.tt-tip .ttip-cls { font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: #6a7389; }
.tt-tip .ttip-entry + .ttip-entry { margin-top: 0.75rem; padding-top: 0.6rem; border-top: 1px dashed rgba(240, 199, 94, 0.14); }
.tt-tip .ttip-sub { margin-top: 0.6rem; font-size: 13px; font-weight: 700; color: #e9dfc8; }
.tt-tip .ttip-kind { margin-inline-start: 0.4rem; font-size: 10px; font-weight: 700; color: #8b93a6; }
.tt-tip .ttip-desc { margin-top: 0.5rem; font-size: 13px; line-height: 1.6; color: #c9c3b4; }
.tt-tip .ttip-fa { margin-top: 0.55rem; padding-top: 0.55rem; border-top: 1px solid rgba(240, 199, 94, 0.18); }
.tt-tip .ttip-fa .fa-tag { display: inline-block; background: rgba(240, 199, 94, 0.14); padding: 0.125rem 0.4rem; font-size: 10px; font-weight: 900; letter-spacing: 0.06em; color: var(--gold-2); border-radius: 0; }
.tt-tip .ttip-fa p { margin-top: 0.4rem; font-size: 14px; line-height: 1.85; color: #f0e9d6; }
/* values only the game can compute — a quiet chip that depends on
   the character's own stats; the title explains it on hover */
.tt-tip .tk {
  pointer-events: auto;
  display: inline-block;
  width: 1em; height: 0.66em;
  margin: 0 0.12em;
  vertical-align: baseline;
  border: 1px solid rgba(143, 212, 164, 0.38);
  border-radius: 2px;
  background:
    radial-gradient(circle at 50% 50%, rgba(143, 212, 164, 0.85) 0 1px, transparent 1.4px),
    rgba(143, 212, 164, 0.08);
  cursor: help;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.tt-tip .tk:hover {
  border-color: rgba(143, 212, 164, 0.8);
  background-color: rgba(143, 212, 164, 0.16);
}

/* ---------- loading / error ---------- */
.tt-skeleton {
  height: 100%; min-height: 460px;
  display: grid; place-items: center;
  background: rgba(240, 199, 94, 0.03);
}
.tt-skeleton p { display: flex; align-items: center; gap: 0.5rem; font-size: 13px; font-weight: 700; color: var(--mut); }
.tt-error { display: grid; place-items: center; min-height: 430px; font-size: 13px; color: var(--mut); }

/* ---------- legend + footnotes ---------- */
.tt-legend {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center;
  gap: 0.5rem 1.5rem;
  margin-top: 1.25rem;
  font-size: 12px; color: #8b93a6; direction: ltr;
}
.tt-legend .lg { display: inline-flex; align-items: center; gap: 0.4rem; }
.tt-legend .swatch { display: inline-block; width: 10px; height: 10px; border-radius: 9999px; border: 2px solid; background: #0c1220; }
.tt-foot { margin: 1.75rem auto 0; max-width: 48rem; text-align: center; font-size: 12px; line-height: 1.9; color: var(--mut); }
.tt-foot .fa-name { font-weight: 700; }
