/*
 * Padrão de tooltip para siglas/abreviaturas.
 *
 * Uso:
 *   <abbr class="sigla" data-explica="Explicação prática curta...">CS</abbr>
 *
 * Conteúdo do data-explica deve ser frase prática contextual,
 * não tradução literal de dicionário.
 */

abbr.sigla,
.sigla {
    position: relative;
    border-bottom: 1px dotted #475569;
    cursor: help;
    text-decoration: none;
    font-weight: inherit;
    font-style: inherit;
}

abbr.sigla::after,
.sigla::after {
    content: attr(data-explica);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #0f172a;
    color: #ffffff;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 400;
    line-height: 1.5;
    width: max-content;
    max-width: 320px;
    white-space: normal;
    text-align: left;
    letter-spacing: normal;
    text-transform: none;
    font-style: normal;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, transform 0.18s ease;
    pointer-events: none;
    z-index: 1000;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
}

abbr.sigla::before,
.sigla::before {
    content: '';
    position: absolute;
    bottom: calc(100% + 2px);
    left: 50%;
    transform: translateX(-50%);
    border: 6px solid transparent;
    border-top-color: #0f172a;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease;
    pointer-events: none;
    z-index: 1000;
}

abbr.sigla:hover::after,
abbr.sigla:focus::after,
.sigla:hover::after,
.sigla:focus::after {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

abbr.sigla:hover::before,
abbr.sigla:focus::before,
.sigla:hover::before,
.sigla:focus::before {
    opacity: 1;
    visibility: visible;
}

@media print {
    abbr.sigla::after,
    abbr.sigla::before,
    .sigla::after,
    .sigla::before {
        display: none !important;
    }
    abbr.sigla,
    .sigla {
        border-bottom: none;
    }
}
