/**
 * Botón Personalizado del Chatbot - SITEC
 * Estilo pill con borde turquesa como la imagen
 */

/* Ocultar el botón predeterminado de Tawk.to - TODAS las variantes */
#tawk-bubble-container,
iframe#tawk-bubble,
.tawk-custom-color,
.tawk-min-container,
.tawk-button,
#tawk-bubble-loader,
div[id^="tawk-"],
.widget-visible #tawk-bubble-container {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Forzar ocultación incluso cuando Tawk.to lo muestra */
body #tawk-bubble-container {
    display: none !important;
}

html body #tawk-bubble-container {
    display: none !important;
}

/* Contenedor del botón personalizado */
.sitec-custom-chat-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    animation: slideInRight 0.5s ease-out;
}

/* Botón principal */
.sitec-chat-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    background: #ffffff;
    border: 3px solid #14b8a6; /* Teal/Turquesa */
    border-radius: 50px; /* Forma pill */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Gotham', 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 15px;
    color: #1e293b;
    text-decoration: none;
}

/* Hover effect */
.sitec-chat-btn:hover {
    background: #14b8a6;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(20, 184, 166, 0.4);
}

.sitec-chat-btn:hover .chat-icon {
    fill: #ffffff;
}

/* Active/Click effect */
.sitec-chat-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Icono de chat */
.chat-icon {
    width: 24px;
    height: 24px;
    fill: #1e293b;
    transition: fill 0.3s ease;
    flex-shrink: 0;
}

/* Texto */
.chat-text {
    font-weight: 700;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* Animación de pulso (opcional) */
@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

.sitec-chat-btn.pulse {
    animation: pulse 2s infinite;
}

/* Animación de entrada */
@keyframes slideInRight {
    from {
        transform: translateX(100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Indicador de mensaje nuevo (opcional) */
.sitec-chat-btn::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    background: #ef4444;
    border: 2px solid #ffffff;
    border-radius: 50%;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sitec-chat-btn.has-notification::after {
    opacity: 1;
    animation: pulse 2s infinite;
}

/* Responsive - Móvil */
@media (max-width: 640px) {
    .sitec-custom-chat-button {
        bottom: 20px;
        right: 16px;
    }
    
    .sitec-chat-btn {
        padding: 10px 20px;
        font-size: 14px;
        gap: 10px;
    }
    
    .chat-icon {
        width: 20px;
        height: 20px;
    }
    
    /* En móvil, solo mostrar icono si el espacio es muy reducido */
    @media (max-width: 380px) {
        .chat-text {
            display: none;
        }
        
        .sitec-chat-btn {
            padding: 12px;
            border-radius: 50%;
        }
    }
}

/* Accesibilidad */
.sitec-chat-btn:focus {
    outline: 3px solid #14b8a6;
    outline-offset: 2px;
}

/* Prevenir selección de texto */
.sitec-chat-btn {
    user-select: none;
    -webkit-user-select: none;
}

/* Animación de latido cuando hay nuevo mensaje */
@keyframes heartbeat {
    0%, 100% {
        transform: scale(1);
    }
    10%, 30% {
        transform: scale(1.1);
    }
    20%, 40% {
        transform: scale(1);
    }
}

.sitec-chat-btn.heartbeat {
    animation: heartbeat 1.5s ease-in-out infinite;
}

