.floating-contact {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.floating-contact a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    color: white;
    text-decoration: none;
    transition: all 0.3s ease;
}

.floating-contact .phone-button {
    background: #ff3b30;
    animation: pulse 1.5s infinite;
}

.floating-contact .zalo-button {
    background: #4c80cd;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    animation: pulse 1.5s infinite; /* same pulse effect as phone */
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.floating-contact .zalo-button img {
    width: 30px !important;
    height: 30px !important;
    object-fit: contain;
    display: block;
}

/* Optional: if the PNG icon is dark, add class `filter-white` to invert it to white */
.floating-contact .zalo-button img.filter-white {
    filter: brightness(0) invert(1);
}

/* label hidden on desktop; icon wrapper */
.floating-contact .label {
    display: none;
}

.floating-contact .icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.floating-contact .icon i {
    font-size: 18px;
}

.floating-contact .zalo-img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.floating-contact .phone-button .icon {
    background: #ff3b30;
    color: #fff;
}

.floating-contact .zalo-button .icon {
    background: #0068ff;
    color: #fff;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(200, 223, 209, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(46, 204, 113, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(46, 204, 113, 0);
    }
}

@media (max-width: 767px) {
    .floating-contact {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        transform: none;
        padding: 10px 20px;
        display: flex;
        flex-direction: row;
        background: rgba(255, 255, 255, 0.95);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        align-items: center;
        justify-content: center;
        width: 100%;
        z-index: 9999;
        box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
    }

    .floating-contact a {
        flex: 0 1 calc(50% - 10px);
        max-width: 180px;
        height: 46px;
        border-radius: 23px;
        padding: 0 15px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: #ffffff;
        text-decoration: none;
        transition: all 0.2s ease;
        border: none;
        margin: 0 5px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    }

    .floating-contact .phone-button {
        background: #d5463e;
        background: linear-gradient(135deg, #ff3b30 0%, #d5463e 100%);
        order: 2; /* Move to right */
    }

    .floating-contact .zalo-button {
        background: #3161ae;
        background: linear-gradient(135deg, #0068ff 0%, #3161ae 100%);
        order: 1; /* Move to left */
    }

    .floating-contact .label {
        display: inline-block;
        font-weight: 600;
        color: #ffffff;
        font-size: 13px;
        white-space: nowrap;
        letter-spacing: 0.3px;
    }

    .floating-contact .icon {
        width: 32px;
        height: 32px;
        flex: 0 0 auto;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.2);
        margin-right: 4px;
    }

    .floating-contact .phone-img,
    .floating-contact .zalo-img {
        width: 18px;
        height: 18px;
        filter: brightness(0) invert(1);
    }

    /* Active/Press state */
    .floating-contact a:active {
        transform: scale(0.95);
    }

    /* Pulse animation adjustments */
    .floating-contact .phone-button,
    .floating-contact .zalo-button {
        animation: mobilePulse 2s infinite;
    }

    @keyframes mobilePulse {
        0% {
            transform: scale(1);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
        50% {
            transform: scale(1.05);
            box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
        }
        100% {
            transform: scale(1);
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        }
    }
}
