/*
 * Armory talents / glyphs CSS
 *
 * Phase 2A :
 * - le vrai CSS talents est maintenant centralisé ici ;
 * - l'ancien CSS inline dans index.php est encore conservé volontairement ;
 * - le rendu doit donc rester identique ;
 * - prochaine étape : supprimer le bloc talents inline de index.php après validation.
 */

#armory-tab-talents {
    box-sizing: border-box;
}

#armory-tab-talents *,
#armory-tab-talents *::before,
#armory-tab-talents *::after {
    box-sizing: border-box;
}

/* ============================================================
   TALENTS / GLYPHS - extrait depuis index.php
   ============================================================ */

.armory-talents-box {
    padding: 28px 30px 34px 30px;
    background: rgba(8, 8, 8, 0.84);
    border: 1px solid rgba(255, 204, 0, 0.12);
    box-shadow: inset 0 0 85px rgba(0, 0, 0, 0.78);
    overflow: hidden;
}

.armory-talents-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
    margin-bottom: 16px;
}

.armory-talents-title {
    color: #fff;
    font-size: 28px;
    font-weight: bold;
    line-height: 1.2;
    text-shadow: 0 2px 3px #000;
}


.armory-talents-spec-buttons {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 14px;
}

.armory-talents-spec-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 0 8px 0;
    color: #f6f1d7;
    background: transparent;
    border: 0;
    border-bottom: 3px solid transparent;
    font-size: 15px;
    font-weight: bold;
    text-shadow: 0 2px 3px #000;
    cursor: pointer;
}

.armory-talents-spec-button img {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1px solid rgba(255, 204, 0, 0.45);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.8);
}

.armory-talents-spec-button:hover,
.armory-talents-spec-button.armory-talents-spec-active {
    color: #ffffff;
    border-bottom-color: rgba(255, 255, 255, 0.88);
}

.armory-talents-spec-button.armory-talents-spec-active {
    box-shadow: inset 0 -1px 0 rgba(255, 204, 0, 0.45);
}

.armory-talents-spec-panel {
    display: none;
}

.armory-talents-spec-panel.armory-talents-spec-panel-active {
    display: block;
}

.armory-talents-spec-summary {
    margin-bottom: 16px;
    color: #d8d8d8;
    font-size: 15px;
}

.armory-talents-trees {
    display: grid;
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    gap: 28px;
    align-items: start;
}

.armory-talent-tree {
    padding: 10px 0 18px 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.armory-talent-tree-title {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 8px;
    width: 284px;
    min-height: 28px;
    margin: 0 auto 12px auto;
    padding-left: 38px;
    color: #ffffff;
    font-size: 19px;
    font-weight: bold;
    text-align: left;
    text-shadow: 0 2px 3px #000;
    box-sizing: border-box;
}

.armory-talent-tree-title img {
    width: 24px;
    height: 24px;
    border: 1px solid rgba(255, 204, 0, 0.35);
}

.armory-talent-tree-points {
    color: #ffffff;
}

.armory-talent-tree-grid {
    display: grid;
    grid-template-columns: repeat(5, 52px);
    grid-template-rows: repeat(11, 58px);
    justify-content: center;
    column-gap: 6px;
    row-gap: 8px;
    width: max-content;
    margin: 0 auto;
}

.armory-talent-cell {
    position: relative;
    width: 52px;
    height: 56px;
    overflow: visible;
    display: flex;
    align-items: center;
    justify-content: center;
}

.armory-talent-cell a {
    display: block;
}
.armory-talent-link {
    text-decoration: none;
}

.armory-talent-icon-crop {
    position: relative;
    display: block;
    width: 44px;
    height: 44px;
    overflow: hidden;
    background: rgba(0, 0, 0, 0.35);
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

/* Wowhead iconizeLinks est nécessaire pour le stuff vide, mais il injecte aussi
   une deuxième icône dans les liens de talents. On masque uniquement cette
   icône injectée et on garde notre <img> cropée/grisée. */
.armory-talent-icon-crop .icon,
.armory-talent-icon-crop .icontiny,
.armory-talent-icon-crop .iconsmall,
.armory-talent-icon-crop .iconmedium,
.armory-talent-icon-crop .iconlarge {
    display: none !important;
}

.armory-talent-icon-crop.q0,
.armory-talent-icon-crop.q1,
.armory-talent-icon-crop.q2,
.armory-talent-icon-crop.q3,
.armory-talent-icon-crop.q4,
.armory-talent-icon-crop.q5,
.armory-talent-icon-crop.q6 {
    background: rgba(0, 0, 0, 0.35) !important;
    border: 0 !important;
    box-shadow: none !important;
}

.armory-talent-icon {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 50px;
    height: 50px;
    max-width: none !important;
    display: block;
    margin: 0;
    transform: translate(calc(-50% - 1px), calc(-50% - 1px));
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
    filter: grayscale(1);
    opacity: 0.42;
}

.armory-talent-cell.armory-talent-learned .armory-talent-icon {
    filter: none;
    opacity: 1;
    border: 0 !important;
    box-shadow: none !important;
    outline: 0 !important;
}

.armory-talent-rank {
    position: absolute;
    right: 2px;
    bottom: 2px;
    min-width: 28px;
    padding: 1px 4px;
    color: #fff;
    background: rgba(0, 0, 0, 0.86);
    border: 1px solid #d7b700;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
    line-height: 16px;
    text-align: center;
}

.armory-talents-divider {
    display: flex;
    justify-content: center;
    margin: 18px 0 16px 0;
}

.armory-talents-divider img {
    max-width: 640px;
    width: 55%;
    height: auto;
    display: block;
}

.armory-glyphs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 28px;
}

.armory-glyph-column-title {
    margin: 0 0 16px 0;
    color: #ffffff;
    font-size: 18px;
    font-weight: bold;
    text-shadow: 0 2px 3px #000;
}

.armory-glyph-list {
    display: grid;
    gap: 14px;
}

.armory-glyph-row {
    display: flex;
    align-items: center;
    gap: 14px;
}

.armory-glyph-icon {
    width: 52px;
    height: 52px;
    display: block;
    border: 1px solid rgba(255, 204, 0, 0.75);
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
}

.armory-glyph-name a,
.armory-glyph-name span {
    color: #ffcc00;
    font-size: 18px;
    font-weight: bold;
    text-decoration: none;
}

.armory-glyph-name a:hover {
    color: #fff1a6;
}

.armory-glyph-description {
    margin-top: 2px;
    color: #c9c9c9;
    font-size: 14px;
    line-height: 1.35;
}

.armory-talents-empty {
    padding: 24px;
    color: #aaa;
    text-align: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 204, 0, 0.12);
}

@media (max-width: 1200px) {
    .armory-talents-trees {
        grid-template-columns: repeat(3, minmax(190px, 1fr));
        gap: 16px;
    }

    .armory-talent-tree-grid {
        grid-template-columns: repeat(4, 40px);
        grid-template-rows: repeat(11, 40px);
        gap: 4px;
    }

    .armory-talent-tree-title {
        width: 172px;
        padding-left: 16px;
    }

    .armory-talent-cell,
    .armory-talent-icon {
        width: 40px;
        height: 40px;
    }
}

@media (max-width: 980px) {
    .armory-talents-trees,
    .armory-glyphs {
        grid-template-columns: 1fr;
    }

    .armory-talents-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .armory-talents-spec-buttons {
        justify-content: flex-start;
    }
}

/* ============================================================
   END TALENTS / GLYPHS
   ============================================================ */
