/* === Animações dos ícones de ação no Tabulator === */

/* Olho piscando */
@keyframes show-open {
    0%,89%,96%,100% {
        opacity: 1;
    }

    90%,95% {
        opacity: 0;
    }
}

@keyframes show-closed {
    0%,89%,96%,100% {
        opacity: 0;
    }

    90%,95% {
        opacity: 1;
    }
}

.icon-eye-wrap:hover .icon-eye-open {
    animation: show-open 1.5s ease infinite;
}

.icon-eye-wrap:hover .icon-eye-closed {
    animation: show-closed 1.5s ease infinite;
}

/* Clipe balançando */
@keyframes swing-clip {
    0%, 100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(-20deg);
    }

    75% {
        transform: rotate(20deg);
    }
}

/* Lápis escrevendo */
@keyframes wiggle-edit {
    0%, 100% {
        transform: rotate(0deg) translateX(0);
    }

    25% {
        transform: rotate(-10deg) translateX(-1px);
    }

    75% {
        transform: rotate(10deg) translateX(1px);
    }
}

/* Lixeira tremendo */
@keyframes shake-trash {
    0%, 100% {
        transform: translateX(0);
    }

    20% {
        transform: translateX(-3px) rotate(-5deg);
    }

    40% {
        transform: translateX(3px) rotate(5deg);
    }

    60% {
        transform: translateX(-2px);
    }

    80% {
        transform: translateX(2px);
    }
}

/* Seta de estorno girando */
@keyframes spin-reverse {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(-360deg);
    }
}

/* Classe base para todos os ícones de ação */
.tabulator-action-icon {
    display: inline-block;
    cursor: pointer;
    transition: opacity 0.2s;
}

    .tabulator-action-icon:hover {
        opacity: 0.75;
    }

    /* Aplicação por tipo */
    .tabulator-action-icon.icon-eye:hover {
        animation: blink-eye 0.6s ease infinite;
    }

    .tabulator-action-icon.icon-clip:hover {
        animation: swing-clip 0.5s ease infinite;
    }

    .tabulator-action-icon.icon-edit:hover {
        animation: wiggle-edit 0.4s ease infinite;
    }

    .tabulator-action-icon.icon-trash:hover {
        animation: shake-trash 0.4s ease infinite;
    }

    .tabulator-action-icon.icon-estorno:hover {
        animation: spin-reverse 0.6s linear infinite;
    }

    /* Para ícones desabilitados (ex: estorno de folha) */
    .tabulator-action-icon.icon-disabled {
        cursor: not-allowed !important;
        opacity: 0.35;
        pointer-events: none;
    }

/* Garante que o hover no elemento pai repassa pro ícone */
.tabulator-cell:hover .tabulator-action-icon.icon-eye {
    animation: blink-eye 0.6s ease infinite;
}

.eye-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 27px;
    cursor: pointer;
    overflow: visible;
}

    .eye-wrap .mdi-eye {
        opacity: 1 !important;
        font-size: 18px;
        transition: opacity 0.15s;
        position: absolute;
    }

    .eye-wrap dotlottie-player {
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        width: 22px !important;
        height: 22px !important;
        transition: opacity 0.15s;
    }

    .eye-wrap:hover .mdi-eye {
        opacity: 0 !important;
    }

    .eye-wrap:hover dotlottie-player {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

.clip-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 27px;
    cursor: pointer;
    overflow: visible;
}

    .clip-wrap .clip-static {
        opacity: 1 !important;
        position: absolute;
        transition: opacity 0.15s;
    }

    .clip-wrap dotlottie-player {
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        width: 22px !important;
        height: 22px !important;
        transition: opacity 0.15s;
    }

    .clip-wrap:hover .clip-static {
        opacity: 0 !important;
    }

    .clip-wrap:hover dotlottie-player {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

.trash-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 27px;
    cursor: pointer;
    overflow: visible;
}

    .trash-wrap .trash-static {
        opacity: 1 !important;
        position: absolute;
        transition: opacity 0.15s;
    }

    .trash-wrap dotlottie-player {
        opacity: 0 !important;
        pointer-events: none !important;
        position: absolute !important;
        width: 22px !important;
        height: 22px !important;
        transition: opacity 0.15s;
    }

    .trash-wrap:hover .trash-static {
        opacity: 0 !important;
    }

    .trash-wrap:hover dotlottie-player {
        opacity: 1 !important;
        pointer-events: auto !important;
    }

.clip-wrap {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

    .clip-wrap:hover .clip-group {
        animation: clip-swing 0.4s ease-in-out infinite alternate;
        transform-origin: 50% 15%;
        transform-box: fill-box;
    }

@keyframes clip-swing {
    0% {
        transform: rotate(-10deg);
    }

    100% {
        transform: rotate(10deg);
    }
}