/* WhatsApp Orbital Social Media System - Floating Button */

/* Wrapper for floating WhatsApp button with orbital icons */
.whatsapp-orbit-wrapper-fixed {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 70px;
    height: 70px;
    z-index: 1000;
}

/* Main Floating WhatsApp Button */
.floating-whatsapp-main {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.5);
    transition: all 0.3s ease;
    z-index: 10;
    animation: float 3s ease-in-out infinite;
    pointer-events: auto;
    cursor: pointer;
    touch-action: manipulation;
}

.floating-whatsapp-main svg {
    width: 38px;
    height: 38px;
    pointer-events: none;
}

.floating-whatsapp-main:hover {
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 12px 35px rgba(37, 211, 102, 0.7);
}

/* Orbit Container */
.orbit-container-fixed {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 180px;
    height: 180px;
    animation: rotate-orbit 12s linear infinite;
    pointer-events: none;
}

/* Orbital Icons */
.orbit-icon-fixed {
    position: absolute;
    width: 50px;
    height: 50px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
    pointer-events: auto;
    cursor: pointer;
    animation: rotate-reverse 12s linear infinite;
    /* Área de touch más grande */
    padding: 8px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

/* Aumentar área clickeable con pseudo-elemento */
.orbit-icon-fixed::before {
    content: '';
    position: absolute;
    top: -15px;
    left: -15px;
    right: -15px;
    bottom: -15px;
    border-radius: 50%;
}

.orbit-icon-fixed svg {
    width: 26px;
    height: 26px;
    pointer-events: none;
}

.orbit-icon-fixed:hover {
    transform: scale(1.3);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
    z-index: 15;
}

.orbit-icon-fixed:active {
    transform: scale(1.15);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.4);
}

/* Position each icon at different angles around the circle */
.orbit-icon-1 {
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    color: #1877F2; /* Facebook blue */
}

.orbit-icon-2 {
    bottom: 15%;
    right: 5%;
    background: linear-gradient(135deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white; /* Instagram gradient */
}

.orbit-icon-3 {
    bottom: 15%;
    left: 5%;
    color: #000000; /* TikTok black */
}

/* Float Animation */
@keyframes float {
    0%, 100% {
        transform: translate(-50%, -50%) translateY(0);
    }
    50% {
        transform: translate(-50%, -50%) translateY(-10px);
    }
}

/* Rotation Animations */
@keyframes rotate-orbit {
    from {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

@keyframes rotate-reverse {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(-360deg);
    }
}

/* Tablet Responsive */
@media (max-width: 768px) {
    .whatsapp-orbit-wrapper-fixed {
        width: 60px;
        height: 60px;
        bottom: 25px;
        right: 25px;
    }

    .floating-whatsapp-main {
        width: 60px;
        height: 60px;
        pointer-events: auto !important;
        z-index: 11 !important;
        touch-action: manipulation !important;
    }

    /* Área touch más grande en tablet */
    .floating-whatsapp-main::before {
        content: '';
        position: absolute;
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
        border-radius: 50%;
    }

    .floating-whatsapp-main svg {
        width: 32px;
        height: 32px;
    }

    .floating-whatsapp-main:active {
        transform: translate(-50%, -50%) scale(0.95);
    }

    .orbit-container-fixed {
        width: 160px;
        height: 160px;
    }

    .orbit-icon-fixed {
        width: 48px;
        height: 48px;
        padding: 10px;
    }

    /* Aumentar área touch en tablet */
    .orbit-icon-fixed::before {
        top: -18px;
        left: -18px;
        right: -18px;
        bottom: -18px;
    }

    .orbit-icon-fixed svg {
        width: 24px;
        height: 24px;
    }
}

/* Mobile Responsive */
@media (max-width: 480px) {
    .whatsapp-orbit-wrapper-fixed {
        width: 55px;
        height: 55px;
        bottom: 20px;
        right: 20px;
    }

    .floating-whatsapp-main {
        width: 55px;
        height: 55px;
        /* Asegurar que sea clickeable en móvil */
        pointer-events: auto !important;
        z-index: 11 !important;
        touch-action: manipulation !important;
        -webkit-tap-highlight-color: transparent;
    }

    /* Área touch más grande para el botón WhatsApp en móvil */
    .floating-whatsapp-main::before {
        content: '';
        position: absolute;
        top: -15px;
        left: -15px;
        right: -15px;
        bottom: -15px;
        border-radius: 50%;
    }

    .floating-whatsapp-main svg {
        width: 28px;
        height: 28px;
    }

    /* Feedback visual al presionar WhatsApp */
    .floating-whatsapp-main:active {
        transform: translate(-50%, -50%) scale(0.95);
    }

    .orbit-container-fixed {
        width: 145px;
        height: 145px;
    }

    .orbit-icon-fixed {
        width: 46px;
        height: 46px;
        padding: 12px;
    }

    /* Área touch MUCHO más grande en móvil */
    .orbit-icon-fixed::before {
        top: -20px;
        left: -20px;
        right: -20px;
        bottom: -20px;
    }

    .orbit-icon-fixed svg {
        width: 22px;
        height: 22px;
    }

    /* Feedback visual al tocar */
    .orbit-icon-fixed:active {
        background: rgba(255, 107, 0, 0.2);
        transform: scale(1.2);
    }
}

/* Extra Small Mobile */
@media (max-width: 380px) {
    .whatsapp-orbit-wrapper-fixed {
        width: 50px;
        height: 50px;
        bottom: 15px;
        right: 15px;
    }

    .floating-whatsapp-main {
        width: 50px;
        height: 50px;
        pointer-events: auto !important;
        z-index: 11 !important;
        touch-action: manipulation !important;
    }

    /* Área touch extra grande para pantallas muy pequeñas */
    .floating-whatsapp-main::before {
        content: '';
        position: absolute;
        top: -18px;
        left: -18px;
        right: -18px;
        bottom: -18px;
        border-radius: 50%;
    }

    .floating-whatsapp-main svg {
        width: 26px;
        height: 26px;
    }

    .floating-whatsapp-main:active {
        transform: translate(-50%, -50%) scale(0.95);
    }

    .orbit-container-fixed {
        width: 135px;
        height: 135px;
    }

    .orbit-icon-fixed {
        width: 44px;
        height: 44px;
        padding: 12px;
    }

    /* Área touch extra grande para pantallas pequeñas */
    .orbit-icon-fixed::before {
        top: -22px;
        left: -22px;
        right: -22px;
        bottom: -22px;
    }

    .orbit-icon-fixed svg {
        width: 20px;
        height: 20px;
    }
}
