/* Floating Action Buttons */
.floating-buttons {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Base floating button style */
.floating-btn {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    border: none;
    cursor: pointer;
    font-size: 20px;
}

.floating-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.25);
    color: white;
}

.floating-btn:active {
    transform: translateY(-1px);
}

/* Individual button colors */
.floating-promo {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    width: 64px;
    height: 64px;
    font-size: 24px;
    animation: pulse 2.5s infinite;
    border: 3px solid rgba(255, 255, 255, 0.3);
}

.floating-promo .promo-icon {
    font-size: 28px;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.floating-zalo {
    background: linear-gradient(135deg, #0068ff 0%, #0052cc 100%);
}

.floating-facebook {
    background: linear-gradient(135deg, #1877f2 0%, #166fe5 100%);
}

.floating-call {
    background: linear-gradient(135deg, #00c853 0%, #00a046 100%);
}

.floating-top {
    background: linear-gradient(135deg, #6c757d 0%, #545b62 100%);
}

/* Pulse animation for promo button */
@keyframes pulse {
    0% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(255, 215, 0, 0.7);
    }
    70% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 0 15px rgba(255, 215, 0, 0);
    }
    100% {
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15), 0 0 0 0 rgba(255, 215, 0, 0);
    }
}

/* Tooltips */
.floating-btn .tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
}

.floating-btn .tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 5px solid transparent;
    border-left-color: rgba(0, 0, 0, 0.8);
}

.floating-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-5px);
}

/* Promo tooltip special styling */
.floating-promo .promo-tooltip {
    position: absolute;
    right: 75px;
    top: 50%;
    transform: translateY(-50%);
    background: linear-gradient(135deg, #0A65CC 0%, #0851a4 100%);
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.floating-promo .promo-tooltip strong {
    display: block;
    margin-bottom: 2px;
    font-size: 14px;
}

.floating-promo .promo-tooltip::after {
    content: '';
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 8px solid transparent;
    border-left-color: #0A65CC;
}

.floating-promo:hover .promo-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(-10px);
}

/* Modal styling */
.promo-icon-large {
    font-size: 4rem;
    line-height: 1;
}

.promo-benefits {
    text-align: left;
    max-width: 300px;
    margin: 0 auto;
}

.benefit-item {
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-size: 15px;
}

.benefit-item:last-child {
    border-bottom: none;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .floating-buttons {
        right: 15px;
        bottom: 15px;
        gap: 10px;
    }
    
    .floating-btn {
        width: 48px;
        height: 48px;
        font-size: 18px;
    }
    
    .floating-promo {
        width: 56px;
        height: 56px;
    }
    
    .floating-promo .promo-icon {
        font-size: 24px;
    }
    
    /* Hide tooltips on mobile */
    .floating-btn .tooltip,
    .floating-promo .promo-tooltip {
        display: none;
    }
}

@media (max-width: 480px) {
    .floating-buttons {
        right: 10px;
        bottom: 10px;
        gap: 8px;
    }
    
    .floating-btn {
        width: 44px;
        height: 44px;
        font-size: 16px;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    }
    
    .floating-promo {
        width: 52px;
        height: 52px;
    }
}

/* Smooth show/hide animation for go-to-top */
.floating-top {
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.floating-top.show {
    opacity: 1;
    transform: scale(1);
}

.floating-top.hide {
    opacity: 0;
    transform: scale(0.8);
}

/* Focus styles for accessibility */
.floating-btn:focus {
    outline: 2px solid #0A65CC;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .floating-btn {
        border: 2px solid white;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .floating-btn,
    .floating-promo {
        animation: none;
        transition: none;
    }
    
    .tooltip,
    .promo-tooltip {
        transition: none;
    }
}