.contact-float {
    --contact-brand: #d84339;
    position: fixed;
    right: 24px;
    bottom: max(24px, env(safe-area-inset-bottom));
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 188px;
    font-family: "Plus Jakarta Sans", Arial, sans-serif;
}

.contact-float-items {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.contact-float-items[hidden] {
    display: none;
}

.contact-float-item,
.contact-float-toggle {
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 58px;
    padding: 6px 6px 6px 16px;
    border: 1px solid #e7ebf0;
    border-radius: 32px;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(25, 42, 66, 0.09);
    cursor: pointer;
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    -webkit-tap-highlight-color: transparent;
}

.contact-float-item {
    --channel-color: var(--contact-brand);
    background: #fff;
    color: #202d40;
}

.contact-float-item:hover,
.contact-float-item:focus-visible {
    transform: translateX(-4px);
    border-color: var(--channel-color);
    color: #202d40;
    text-decoration: none;
    box-shadow: 0 7px 22px rgba(25, 42, 66, 0.14);
}

.contact-float-item:focus-visible,
.contact-float-toggle:focus-visible {
    outline: 3px solid #172b4d;
    outline-offset: 4px;
}

.contact-float-label,
.contact-float-toggle-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
    min-width: 0;
    text-align: left;
}

.contact-float-label strong,
.contact-float-toggle-copy strong {
    color: inherit;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.25;
}

.contact-float-label small {
    color: #657184;
    font-size: 10px;
    font-weight: 500;
    line-height: 1.4;
    white-space: nowrap;
}

.contact-float-btn,
.contact-float-toggle-icon {
    display: flex;
    flex: 0 0 44px;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
}

.contact-float-btn {
    background: var(--channel-color);
    color: #fff;
}

.contact-float-btn svg,
.contact-float-toggle-icon svg {
    display: block;
    width: 26px;
    height: 26px;
    flex-shrink: 0;
}

.contact-channel-zalo {
    --channel-color: #0068ff;
}

.contact-channel-zalo .contact-float-btn svg {
    width: 40px;
    height: 40px;
}

.contact-channel-messenger {
    --channel-color: #8a3bdf;
}

.contact-channel-messenger .contact-float-btn {
    background: linear-gradient(155deg, #168aff 0%, #a334fa 55%, #ff617c 100%);
}

.contact-channel-facebook {
    --channel-color: #1877f2;
}

.contact-float-toggle {
    border-color: var(--contact-brand);
    background: var(--contact-brand);
    color: #fff;
    box-shadow: 0 5px 20px rgba(216, 67, 57, 0.24);
}

.contact-float-toggle:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(216, 67, 57, 0.3);
}

.contact-float-toggle-copy small {
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    line-height: 1.4;
    letter-spacing: 1.3px;
}

.contact-float-toggle-icon {
    background: rgba(255, 255, 255, 0.14);
}

.contact-toggle-close,
.contact-float-toggle.active .contact-toggle-open {
    display: none !important;
}

.contact-float-toggle.active .contact-toggle-close {
    display: block !important;
}

@media (max-width: 767px) {
    .contact-float {
        right: max(12px, env(safe-area-inset-right));
        bottom: max(16px, env(safe-area-inset-bottom));
        width: 170px;
        gap: 10px;
    }

    .contact-float-item,
    .contact-float-toggle {
        padding-left: 13px;
    }

    .contact-float-items {
        gap: 8px;
    }

    .contact-float-label strong,
    .contact-float-toggle-copy strong {
        font-size: 13px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .contact-float-item,
    .contact-float-toggle {
        transition: none;
    }
}
