.he-contact-rail,
.he-contact-rail * {
    box-sizing: border-box;
}

.he-contact-rail {
    position: fixed;
    right: 0;
    bottom: clamp(86px, 14vh, 150px);
    z-index: 900;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 60px;
    pointer-events: auto;
    overflow: visible;
    transition: opacity .2s ease, visibility .2s ease;
}

.he-contact-rail__item {
    width: 56px;
    min-width: 44px;
    height: 52px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px 0 0 999px;
    background: linear-gradient(135deg, #08234a, #0f4778);
    color: #ffffff;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(5, 18, 36, .2);
    transition: opacity .2s ease, transform .2s ease, box-shadow .2s ease, filter .2s ease;
    -webkit-tap-highlight-color: transparent;
}

.he-contact-rail__item:hover,
.he-contact-rail__item:focus-visible {
    color: #ffffff;
    transform: translateX(-4px);
    box-shadow: 0 18px 36px rgba(5, 18, 36, .28);
    filter: saturate(1.06);
    outline: none;
}

.he-contact-rail__item:focus-visible {
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .86), 0 18px 36px rgba(5, 18, 36, .28);
}

.he-contact-rail__item--top {
    position: absolute;
    right: 0;
    bottom: calc(100% + 8px);
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px) scale(.94);
}

.he-contact-rail.is-scrolled .he-contact-rail__item--top {
    opacity: 1;
    pointer-events: auto;
    transform: none;
}

.he-contact-rail__icon {
    width: 23px;
    height: 23px;
    display: block;
    fill: currentColor;
}

.he-contact-rail__icon--facebook {
    width: 26px;
    height: 26px;
}

.he-contact-rail__zalo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 34px;
    height: auto;
    color: #ffffff;
    font-size: 11.5px;
    line-height: 1;
    font-weight: 900;
    letter-spacing: 0;
}

body.he-drawer-open .he-contact-rail,
body.delayed-lead-popup-lock .he-contact-rail,
html.delayed-lead-popup-lock .he-contact-rail,
.he-contact-rail.is-popup-open {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
}

@media (max-width: 640px) {
    .he-contact-rail {
        right: 0;
        bottom: max(92px, calc(env(safe-area-inset-bottom) + 86px));
        gap: 7px;
        max-width: 52px;
    }

    .he-contact-rail__item {
        width: 50px;
        height: 48px;
        border-radius: 999px 0 0 999px;
    }

    .he-contact-rail__item:hover,
    .he-contact-rail__item:focus-visible {
        transform: translateX(-2px);
    }

    .he-contact-rail__icon {
        width: 21px;
        height: 21px;
    }

    .he-contact-rail__icon--facebook {
        width: 24px;
        height: 24px;
    }

    .he-contact-rail__zalo {
        min-width: 32px;
        font-size: 10.5px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .he-contact-rail__item {
        transition: none;
    }
}
