

/*Botón desktop*/
#chat {
    display: scroll;
    position: fixed;
    padding-top:12px;
    bottom: 30px;
    right: 30px;
    cursor: pointer;
    background-color: #00335b; 
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 99000;

}

#chat svg:hover {
    -webkit-animation-name: wobble-to-top-right;
    animation-name: wobble-to-top-right;
    -webkit-animation-duration: 1s;
    animation-duration: 1s;
    -webkit-animation-timing-function: ease-in-out;
    animation-timing-function: ease-in-out;
    -webkit-animation-iteration-count: 1;
    animation-iteration-count: 1;
}

/* Animación wobble */
@-webkit-keyframes wobble-to-top-right {
    16.65% { -webkit-transform: translate(2.5px, -2.5px); transform: translate(2.5px, -2.5px); }
    33.3%  { -webkit-transform: translate(-2px, 2px); transform: translate(-2px, 2px); }
    49.95% { -webkit-transform: translate(1.5px, -1.5px); transform: translate(1.5px, -1.5px); }
    66.6%  { -webkit-transform: translate(-1px, 1px); transform: translate(-1px, 1px); }
    83.25% { -webkit-transform: translate(0.5px, -0.5px); transform: translate(0.5px, -0.5px); }
    100%   { -webkit-transform: translate(0, 0); transform: translate(0, 0); }
}
@keyframes wobble-to-top-right {
    16.65% { transform: translate(2.5px, -2.5px); }
    33.3%  { transform: translate(-2px, 2px); }
    49.95% { transform: translate(1.5px, -1.5px); }
    66.6%  { transform: translate(-1px, 1px); }
    83.25% { transform: translate(0.5px, -0.5px); }
    100%   { transform: translate(0, 0); }
}

/*Botón mobile*/
#chatMobile {
    display: none;
    position: fixed;
    bottom: 80px;
    right: 50px;
    padding: 7px;
    cursor: pointer;
    z-index: 99000;
    -webkit-transition: all 0.35s ease;
    -moz-transition: all 0.35s ease;
    -o-transition: all 0.35s ease;
    transition: all 0.35s ease;
}

#chatMobile:hover {
    -webkit-animation: bounce .4s infinite alternate;
    -moz-animation: bounce .4s infinite alternate;
    animation: bounce .4s infinite alternate;
}

@-webkit-keyframes bounce { to { -webkit-transform: scale(1.2); } }
@-moz-keyframes bounce { to { -moz-transform: scale(1.2); } }
@keyframes bounce { to { transform: scale(1.2); } }

 /*CAPA WEBCHAT*/

.chatbox {
    position: fixed;
    bottom: 0;
    right: 30px;
    margin: 0 0 -1500px;
    background: #fff;
    box-shadow: 0 15px 20px rgba(0, 0, 0, 0.3);
    padding: 0px;
    z-index: 16000001;
    max-height: 600px;
    height: 100%;
    transition: all 0.9s ease-in-out;
}
.button-text{
	font-size: 10px;
	color:#ffffff;
	font-weight: 600;

}

/*Botón cerrar chat*/
#close-chat {
    position: absolute;
    top: 13px;
    right: 17px;
    font-size: 48px;
    background: transparent;
    z-index: 2;
    cursor: pointer;
    font-family: Century Gothic, Arial, sans-serif;
    text-align: center;
    color: #00335b;
}

/*Iframe SanIA*/
#iframeSanIA {
    width: 480px;
    max-height: 600px;
    height: 100%;
    border: 0;
    margin: 0;
    padding: 0;
}
#chat svg,
#chatMobile svg {
    color: #fff;
    width: 28px;
    height: 28px;
}

/* Punto verde de “conectado” */
#chat::after,
#chatMobile::after {
    content: "";
    position: absolute;
    top: 0;
    right: 5px;
    width: 12px;
    height: 12px;
    background-color: #28a745; 
    border: 2px solid #00335b; 
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(0,0,0,0.3);
}


@media (max-width: 992px) {
    /*Capa webchat en móvil*/
    .chatbox {
        right: 20px;
    }

    #chat { display: none; }
    #chatMobile { display: flex;
        align-items: center;
        padding-top: 17px;
        justify-content: center;
        width: 60px;
        height: 60px;
        border-radius: 50%;
        background-color: #00335b;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1); }
}

@media (max-device-width: 992px) and (orientation: landscape) {
    .chatbox {

        width: 100%;
        height: 100%;
        right: 0;
        box-shadow: 0;
    }
    #iframeSanIA { width: 100%; height: 100%; }
}

@media (max-device-width: 896px) and (orientation: landscape) {
    .chatbox {
        width: 100%;
        height: 100%;
        right: 0;
        box-shadow: 0;
    }
    #iframeSanIA { width: 100%; height: 100%; }
}

@media (max-width: 600px) {
    #chatMobile { right: 23px; }
    .chatbox { width: 100%; height: 100%; right: 0; box-shadow: 0; }
    #iframeSanIA { width: 100%; height: 100%; }
}


#chat svg, #chatMobile svg {
	color: #fff;
    width: 24px;
    height: 24px;
    display: block;
}
