/* ====================================
   Botones de Soporte Flotantes - Expandible
   ==================================== */

.support-container {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    top: auto !important;
    right: auto !important;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
    transition: transform 0.3s ease, opacity 0.3s ease;
    animation: slideInLeft 0.5s ease-out;
    padding: 15px;
}

/* Ocultar cuando se hace scroll hacia abajo */
.support-container.scrolled-down {
    transform: translateX(-100px);
    opacity: 0;
    pointer-events: none;
}

/* Mostrar cuando se hace scroll hacia arriba o está en la parte superior */
.support-container.scrolled-up,
.support-container.at-top {
    transform: translateX(0);
    opacity: 1;
    pointer-events: all;
}

/* Botón Principal de Soporte */
.support-main-button {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    order: 2;
}

.support-main-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.support-main-button:active {
    transform: translateY(-1px) scale(1.02);
}

/* Iconos del botón principal */
.support-icon,
.support-close-icon {
    width: 22px;
    height: 22px;
    transition: all 0.3s ease;
    position: absolute;
}

.support-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.support-close-icon {
    opacity: 0;
    transform: rotate(-90deg);
}

.support-main-button.active .support-icon {
    opacity: 0;
    transform: rotate(90deg);
}

.support-main-button.active .support-close-icon {
    opacity: 1;
    transform: rotate(0deg);
}

.support-main-button.active {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

/* Canales de Soporte */
.support-channels {
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    opacity: 0;
    transform: translateY(62px);
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    margin-bottom: 0;
    order: 1;
}

.support-channels.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.support-channel {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    animation: channelSlideIn 0.3s ease-out backwards;
}

.support-channels.active .support-channel:nth-child(1) {
    animation-delay: 0.05s;
}

.support-channels.active .support-channel:nth-child(2) {
    animation-delay: 0.1s;
}

.support-channels.active .support-channel:nth-child(3) {
    animation-delay: 0.15s;
}

@keyframes channelSlideIn {
    from {
        opacity: 0;
        transform: translateY(62px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.support-channel svg {
    width: 26px;
    height: 26px;
}

.support-channel:hover {
    transform: translateY(-3px) scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Tooltip */
.support-channel::before {
    content: attr(data-tooltip);
    position: absolute;
    left: 60px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10000;
}

.support-channel::after {
    content: '';
    position: absolute;
    left: 52px;
    top: 50%;
    transform: translateY(-50%);
    border: 6px solid transparent;
    border-right-color: rgba(0, 0, 0, 0.85);
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 10000;
}

.support-channel:hover::before,
.support-channel:hover::after {
    opacity: 1;
}

/* WhatsApp Channel */
.support-channel-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
}

.support-channel-whatsapp:hover {
    background: linear-gradient(135deg, #20BA5A 0%, #0F7A6B 100%);
}

/* Telegram Channel */
.support-channel-telegram {
    background: linear-gradient(135deg, #0088cc 0%, #005580 100%);
    color: white;
}

.support-channel-telegram:hover {
    background: linear-gradient(135deg, #0077b5 0%, #004466 100%);
}

/* Animación de entrada del contenedor */
@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-100px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* La animación se aplica directamente en la primera definición de .support-container */

/* Responsive */
@media (max-width: 768px) {
    .support-container {
        bottom: 0 !important;
        left: 0 !important;
        top: auto !important;
        right: auto !important;
        padding: 12px;
    }
    
    .support-main-button {
        width: 55px;
        height: 55px;
    }
    
    .support-icon,
    .support-close-icon {
        width: 26px;
        height: 26px;
    }
    
    .support-channel {
        width: 46px;
        height: 46px;
    }
    
    .support-channel svg {
        width: 24px;
        height: 24px;
    }

    .support-channel::before {
        font-size: 12px;
        padding: 6px 10px;
    }
}

@media (max-width: 480px) {
    .support-container {
        bottom: 0 !important;
        left: 0 !important;
        top: auto !important;
        right: auto !important;
        padding: 10px;
    }
    
    .support-main-button {
        width: 50px;
        height: 50px;
    }
    
    .support-icon,
    .support-close-icon {
        width: 24px;
        height: 24px;
    }
    
    .support-channel {
        width: 42px;
        height: 42px;
    }
    
    .support-channel svg {
        width: 22px;
        height: 22px;
    }

    .support-channel::before {
        font-size: 11px;
        padding: 5px 8px;
        left: 50px;
    }

    .support-channel::after {
        left: 44px;
    }
}

/* Efecto de pulso opcional en el botón principal - Desactivado por defecto */
.support-main-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 50%;
    background: inherit;
    animation: none; /* Desactivado por defecto */
    z-index: -1;
    opacity: 0;
}

/* Activar pulso solo cuando el botón está activo o en hover */
.support-main-button:hover::before {
    animation: pulse 2s ease-out infinite;
    opacity: 0.5;
}

@keyframes pulse {
    0% {
        transform: scale(1);
        opacity: 0.5;
    }
    50% {
        transform: scale(1.1);
        opacity: 0.3;
    }
    100% {
        transform: scale(1.2);
        opacity: 0;
    }
}
