/*
 * Floating Widgets — WhatsApp Button & Social Icons Bar
 * Extracted from whatsapp-widget.php and social-widget.php (FIX 2.5) for browser caching.
 * Previously output as inline <style> tags on every page via wp_footer.
 */

/* =========================================
   FLOATING WHATSAPP BUTTON
   ========================================= */
.ts-floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 99990;
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none !important;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.ts-floating-whatsapp:hover {
    transform: translateY(-5px) scale(1.02);
}

.ts-floating-whatsapp-tooltip {
    background: #ffffff;
    color: #333333;
    padding: 10px 18px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateX(15px);
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    white-space: nowrap;
}

/* Tooltip tail */
.ts-floating-whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    border-width: 6px 0 6px 6px;
    border-style: solid;
    border-color: transparent transparent transparent #ffffff;
}

.ts-floating-whatsapp:hover .ts-floating-whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
}

.ts-floating-whatsapp-icon {
    width: 65px;
    height: 65px;
    background: linear-gradient(135deg, #25D366, #128C7E);
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.4);
    position: relative;
}

/* Double pulsing animation */
.ts-floating-whatsapp-icon::before,
.ts-floating-whatsapp-icon::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    border: 2px solid #25D366;
    left: -15px;
    right: -15px;
    top: -15px;
    bottom: -15px;
    animation: ts-pulse-whatsapp 2s linear infinite;
    opacity: 0;
    z-index: -1;
}

.ts-floating-whatsapp-icon::after {
    animation-delay: 1s;
}

.ts-floating-whatsapp-icon svg {
    width: 38px;
    height: 38px;
    fill: #ffffff;
    margin-top: -1px;
    margin-left: 1px;
}

@keyframes ts-pulse-whatsapp {
    0%   { transform: scale(0.5); opacity: 0; }
    50%  { opacity: 0.6; }
    100% { transform: scale(1.2); opacity: 0; }
}

@media (max-width: 768px) {
    .ts-floating-whatsapp {
        bottom: 20px;
        right: 20px;
    }
    .ts-floating-whatsapp-tooltip {
        display: none; /* Keep it clean on mobile */
    }
    .ts-floating-whatsapp-icon {
        width: 55px;
        height: 55px;
    }
    .ts-floating-whatsapp-icon svg {
        width: 32px;
        height: 32px;
    }
    .ts-floating-whatsapp-icon::before,
    .ts-floating-whatsapp-icon::after {
        left: -10px;
        right: -10px;
        top: -10px;
        bottom: -10px;
    }
}

/* =========================================
   FLOATING SOCIAL ICONS BAR
   ========================================= */
.floating-social-widget {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9998;
    display: flex;
    flex-direction: column;
    gap: 1px;
    background: #fff;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    border-radius: 8px 0 0 8px;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.floating-social-widget .social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.floating-social-widget .social-icon i {
    font-size: 18px;
    transition: transform 0.3s ease;
}

.floating-social-widget .social-icon:hover {
    width: 55px;
}

.floating-social-widget .social-icon:hover i {
    transform: scale(1.2);
}

/* Specific Brand Colors */
.floating-social-widget .facebook {
    background-color: #1877F2;
}
.floating-social-widget .facebook:hover {
    background-color: #166FE5;
    color: #fff;
}

.floating-social-widget .instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}
.floating-social-widget .instagram:hover {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    opacity: 0.9;
    color: #fff;
}

.floating-social-widget .tiktok {
    background-color: #000000;
}
.floating-social-widget .tiktok:hover {
    background-color: #333333;
    color: #fff;
}

/* Adjust position on mobile to not overlap */
@media (max-width: 768px) {
    .floating-social-widget {
        transform: translateY(-50%) scale(0.85);
        transform-origin: right center;
    }
}
