/* css/chatbot.css */
/* Estilos específicos del chatbot CERI */

/* Chatbot Container */
.chatbot-container {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 350px;
    height: 450px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    display: none;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.chatbot-container.active {
    display: flex;
}

/* Chatbot Header */
.chatbot-header {
    background: linear-gradient(90deg, var(--color-accento), var(--color-secundario));
    color: white;
    padding: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.chatbot-header h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
}

.close-chatbot {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.close-chatbot:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Chatbot Messages */
.chatbot-messages {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background-color: #f9f9f9;
}

.message {
    padding: 12px 18px;
    border-radius: 18px;
    max-width: 80%;
    font-size: 0.95rem;
    line-height: 1.4;
    word-wrap: break-word;
}

.bot-message {
    background-color: white;
    border: 1px solid #eee;
    align-self: flex-start;
    border-bottom-left-radius: 5px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.user-message {
    background-color: var(--color-accento);
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 5px;
    box-shadow: 0 2px 5px rgba(107, 114, 128, 0.2);
}

/* Chatbot Input */
.chatbot-input {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
    background-color: white;
}

.chatbot-input input {
    flex: 1;
    padding: 12px 20px;
    border: 1px solid #ddd;
    border-radius: 30px;
    outline: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    transition: var(--transition);
}

.chatbot-input input:focus {
    border-color: var(--color-accento);
    box-shadow: 0 0 0 2px rgba(107, 114, 128, 0.1);
}

.chatbot-input button {
    background-color: var(--color-accento);
    color: white;
    border: none;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.chatbot-input button:hover {
    background-color: var(--color-hover);
    transform: translateY(-2px);
}

/* Chatbot Trigger */
.chatbot-trigger {
    position: fixed;
    bottom: 30px;
    right: 100px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--color-accento), var(--color-secundario));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(107, 114, 128, 0.3);
    z-index: 999;
    transition: var(--transition);
    border: none;
    outline: none;
}

.chatbot-trigger:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(107, 114, 128, 0.4);
}

.chatbot-trigger.pulse {
    animation: pulse 1s infinite;
}

/* Scrollbar para mensajes */
.chatbot-messages::-webkit-scrollbar {
    width: 6px;
}

.chatbot-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
    background: var(--color-accento);
    border-radius: 10px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
    background: var(--color-hover);
}

/* Responsive Chatbot */
@media (max-width: 768px) {
    .chatbot-container {
        width: calc(100% - 40px);
        right: 20px;
        bottom: 80px;
        height: 400px;
    }
    
    .chatbot-trigger {
        bottom: 100px;
        right: 30px;
    }
    
    .whatsapp-button {
        bottom: 160px;
    }
}

@media (max-width: 576px) {
    .chatbot-container {
        width: calc(100% - 20px);
        right: 10px;
        height: 380px;
    }
    
    .chatbot-header h3 {
        font-size: 1rem;
    }
    
    .message {
        font-size: 0.9rem;
        padding: 10px 15px;
    }
}