.unebot-fab-img {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 120px; /* tamaño del bot */
    height: auto;
    cursor: pointer;
    z-index: 99998;
    transition: transform 0.2s ease, filter 0.2s ease;
    background: transparent;
    border: none;
    outline: none;
}

.unebot-fab-img:hover,
.unebot-fab-img:focus,
.unebot-fab-img:active {
    outline: none;
    box-shadow: none;
}


.unebot-loading {
    background: transparent;
    border: none;
}

.typing {
    display: flex;
    gap: 5px;
    padding: 10px;
}

.typing span {
    width: 8px;
    height: 8px;
    background: #4f8cff;
    border-radius: 50%;
    animation: bounce 1.2s infinite;
}

.typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0.6);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.unebot-fab {
    position: fixed;
    right: 24px;
    bottom: 24px;
    width: 64px;
    height: 64px;
    border: none;
    border-radius: 999px;
    background: linear-gradient(135deg, #0b57d0, #4f8cff);
    color: #fff;
    cursor: pointer;
    box-shadow: 0 14px 32px rgba(11,87,208,0.35);
    z-index: 99998;
    font-size: 24px;
}
.unebot-modal {
    position: fixed;
    inset: 0;
    background: rgba(10,20,40,0.35);
    display: none;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 24px;
    z-index: 99999;
}
.unebot-modal.is-open {
    display: flex;
}
.unebot-chat {
    width: 100%;
    max-width: 520px;
    height: 650px;
    display:flex;
    flex-direction:column;
    border: 1px solid #d9e2f2;
    border-radius: 20px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(16, 24, 40, 0.22);
}

.unebot-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 6px 16px rgba(0,0,0,0.25);
}

.unebot-chat--embedded {
    max-width: 760px;
}
.unebot-chat__header {
    padding: 18px;
    background: linear-gradient(135deg, #4f8cff, #6ea8ff);
    color: #fff;
    display: flex;
    align-items: center;
    gap: 12px;
    backdrop-filter: blur(10px);
    position: relative;
}
.unebot-chat__title {
    font-size: 18px;
    font-weight: 700;
}
.unebot-chat__subtitle {
    font-size: 12px;
    opacity: 0.92;
    margin-top: 4px;
}
.unebot-chat__messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    background: linear-gradient(to bottom, #f5f8ff, #eef3ff);
}
.unebot-chat__composer {
    display: flex;
    gap: 10px;
    padding: 12px;
    background: #fff;
}

.unebot-chat__composer textarea {
    flex: 1;
    border-radius: 20px;
    padding: 12px 16px;
    border: 1px solid #dbe4ff;
    background: #f9fbff;
}

.unebot-chat__composer button {
    border-radius: 20px;
    padding: 12px 18px;
    background: linear-gradient(135deg, #4f8cff, #6ea8ff);
    color: white;
    font-weight: bold;
}
.unebot-chat__close {
    border: 0;
    border-radius: 14px;
    padding: 12px 16px;
    cursor: pointer;
}
.unebot-chat__composer button {
    background: #0b57d0;
    color: #fff;
}
.unebot-chat__close {
    background: rgba(255,255,255,0.16);
    color: #fff;
    position: absolute;
    right: 12px;
    top: 12px;
}
.unebot-msg {
    margin: 8px 0;
    padding: 12px 16px;
    border-radius: 18px;
    font-size: 14px;
    max-width: 75%;
    line-height: 1.4;
}
.unebot-msg strong {
    display: block;
    margin-bottom: 6px;
    font-size: 12px;
    opacity: 0.85;
}
.unebot-msg--assistant {
    background: #ffffff;
    border: 1px solid #e4ecff;
    border-bottom-left-radius: 6px;
}
.unebot-msg--user {
    background: linear-gradient(135deg, #4f8cff, #6ea8ff);
    color: white;
    margin-left: auto;
    border-bottom-right-radius: 6px;
}
.unebot-msg--error {
    background: #fff3f2;
    border: 1px solid #f3c7c2;
    color: #9b1c1c;
}
.unebot-error-details {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px dashed #e8a7a0;
    font-size: 12px;
    white-space: pre-wrap;
}
@media (max-width: 640px) {
    .unebot-modal {
        padding: 12px;
    }
    .unebot-chat {
        max-width: 100%;
    }
    .unebot-chat__messages {
        height: 62vh;
    }
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}