/**
 * Modern Tooltip - Inspirado no matTooltip do Angular Material
 * Substitui o Tooltipster com visual moderno e animações suaves
 */

/* Container do tooltip - z-index máximo para ficar acima de qualquer modal/overlay */
.mt-tooltip {
    position: fixed;
    z-index: 2147483647;
    pointer-events: none;
    opacity: 0;
    transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1),
                transform 150ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity, transform;
}

/* Corpo do tooltip */
.mt-tooltip-content {
    background-color: rgba(55, 71, 79, 0.94);
    color: #ffffff;
    font-family: "Open Sans", "Helvetica Neue", Arial, sans-serif;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
    letter-spacing: 0.01em;
    padding: 6px 12px;
    border-radius: 4px;
    max-width: 350px;
    word-wrap: break-word;
    white-space: normal;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18),
                0 1px 3px rgba(0, 0, 0, 0.12);
}

/* ===== Animações por posição ===== */

/* Top (padrão) */
.mt-tooltip[data-position="top"] {
    transform: translateY(4px) scale(0.95);
    transform-origin: center bottom;
}

.mt-tooltip[data-position="top"].mt-tooltip-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Bottom */
.mt-tooltip[data-position="bottom"] {
    transform: translateY(-4px) scale(0.95);
    transform-origin: center top;
}

.mt-tooltip[data-position="bottom"].mt-tooltip-visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* Left */
.mt-tooltip[data-position="left"] {
    transform: translateX(4px) scale(0.95);
    transform-origin: right center;
}

.mt-tooltip[data-position="left"].mt-tooltip-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* Right */
.mt-tooltip[data-position="right"] {
    transform: translateX(-4px) scale(0.95);
    transform-origin: left center;
}

.mt-tooltip[data-position="right"].mt-tooltip-visible {
    opacity: 1;
    transform: translateX(0) scale(1);
}

/* ===== Tema Claro (opcional via data-theme="light") ===== */
.mt-tooltip[data-theme="light"] .mt-tooltip-content {
    background-color: #ffffff;
    color: #37474f;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.12),
                0 1px 4px rgba(0, 0, 0, 0.08);
}

/* ===== Tema com cor primária (opcional via data-theme="primary") ===== */
.mt-tooltip[data-theme="primary"] .mt-tooltip-content {
    background-color: rgba(0, 71, 120, 0.94);
    color: #ffffff;
}

/* ===== Suporte para telas de toque (desabilita hover tooltips) ===== */
@media (hover: none) {
    .mt-tooltip {
        display: none !important;
    }
}
