/* ========================================
   Анимированное подчеркивание кнопок Tilda
   ======================================== */

.t-btnflex.t-btnflex_type_button,
.t-btnflex.t-btnflex_type_submit,
.tn-atom__button-content {
    position: relative;
    text-decoration: none !important;
}

/* Линия */
.t-btnflex.t-btnflex_type_button::after,
.t-btnflex.t-btnflex_type_submit::after,
.tn-atom__button-content::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 5px;
    width: 100%;
    height: 1px;
    background: currentColor;

    transform: scaleX(1);
    transform-origin: right;
}

/* Анимация при наведении */
.t-btnflex.t-btnflex_type_button:hover::after,
.t-btnflex.t-btnflex_type_submit:hover::after,
.tn-atom__button-content:hover::after {
    animation: tildaUnderline 0.7s ease-in-out forwards;
}

@keyframes tildaUnderline {
    0% {
        transform: scaleX(1);
        transform-origin: right;
    }

    49% {
        transform: scaleX(0);
        transform-origin: right;
    }

    50% {
        transform: scaleX(0);
        transform-origin: left;
    }

    100% {
        transform: scaleX(1);
        transform-origin: left;
    }
}