/*chat online*/

.chat-bubble
{
    position: fixed;
    bottom: 80px;
    right: 20px;
    background-color: #25d366; /* Color verde de WhatsApp */
    border-radius: 50%;
    width: 50px;
    height: 50px;
    text-align: center;
    line-height: 60px;
    cursor: pointer;
    box-shadow: 0px 0px 15px rgba(0, 0, 0, 0.2);
    z-index: 200;
    animation:  bubbleExpand 0.4s ease-out;
    transition: all ease 50ms;
}

.chat-bubble i
{
    display: block;
    padding: 15px;
    font-size: 20px;
    color: #fff;
}

.chat-bubble:hover
{
    transform: scale(1.1);
    transition: all ease 50ms;
}

/* Estilo para la transición suave del botón */
.chat-bubble.open
{
    animation: none;
}

.cerrar_w
{
    border-radius: 50%;
    background-color: #128c7e;
}

.btn-whatsapp:hover
{
    background-color: #25d366;
    color: #fff;
}

/* Animación del chat-popup (la ventana emergente) */
.chat-popup 
{
    position: fixed;
    bottom: 150px;
    right: 20px;
    background-color: white;
    border: 1px solid #ccc;
    border-radius: 13px;
    width: 300px;
    box-shadow: 0px 0px 10px rgba(0, 0, 0, 0.1);
    display: none;
    z-index: 200;
    opacity: 0;
    padding-bottom: 10px;
}

@media screen and (max-height: 457px)
{
    .chat-bubble
    {
        bottom: 10px;
        right: 80px; 
    }
    .chat-popup 
    {
         bottom: 10px;
        right:150px; 
    }
}

.question-circle-f {
    width: 20px;
    height: 20px;
    background-color: #ff0000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: white;
    position: absolute;
    right: -5px;
    top: -10px;
    animation: fadeInUp 1s ease-out forwards;
}

/* Cuando el chat se muestra */
.chat-popup.show 
{
    display: block;
    opacity: 1;
    transform: scale(1);
    animation: chatOpen 0.5s ease-out; /* Animación de apertura */
}

#chatPopup 
{
    text-align: center;
}

.chat-popup h5
{
    margin-bottom: 10px;
    text-align: left;
}

.chat-popup textarea
{
    width: 100%;
    height: 80px;
    border-radius: 5px;
    padding: 5px;
    border: 1px solid #ccc;
}

.chat-popup button
{
    text-align: center;
}

/* Cabecera del chat */
.chat-header
{
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px;
    margin-bottom: 0px;
}
.chat-header_back
{
    display: block;
    text-align: center;
    justify-content: center;
    margin: auto;
   
}


.user-avatar,
.sin-user-avatar
{
    display: block; 
    width: 100%;
    max-width: 40px;
    height: 40px;
    border-radius: 50%;
    background-position:center; 
    background-repeat: no-repeat;
    background-size:cover;  
    margin: auto 10px;
}
.user-avatar
{
    background-image: url( img/isotermix/empresa/illians_isotermix_new.png); 
 }

.sin-user-avatar
{
    background-image: url(../img/empresa/qr_whatsapp_isotermix.jpg); 
}

.user-info 
{
    flex-grow: 1;
}


/* ===== Estados del usuario (colores y animación) ===== */
#userStatus { position: relative; padding-left: 10px; font-size: 11px; margin: 0; }
#userStatus.online  { color: #25D366; }   /* verde WhatsApp */
#userStatus.away    { color: #F1C40F; }   /* amarillo */
#userStatus.offline { color: #95A5A6; }   /* gris */

#userStatus .activo_w
{
    width: 6px; 
    height: 6px; 
    position: absolute; 
    left: 0; 
    top: 4px;
    border-radius: 50%; 
    background-color: #25D366; 
    animation: pulsate 1s infinite;
}

/* Cambiar color del punto según estado */
#userStatus.away   .activo_w { background-color: #F1C40F; animation: pulsate 1.4s infinite; }
#userStatus.offline .activo_w { background-color: #95A5A6; animation: none; box-shadow: none; }



#Empresa
{
    text-align: left;
    margin: 0;
    margin-top: 10px;
    font-size: 14px;
    font-weight: bold; 
    
}


.chat-header_back span
{
    width: 100%;
    margin: auto;
    text-align: center;
}
.chat-header_back #Empresa
{
    margin: auto;
    margin-top: 10px;
    text-align: center;
    color: var(--color-iso1) ;
}


#userName
{
    text-align: left;
    margin: 0;
    font-size: 13px;
    font-weight: 500;
}

#userStatus 
{
    position: relative;
    text-align: left;
    margin: 0;
    padding-left: 10px;
    font-size: 11px;
    color: green;
}


#tipo_wa
{
    font-size: 11px;
    text-align: center;
    margin-bottom: 5px;
}

#notificationBubble 
{
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: #fff;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 12px;
}

.chat-message
{
    padding:0 10px;
}

.comentarioBase 
{
    width: 210px;
    font-size: 12px;
    background-color: #E0F8CA;
    padding:10px ;
    color: #000;
    text-align: left;
    margin: auto;
    margin-left: 10px;
    border-radius: 10px;
    animation: fadeInUp 1s ease-out forwards;
}

.comentarioBase::before
{
    content: '';
    position: absolute;
    width: 20px;
    height: 10px;
    background-color: #E0F8CA;
    top:  0px;
    left: -5px;
    border-radius: 0 0 0 50px;
    
}


.comentarioBase p
{
    margin-bottom: 0;
}

.alert_null
{
    position: relative;
    width: 210px;
    font-size: 12px;
    background-color: #ECE5DD;
    padding:10px ;
    color: #000;
    text-align: left;
    border-radius: 10px;
    margin:10px auto;
    margin-right: 10px;
}

.alert_null::before
{
    content: '';
    position: absolute;
    width: 20px;
    height: 10px;
    background-color: #ECE5DD;
    top:  0px;
    right: -5px;
    border-radius:  0  0 50px 0;
    
}

.contenedor_web_code
{
    padding: 10px;
    transform: rotateY(180deg);

}

.contenedor_web_code h3
{
    font-size: 18px;
    width: 200px;
    margin: auto;
}

.contenedor_web_code .code-qr
{
    display: block;
    width: 100%;
    max-width: 115px;
    height: 120px;
    background-image: url(../img/empresa/qr_whatsapp_isotermix.jpg);
    background-position:center; 
    background-repeat: no-repeat;
    background-size:cover;
    margin: auto;
}

.seguir_con_web_code h5
{
    font-size: 15px;
    margin: auto;
    margin-bottom: 10px;
    text-align: center;
}

/* Animación de rotación para el chat popup */
.chat-popup.rotated 
{
    transform: rotateY(180deg);
    animation: rotateChat 0.5s forwards;
}

/* Asegurarnos de que el contenido esté oculto al cambiar de vista */
.contenido_chat.hidden
{
    display: none;
}

.contenedor_web_code.hidden
{
    display: none;
}

/* Animación del fade in del contenido */
.contenedor_web_code
{
    transform: rotateY(180deg);
}

.contenedor_web_code.invertir
{
    transform: rotateY(180deg);
}


/* Agregar animación al chat-bubble */
@keyframes bubbleExpand 
{
    0% {
        transform: scale(0) rotate(45deg);
        opacity: 0;
    }
    50% {
        transform: scale(1.2) rotate(45deg);
        opacity: 1;
    }
    100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
}
 
/* Animación para el pop-up */
@keyframes chatOpen
{
    0% {
        transform: scale(0);
        opacity: 0;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Rotación de la tarjeta */
@keyframes rotateChat
{
    0% {
        transform: rotateY(0deg);
    }
    100% {
        transform: rotateY(180deg);
    }
}

@keyframes fadeInUp
{
    0% {
        opacity: 0;
        transform: translateY(60px);
    }
    100% {
         opacity: 1;
        transform: translateY(0);
    }
}
@keyframes pulsate {
  0% { box-shadow: 0 0 0 0 rgba(37,211,102,.6); }
  70% { box-shadow: 0 0 0 8px rgba(37,211,102,0); }
  100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); }
}