/* Class talent calculator (/talents/{class}), see js/talents.js. Reuses the bar, tooltip and note styles of legacy.css. */

.talent-calc {
    position: relative; /* the tooltip is placed within it */
}

.talent-classes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: var(--space-3) 0 0;
}
.talent-class {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px 6px 6px;
    border: 1px solid var(--border);
    background: #0c0b0acc;
    color: var(--muted);
    font: 600 .9rem/1 var(--heading-font);
    text-decoration: none;
}
.talent-class img {
    border-radius: 4px;
    filter: grayscale(.7) brightness(.75);
}
.talent-class:hover,
.talent-class.is-active {
    border-color: var(--class-colour);
    color: var(--class-colour);
}
.talent-class:hover img,
.talent-class.is-active img {
    filter: none;
}

.talent-bar__split {
    font-size: .95rem;
}
.talent-bar__level {
    margin: 0;
    font-size: .95rem;
}
.talent-bar__preset {
    max-width: 360px;
}

.talent-trees {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
}
.talent-tree {
    padding: 14px 18px 20px;
    border: 1px solid var(--border);
    background: linear-gradient(180deg, #17120dcc, #0b0908e6);
}
.talent-tree__head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.talent-tree__head img {
    border: 1px solid #4a4038;
    border-radius: 4px;
}
.talent-tree__head h2 {
    margin: 0;
    color: var(--class-colour);
    font: 600 1.25rem/1.2 var(--heading-font);
}
.talent-tree__total {
    color: var(--muted);
    font-size: .95rem;
}

.talent-grid {
    position: relative;
    margin: 0 auto;
}
.talent {
    position: absolute;
    z-index: 1;
    width: 46px;
    height: 46px;
    padding: 0;
    border: 2px solid #4a4038;
    border-radius: 6px;
    background: #000;
    cursor: pointer;
    box-shadow: 0 2px 8px #000c;
}
.talent img {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 4px;
    filter: grayscale(1) brightness(.55);
}
.talent__rank {
    position: absolute;
    right: -10px;
    bottom: -9px;
    min-width: 28px;
    padding: 1px 3px;
    border: 1px solid #4a4038;
    border-radius: 4px;
    background: #0b0908;
    color: var(--muted);
    font: 600 .7rem/1.2 var(--body-font);
    text-align: center;
}
.talent.is-open { border-color: #1eff00aa; }
.talent.is-open img { filter: none; }
.talent.is-open .talent__rank { color: #1eff00; }
.talent.is-partial { border-color: #1eff00; }
.talent.is-partial img { filter: none; }
.talent.is-partial .talent__rank { color: #1eff00; border-color: #1eff0088; }
.talent.is-maxed { border-color: #eed0a0; box-shadow: 0 0 10px #eed0a066; }
.talent.is-maxed img { filter: none; }
.talent.is-maxed .talent__rank { color: var(--gold); border-color: #eed0a088; }
.talent.is-locked { cursor: not-allowed; }
.talent:hover,
.talent:focus-visible {
    outline: none;
    border-color: #fff;
}

/* prerequisite arrows: bars behind the icons, the last bar carries the arrow head */
.talent-arrow {
    position: absolute;
    z-index: 0;
    background: #3a3128;
}
.talent-arrow.is-active {
    background: #c9a24d;
}
.talent-arrow--down::after,
.talent-arrow--right::after,
.talent-arrow--left::after {
    position: absolute;
    content: '';
    border: 6px solid transparent;
}
.talent-arrow--down::after {
    bottom: -8px;
    left: -4px;
    border-top: 8px solid #3a3128;
    border-bottom: 0;
}
.talent-arrow--right::after {
    top: -4px;
    right: -8px;
    border-left: 8px solid #3a3128;
    border-right: 0;
}
.talent-arrow--left::after {
    top: -4px;
    left: -8px;
    border-right: 8px solid #3a3128;
    border-left: 0;
}
.talent-arrow--down.is-active::after { border-top-color: #c9a24d; }
.talent-arrow--right.is-active::after { border-left-color: #c9a24d; }
.talent-arrow--left.is-active::after { border-right-color: #c9a24d; }

.talent-tip .legacy-tip__text {
    white-space: pre-line;
}
.talent-tip__row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #fff;
    font-size: .88rem;
}
