.tmtech-popup[hidden] {
    display: none !important;
}

.tmtech-popup,
.tmtech-popup *,
.tmtech-zalo-wrap,
.tmtech-zalo-wrap * {
    box-sizing: border-box;
}

.tmtech-popup {
    position: fixed;
    z-index: 2147483000;
    display: grid;
    inset: 0;
    place-items: center;
    padding: 28px;
}

.tmtech-popup__backdrop {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: rgba(7, 15, 31, .74);
    backdrop-filter: blur(6px);
    transition: opacity .24s ease;
}

.tmtech-popup__dialog {
    position: relative;
    z-index: 1;
    width: fit-content;
    max-width: calc(100vw - 56px);
    max-height: 88vh;
    opacity: 0;
    line-height: 0;
    transform: translateY(18px) scale(.96);
    transition: opacity .26s ease, transform .26s cubic-bezier(.2,.75,.25,1);
}

.tmtech-popup.is-visible .tmtech-popup__backdrop,
.tmtech-popup.is-visible .tmtech-popup__dialog {
    opacity: 1;
}

.tmtech-popup.is-visible .tmtech-popup__dialog {
    transform: translateY(0) scale(1);
}

.tmtech-popup__dialog a {
    display: block;
    width: fit-content;
    max-width: 100%;
    border: 0;
    color: inherit;
    text-decoration: none;
}

.tmtech-popup__dialog picture {
    display: block;
    width: fit-content;
    max-width: 100%;
    line-height: 0;
}

.tmtech-popup__dialog img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(var(--tmtech-popup-width, 760px), calc(100vw - 56px));
    max-height: 88vh;
    margin: 0;
    border: 0;
    border-radius: 18px;
    box-shadow: 0 30px 90px rgba(0,0,0,.44);
}

.tmtech-popup__close {
    position: absolute;
    z-index: 2;
    top: -16px;
    right: -16px;
    display: grid;
    width: 42px;
    height: 42px;
    margin: 0;
    padding: 0 0 3px;
    place-items: center;
    border: 3px solid rgba(255,255,255,.94);
    border-radius: 50%;
    color: #344054;
    background: #fff;
    font: 400 28px/1 Arial, sans-serif;
    box-shadow: 0 9px 25px rgba(0,0,0,.28);
    cursor: pointer;
    transition: color .2s ease, transform .2s ease;
}

.tmtech-popup__close:hover,
.tmtech-popup__close:focus-visible {
    color: #e11d48;
    outline: none;
    transform: rotate(5deg) scale(1.06);
}

body.tmtech-popup-open {
    overflow: hidden !important;
}

.tmtech-zalo-wrap {
    position: fixed;
    right: 32px;
    bottom: 95px;
    z-index: 99999999;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all .35s ease;
}

.tmtech-zalo-wrap.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.tmtech-zalo-icon {
    position: relative;
    z-index: 3;
    display: flex;
    width: 62px;
    height: 62px;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 8px 25px rgba(0,0,0,.18);
    text-decoration: none;
    transition: .3s ease;
    animation: tmtech-zalo-shake 3s infinite;
}

.tmtech-zalo-icon img {
    position: relative;
    z-index: 3;
    width: 40px;
    height: 40px;
}

.tmtech-zalo-text {
    position: absolute;
    top: 50%;
    right: 75px;
    padding: 8px 13px;
    opacity: 0;
    border-radius: 12px;
    color: #fff;
    background: linear-gradient(135deg,#0068ff,#00a2ff);
    box-shadow: 0 5px 15px rgba(0,104,255,.22);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
    pointer-events: none;
    transform: translateY(-50%) translateX(10px);
    transition: .35s ease;
}

.tmtech-zalo-icon:hover .tmtech-zalo-text {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

.tmtech-zalo-icon:hover {
    transform: scale(1.08);
}

.tmtech-zalo-wave,
.tmtech-zalo-wave.delay {
    position: absolute;
    right: 0;
    bottom: 0;
    z-index: 1;
    width: 62px;
    height: 62px;
    border-radius: 50%;
    background: rgba(0,104,255,.18);
    animation: tmtech-zalo-wave 2s infinite;
}

.tmtech-zalo-wave.delay {
    animation-delay: 1s;
}

@keyframes tmtech-zalo-shake {
    0% { transform: rotate(0); }
    2% { transform: rotate(-12deg); }
    4% { transform: rotate(12deg); }
    6% { transform: rotate(-10deg); }
    8% { transform: rotate(10deg); }
    10% { transform: rotate(0); }
    100% { transform: rotate(0); }
}

@keyframes tmtech-zalo-wave {
    0% { opacity: .7; transform: scale(1); }
    100% { opacity: 0; transform: scale(1.8); }
}

@media (max-width: 767px) {
    .tmtech-popup {
        padding: 18px;
    }

    .tmtech-popup__dialog {
        width: fit-content;
        max-width: calc(100vw - 32px);
        max-height: calc(100vh - 48px);
    }

    .tmtech-popup__dialog img {
        max-width: min(var(--tmtech-popup-width, 760px), calc(100vw - 32px));
        max-height: calc(100vh - 48px);
        border-radius: 13px;
    }

    .tmtech-popup__close {
        top: -14px;
        right: -10px;
        width: 38px;
        height: 38px;
        font-size: 25px;
    }

    .tmtech-zalo-wrap {
        right: 32px;
        bottom: 92px;
    }

    .tmtech-zalo-icon,
    .tmtech-zalo-wave,
    .tmtech-zalo-wave.delay {
        width: 56px;
        height: 56px;
    }

    .tmtech-zalo-icon img {
        width: 36px;
        height: 36px;
    }

    .tmtech-zalo-text {
        display: none;
    }
}

@media (min-width: 768px) and (max-width: 1024px) {
    .tmtech-popup {
        padding: 24px;
    }

    .tmtech-popup__dialog {
        width: fit-content;
        max-width: calc(100vw - 48px);
        max-height: calc(100vh - 64px);
    }

    .tmtech-popup__dialog img {
        max-width: min(var(--tmtech-popup-width, 760px), calc(100vw - 48px));
        max-height: calc(100vh - 64px);
        border-radius: 16px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tmtech-popup__backdrop,
    .tmtech-popup__dialog,
    .tmtech-popup__close,
    .tmtech-zalo-wrap,
    .tmtech-zalo-icon {
        animation: none !important;
        transition-duration: .01ms !important;
    }

    .tmtech-zalo-wave {
        display: none;
    }
}
