/* GESTREAM/assets/css/chatbot.css */

:root {
    --chat-primary-color: #6c5ce7; /* Color principal de tu sitio */
    --chat-header-bg: #6c5ce7;
    --chat-bot-bg: #f5f7fa;
    --chat-user-bg: #e8e6f8;
    --chat-text-dark: #333;
    --chat-text-light: #fff;
}

#chat-widget-icon {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background-color: var(--chat-primary-color);
    color: var(--chat-text-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    transition: transform 0.2s ease-in-out;
    z-index: 1001;
}
#chat-widget-icon:hover {
    transform: scale(1.1);
}
#chat-widget-icon .fa-times {
    display: none; /* Oculto por defecto */
}

#chat-widget-window {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 350px;
    max-height: 500px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 1000;
}

/* Estado activo (cuando se abre) */
#chat-widget-icon.active .fa-comment-dots { display: none; }
#chat-widget-icon.active .fa-times { display: block; }
#chat-widget-window.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.chat-header {
    background-color: var(--chat-header-bg);
    color: var(--chat-text-light);
    padding: 15px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-header i { font-size: 1.5rem; }
.chat-header h3 { margin: 0; font-size: 1.1rem; }
.chat-header-close {
    background: none;
    border: none;
    color: var(--chat-text-light);
    font-size: 1.2rem;
    margin-left: auto;
    cursor: pointer;
    opacity: 0.8;
}
.chat-header-close:hover { opacity: 1; }

.chat-messages {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #fff;
    border-bottom: 1px solid #f0f0f0;
}
.chat-message {
    padding: 10px 14px;
    border-radius: 18px;
    margin-bottom: 10px;
    max-width: 85%;
    line-height: 1.4;
    font-size: 0.95rem;
}
.chat-message.bot {
    background-color: var(--chat-bot-bg);
    color: var(--chat-text-dark);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}
.chat-message.user {
    background-color: var(--chat-user-bg);
    color: #444;
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}
.chat-message p { margin: 0 0 5px 0; }
.chat-message p:last-child { margin-bottom: 0; }
.chat-message a {
    color: var(--chat-primary-color);
    font-weight: 600;
    text-decoration: none;
}
.chat-message a:hover { text-decoration: underline; }

.chat-options {
    padding: 15px;
    background-color: #fff;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.chat-options button {
    width: 100%;
    padding: 10px;
    background-color: #fff;
    border: 1px solid var(--chat-primary-color);
    color: var(--chat-primary-color);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s, color 0.2s;
}
.chat-options button:hover {
    background-color: var(--chat-primary-color);
    color: var(--chat-text-light);
}

@media (max-width: 400px) {
    #chat-widget-window {
        width: calc(100% - 20px);
        height: 70%;
        bottom: 80px;
        right: 10px;
    }
    #chat-widget-icon {
        bottom: 15px;
        right: 15px;
    }
}