/* Triade SPEH-X (Fase 30) - terceira excecao deliberada ao padrao "sem
   estilo proprio" do plugin (apos arena-console.css e portal.css). Escopo
   so ao [spehx_triade]. Layout responsivo simples, sem framework. */

.spehx-triade {
    max-width: 480px;
    margin: 0 auto;
    box-sizing: border-box;
}

.spehx-triade * {
    box-sizing: border-box;
}

.spehx-triade-view-toggle {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.spehx-triade-mode-btn {
    background: #f1f1f1;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 0.4rem 0.8rem;
    cursor: pointer;
    font-size: 0.9rem;
}

.spehx-triade-svg {
    width: 100%;
    height: auto;
    display: block;
}

.spehx-triade-outline {
    fill: none;
    stroke: #bbb;
    stroke-width: 2;
}

.spehx-triade-bar {
    stroke-linecap: round;
    stroke-width: 8;
}

/* Paleta oficial da Tríade (Design System 2.5, homologada 2026-07-24,
   Fase 3) - substitui as cores herdadas do Bootstrap 3. Uso exclusivo para
   identificar os 3 pilares (nunca as cores semânticas do sistema). */
.spehx-triade-bar-strength {
    stroke: #B45309;
}

.spehx-triade-bar-potency {
    stroke: #7C3AED;
}

.spehx-triade-bar-endurance {
    stroke: #0F766E;
}

.spehx-triade-bar-tests {
    opacity: 0.9;
}

.spehx-triade-bar-performance {
    opacity: 0.6;
}

.spehx-triade-labels {
    list-style: none;
    margin: 0.75rem 0 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.25rem 1rem;
    font-size: 0.9rem;
}

.spehx-triade-label {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.4rem;
    white-space: nowrap;
    overflow: hidden;
}

.spehx-triade-label-text {
    overflow: hidden;
    text-overflow: ellipsis;
}

.spehx-triade-label-value {
    flex: 0 0 auto;
}

@media (max-width: 360px) {
    .spehx-triade-labels {
        font-size: 0.8rem;
    }
}

/* Modo Testes: esconde as barras/labels de Performance */
.spehx-triade[data-mode="tests"] .spehx-triade-bar-performance,
.spehx-triade[data-mode="tests"] .spehx-triade-label-performance {
    display: none;
}

/* Modo Performance: esconde as barras/labels de Testes */
.spehx-triade[data-mode="performance"] .spehx-triade-bar-tests,
.spehx-triade[data-mode="performance"] .spehx-triade-label-tests {
    display: none;
}

/* Modo Testes + Performance (combined): mostra tudo, sem regra extra */

@media (max-width: 480px) {
    .spehx-triade-labels {
        grid-template-columns: 1fr;
    }
}
