.gdn-hz-wrap,
.gdn-hz-wrap * {
    box-sizing: border-box;
}

.gdn-hz-wrap {
    --gdn-hz-red: #e60808;
    --gdn-hz-red-dark: #b80000;
    --gdn-hz-blue: #0573ff;
    --gdn-hz-blue-dark: #0057c2;
    --gdn-hz-shadow: 0 14px 28px rgba(0, 0, 0, 0.24), 0 8px 12px rgba(0, 0, 0, 0.12);

    position: fixed;
    left: 16px;
    bottom: 18px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-family: Arial, Helvetica, sans-serif;
    pointer-events: none;
}

.gdn-hz-button {
    position: relative;
    display: flex;
    align-items: center;
    width: 214px;
    min-height: 58px;
    color: #fff;
    text-decoration: none;
    border-radius: 999px;
    outline-offset: 4px;
    pointer-events: auto;
    transition: transform 0.2s ease;
}

.gdn-hz-button:hover,
.gdn-hz-button:focus {
    color: #fff;
    text-decoration: none;
    transform: translateX(2px);
}

.gdn-hz-pulse,
.gdn-hz-pulse::before,
.gdn-hz-pulse::after {
    position: absolute;
    border-radius: 50%;
}

.gdn-hz-pulse {
    left: 0;
    top: 0;
    width: 58px;
    height: 58px;
}

.gdn-hz-pulse::before {
    content: "";
    inset: -11px;
    border: 2px solid currentColor;
    opacity: 0.35;
    animation: gdn-hz-pulse 1.4s infinite ease-in-out;
}

.gdn-hz-pulse::after {
    content: "";
    inset: 6px;
    background: currentColor;
    opacity: 0.2;
    animation: gdn-hz-fill 2.2s infinite ease-in-out;
}

.gdn-hz-icon {
    position: relative;
    z-index: 2;
    display: grid;
    flex: 0 0 52px;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    box-shadow: var(--gdn-hz-shadow);
}

.gdn-hz-icon svg {
    width: 23px;
    height: 23px;
    display: block;
    fill: currentColor;
}

.gdn-hz-text {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 154px;
    height: 42px;
    margin-left: -20px;
    padding: 0 18px 0 36px;
    border-radius: 999px;
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: 0;
    white-space: nowrap;
    box-shadow: var(--gdn-hz-shadow);
}

.gdn-hz-hotline {
    color: var(--gdn-hz-red);
}

.gdn-hz-hotline .gdn-hz-icon,
.gdn-hz-hotline .gdn-hz-text {
    background: linear-gradient(135deg, var(--gdn-hz-red), var(--gdn-hz-red-dark));
}

.gdn-hz-hotline .gdn-hz-icon {
    animation: gdn-hz-shake 1.15s infinite ease-in-out;
}

.gdn-hz-zalo {
    color: var(--gdn-hz-blue);
}

.gdn-hz-zalo .gdn-hz-icon,
.gdn-hz-zalo .gdn-hz-text {
    background: linear-gradient(135deg, var(--gdn-hz-blue), var(--gdn-hz-blue-dark));
}

.gdn-hz-zalo-word {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    line-height: 1;
}

@keyframes gdn-hz-pulse {
    0%,
    100% {
        opacity: 0.1;
        transform: scale(0.55);
    }

    45% {
        opacity: 0.55;
        transform: scale(0.95);
    }
}

@keyframes gdn-hz-fill {
    0%,
    100% {
        opacity: 0.18;
        transform: scale(0.75);
    }

    50% {
        opacity: 0.35;
        transform: scale(1);
    }
}

@keyframes gdn-hz-shake {
    0%,
    50%,
    100% {
        transform: rotate(0deg);
    }

    10%,
    30% {
        transform: rotate(-20deg);
    }

    20%,
    40% {
        transform: rotate(20deg);
    }
}

@media (max-width: 767px) {
    .gdn-hz-wrap {
        left: 0;
        right: 0;
        bottom: 0;
        flex-direction: row;
        gap: 8px;
        padding: 8px max(10px, env(safe-area-inset-left)) calc(8px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-right));
        background: rgba(255, 255, 255, 0.98);
        border-top: 1px solid rgba(12, 20, 31, 0.12);
        box-shadow: 0 -8px 24px rgba(12, 20, 31, 0.16);
    }

    .gdn-hz-button {
        flex: 1 1 0;
        justify-content: center;
        width: auto;
        min-width: 0;
        min-height: 48px;
        height: 48px;
        gap: 8px;
        border-radius: 8px;
        overflow: hidden;
    }

    .gdn-hz-button:hover,
    .gdn-hz-button:focus {
        transform: none;
    }

    .gdn-hz-hotline {
        background: linear-gradient(135deg, var(--gdn-hz-red), var(--gdn-hz-red-dark));
    }

    .gdn-hz-zalo {
        background: linear-gradient(135deg, var(--gdn-hz-blue), var(--gdn-hz-blue-dark));
    }

    .gdn-hz-pulse {
        display: none;
    }

    .gdn-hz-icon {
        flex: 0 0 28px;
        width: 28px;
        height: 28px;
        background: rgba(255, 255, 255, 0.18);
        box-shadow: none;
        animation: none;
    }

    .gdn-hz-icon svg {
        width: 16px;
        height: 16px;
    }

    .gdn-hz-text {
        min-width: 0;
        height: auto;
        margin: 0;
        padding: 0;
        background: transparent;
        box-shadow: none;
        font-size: 14px;
        line-height: 1;
    }

    .gdn-hz-zalo-word {
        font-size: 10px;
    }
}

@media (max-width: 360px) {
    .gdn-hz-wrap {
        gap: 6px;
        padding-left: 8px;
        padding-right: 8px;
    }

    .gdn-hz-button {
        gap: 6px;
    }

    .gdn-hz-text {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .gdn-hz-pulse::before,
    .gdn-hz-pulse::after,
    .gdn-hz-hotline .gdn-hz-icon {
        animation: none;
    }
}
