/* ========================================
   FLOATING SUPPORT BUTTON STYLES
   ======================================== */

.floating-support {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    
    /* Initial hidden state for animation */
    opacity: 0;
    transform: scale(0) translateY(20px);
    animation: supportAppear 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1s forwards;
}

/* Appear Animation */
@keyframes supportAppear {
    0% {
        opacity: 0;
        transform: scale(0) translateY(20px);
    }
    50% {
        opacity: 1;
        transform: scale(1.1) translateY(-5px);
    }
    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Main Button */
.floating-support__btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    background: var(--support-bg-color, var(--color-primary, #8b5cf6));
    border-radius: 50%;
    text-decoration: none;
    box-shadow: 
        0 4px 16px rgba(139, 92, 246, 0.3),
        0 6px 24px rgba(139, 92, 246, 0.2);
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    cursor: pointer;
}

.floating-support__btn:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 
        0 6px 24px rgba(139, 92, 246, 0.4),
        0 10px 40px rgba(139, 92, 246, 0.3);
}

.floating-support__btn:active {
    transform: scale(0.95);
}

/* Icon */
.floating-support__icon {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 24px;
    transition: transform 0.3s ease;
}

.floating-support__btn:hover .floating-support__icon {
    transform: scale(1.1);
    animation: iconBounce 0.5s ease;
}

@keyframes iconBounce {
    0%, 100% { transform: scale(1.1); }
    50% { transform: scale(1.2); }
}

/* Pulse Animation */
.floating-support__pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--support-bg-color, var(--color-primary, #8b5cf6));
    opacity: 0;
    z-index: 0;
    animation: pulse 2.5s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

.floating-support__pulse--delay {
    animation-delay: 1.25s;
}

@keyframes pulse {
    0% {
        opacity: 0.6;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(1.8);
    }
}

/* Tooltip */
.floating-support__tooltip {
    position: absolute;
    left: calc(100% + 16px);
    top: 50%;
    transform: translateY(-50%) translateX(-10px);
    padding: 10px 16px;
    background: var(--color-gray-900, #1f2937);
    color: #fff;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    border-radius: 10px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

/* RTL - Tooltip on left */
[dir="rtl"] .floating-support__tooltip,
.anilshop--rtl .floating-support__tooltip {
    left: auto;
    right: calc(100% + 16px);
    transform: translateY(-50%) translateX(10px);
}

.floating-support__tooltip-arrow {
    position: absolute;
    right: 100%;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-left-color: var(--color-gray-900, #1f2937);
}

[dir="rtl"] .floating-support__tooltip-arrow,
.anilshop--rtl .floating-support__tooltip-arrow {
    right: auto;
    left: 100%;
    border-left-color: transparent;
    border-right-color: var(--color-gray-900, #1f2937);
}

.floating-support__btn:hover .floating-support__tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(-50%) translateX(0);
}

/* ========================================
   RESPONSIVE
   ======================================== */

/* Large Desktop */
@media (min-width: 1920px) {
    .floating-support {
        bottom: 32px;
        right: 32px;
    }
    
    .floating-support__btn {
        width: 56px;
        height: 56px;
    }
    
    .floating-support__icon {
        font-size: 26px;
    }
    
    .floating-support__tooltip {
        font-size: 13px;
        padding: 10px 16px;
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1023px) {
    .floating-support {
        bottom: 20px;
        right: 20px;
    }
    
    .floating-support__btn {
        width: 48px;
        height: 48px;
    }
    
    .floating-support__icon {
        font-size: 22px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .floating-support {
        bottom: 16px;
        right: 16px;
    }
    
    .floating-support__btn {
        width: 46px;
        height: 46px;
    }
    
    .floating-support__icon {
        font-size: 20px;
    }
    
    /* Hide tooltip on mobile - show on tap instead */
    .floating-support__tooltip {
        display: none;
    }
}

/* Very small screens */
@media (max-width: 399px) {
    .floating-support {
        bottom: 12px;
        right: 12px;
    }
    
    .floating-support__btn {
        width: 42px;
        height: 42px;
    }
    
    .floating-support__icon {
        font-size: 18px;
    }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .floating-support {
        animation: none;
        opacity: 1;
        transform: scale(1);
    }
    
    .floating-support__pulse {
        animation: none;
        display: none;
    }
    
    .floating-support__btn,
    .floating-support__icon,
    .floating-support__tooltip {
        transition: none;
    }
    
    .floating-support__btn:hover .floating-support__icon {
        animation: none;
    }
}

/* ========================================
   PRINT - HIDE
   ======================================== */
@media print {
    .floating-support {
        display: none !important;
    }
}

/* ========================================
   COLOR VARIANTS (Optional Classes)
   ======================================== */

/* WhatsApp Green (Default) */
.floating-support--whatsapp .floating-support__btn {
    --support-bg-color: #25D366;
}

/* Telegram Blue */
.floating-support--telegram .floating-support__btn {
    --support-bg-color: #0088cc;
}

/* Instagram Gradient */
.floating-support--instagram .floating-support__btn {
    background: linear-gradient(135deg, #833AB4, #E1306C, #F77737);
}

.floating-support--instagram .floating-support__pulse {
    background: linear-gradient(135deg, #833AB4, #E1306C, #F77737);
}

/* Phone Blue */
.floating-support--phone .floating-support__btn {
    --support-bg-color: #3b82f6;
}

/* Chat Purple */
.floating-support--chat .floating-support__btn {
    --support-bg-color: #8b5cf6;
}

/* Primary Color */
.floating-support--primary .floating-support__btn {
    --support-bg-color: var(--color-primary);
}

