/* AlphaBot Chat Styles */
#alphabot-chat-bubble {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex; /* Importante: usar flex por defecto */
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    transition: transform 0.2s ease;
}

#alphabot-chat-bubble:hover {
    transform: scale(1.05);
}

#alphabot-chat-bubble svg.alphabot-bubble-icon {
    width: 28px !important;
    height: 28px !important;
}

#alphabot-chat-window {
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    max-height: calc(100% - 100px);
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    display: none;
    flex-direction: column;
    overflow: hidden;
    z-index: 9998;
}

@media (max-width: 768px) {
    #alphabot-chat-window {
        width: 100vw;
        height: 100vh;
        bottom: 0;
        right: 0;
        border-radius: 0;
        max-height: 100vh;
    }
}

#alphabot-chat-header {
    color: #fff;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

#alphabot-chat-close {
    background: none;
    border: none;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#alphabot-chat-body {
    flex: 1;
    padding: 12px;
    overflow-y: auto;
    background-color: #f9f9f9;
}

.alphabot-message {
    margin: 8px 0;
    line-height: 1.4;
    max-width: 80%;
    word-wrap: break-word;
}

.alphabot-message.user {
    text-align: right;
    margin-left: auto;
    background-color: #e8f3e8;
    color: #515151;
    padding: 8px 12px;
    border-radius: 16px 16px 0 16px;
}

.alphabot-message.bot {
    text-align: left;
    margin-right: auto;
    background-color: #e5e5e5;
    color: #333;
    padding: 8px 12px;
    border-radius: 16px 16px 16px 0;
}

#alphabot-chat-input {
    border-top: 1px solid #ddd;
    display: flex;
    padding: 8px;
    background-color: #fff;
}

#alphabot-chat-input input {
    flex: 1;
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 8px;
    font-size: 14px;
    font-family: inherit;
}

#alphabot-chat-input button {
    margin-left: 8px;
    border: none;
    color: #fff;
    padding: 0 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.2s ease;
}

#alphabot-chat-input button:hover {
    opacity: 0.9;
}

#alphabot-chat-input button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Loading indicator */
.alphabot-typing-indicator {
    display: inline-block;
    padding: 8px 12px;
    background-color: #e5e5e5;
    border-radius: 16px;
    margin: 8px 0;
}

.alphabot-typing-indicator span {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #999;
    margin: 0 2px;
    animation: alphabot-typing 1.4s infinite;
}

.alphabot-typing-indicator span:nth-child(2) {
    animation-delay: 0.2s;
}

.alphabot-typing-indicator span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes alphabot-typing {
    0%, 60%, 100% {
        transform: translateY(0);
    }
    30% {
        transform: translateY(-10px);
    }
}