/* =====================================================================
 * Popup hien SDT khi click "tel:..." tren Desktop.
 * Mobile (touch only) khong hien popup -> click goi truc tiep nhu cu.
 * ===================================================================== */

.tnt-tp,
.tnt-tp *,
.tnt-tp *::before,
.tnt-tp *::after {
    box-sizing: border-box;
}

.tnt-tp {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    z-index: 999999;
    opacity: 0;
    transition: opacity .2s ease;
}

.tnt-tp.is-open {
    display: flex;
    opacity: 1;
}

.tnt-tp__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .55);
    cursor: pointer;
}

.tnt-tp__card {
    position: relative;
    width: min(460px, calc(100vw - 32px));
    background: #fff;
    border-radius: 18px;
    overflow: hidden;
    padding-bottom: 28px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .25);
    transform: scale(.94);
    transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}

.tnt-tp.is-open .tnt-tp__card {
    transform: scale(1);
}

/* ----- Top band cam + nut close ----- */
.tnt-tp__band {
    position: relative;
    height: 130px;
    background: linear-gradient(180deg, #fc7400 0%, #fb8a2a 100%);
}

.tnt-tp__close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .18);
    color: #fff;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    transition: background .2s ease;
}

.tnt-tp__close:hover,
.tnt-tp__close:focus-visible {
    background: rgba(255, 255, 255, .32);
    outline: none;
}

.tnt-tp__close svg {
    width: 16px;
    height: 16px;
}

/* ----- Icon phone tron de len ranh gioi band/white ----- */
.tnt-tp__icon {
    position: absolute;
    left: 50%;
    bottom: -38px;
    transform: translateX(-50%);
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: #fc7400;
    border: 6px solid #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow: 0 6px 18px rgba(252, 116, 0, .35);
}

.tnt-tp__icon svg {
    width: 32px;
    height: 32px;
    animation: tnt-tp-phone-ring 1.6s infinite;
    transform-origin: 50% 50%;
}

/* ----- Body ----- */
.tnt-tp__body {
    padding: 56px 28px 8px;
    text-align: center;
}

.tnt-tp__title {
    margin: 0 0 10px;
    font-size: 22px;
    font-weight: 700;
    color: #1f1f1f;
    line-height: 1.3;
}

.tnt-tp__note {
    margin: 0 0 22px;
    padding: 0 6px;
    font-size: 14px;
    color: #7d7d7d;
    line-height: 1.55;
}

/* ----- Phone box ----- */
.tnt-tp__phone-box {
    margin: 0 24px 8px;
    background: #fff3e6;
    border: 1px solid #ffd9b5;
    border-radius: 12px;
    padding: 14px 18px 18px;
    text-align: center;
}

.tnt-tp__phone-label {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #fc7400;
    text-transform: uppercase;
}

.tnt-tp__phone {
    display: inline-block;
    font-size: clamp(28px, 5vw, 38px);
    font-weight: 800;
    color: #e11414;
    text-decoration: none;
    letter-spacing: .5px;
    line-height: 1.1;
}

.tnt-tp__phone:hover,
.tnt-tp__phone:focus-visible {
    color: #e11414;
    text-decoration: none;
    outline: none;
}

/* ----- Animation icon phone rung ----- */
@keyframes tnt-tp-phone-ring {
    0%   { transform: rotate(0deg); }
    10%  { transform: rotate(-22deg); }
    20%  { transform: rotate(22deg); }
    30%  { transform: rotate(-22deg); }
    40%  { transform: rotate(18deg); }
    50%  { transform: rotate(0deg); }
    100% { transform: rotate(0deg); }
}

/* ----- Khoa scroll body khi mo ----- */
body.tnt-tp-open {
    overflow: hidden;
}

/* ----- Mobile guard kep: KHONG hien popup tren thiet bi cam ung thuan ----- */
@media (hover: none) and (pointer: coarse) {
    .tnt-tp,
    .tnt-tp.is-open {
        display: none !important;
    }
}

/* ----- Responsive nho ----- */
@media (max-width: 480px) {
    .tnt-tp__card {
        border-radius: 16px;
        padding-bottom: 22px;
    }

    .tnt-tp__band {
        height: 110px;
    }

    .tnt-tp__icon {
        width: 64px;
        height: 64px;
        border-width: 5px;
        bottom: -32px;
    }

    .tnt-tp__icon svg {
        width: 28px;
        height: 28px;
    }

    .tnt-tp__body {
        padding: 48px 20px 8px;
    }

    .tnt-tp__title {
        font-size: 20px;
    }

    .tnt-tp__phone-box {
        margin: 0 16px 8px;
        padding: 12px 14px 14px;
    }

    .tnt-tp__phone {
        font-size: 28px;
    }
}
