/* Chatbot container */
.chatbot-container {
    position: fixed;
    bottom: 80px;
    left: 20px;
    width: 330px;
    max-height: 500px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    display: none; /* Inicialmente oculto */
    flex-direction: column;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 9999;
    font-family: 'Segoe UI', sans-serif;
}
/* Cuando tenga la clase `open`, muéstralo */
.chatbot-container.open {
  display: flex;   /* o block, según lo que prefieras */
}

/* Header */
.chatbot-header {
    background-color: #ffc107; /* Color amarillo de GECOTEL */
    color: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.chatbot-close {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    line-height: 1; /* Para alinear mejor la 'x' */
}

/* Messages */
.chatbot-messages {
    flex: 1;
    padding: 10px 14px;
    overflow-y: auto;
    font-size: 0.92rem;
    line-height: 1.5;
    scroll-behavior: smooth; /* Desplazamiento suave */
}

/* Input area */
.chatbot-input {
    display: flex;
    border-top: 1px solid #ddd;
    background: #f9f9f9;
}

.chatbot-input input {
    flex: 1;
    border: none;
    padding: 10px;
    font-size: 0.95rem;
    outline: none;
    background: transparent;
}

.chatbot-input button {
    background: none;
    border: none;
    padding: 10px 15px;
    font-size: 18px;
    color: #ffc107; /* Color amarillo */
    cursor: pointer;
    transition: color 0.2s ease;
}

.chatbot-input button:hover {
    color: #e0a800; /* Un tono más oscuro al pasar el ratón */
}

/* Floating button */
.chatbot-toggle-button {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #ffc107; /* Color amarillo */
    color: white;
    border: none;
    padding: 14px;
    font-size: 20px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 9999;
    transition: background 0.2s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

.chatbot-toggle-button:hover {
    background: #e0a800; /* Un tono más oscuro al pasar el ratón */
    transform: translateY(-2px); /* Pequeño efecto al pasar el ratón */
}

/* Bubble styles */
.chatbot-messages div.user,
.chatbot-messages div.bot {
    display: flex; /* Para controlar la alineación de la burbuja */
}

.chatbot-messages .user {
    justify-content: flex-end; /* Alinea la burbuja del usuario a la derecha */
}
.chatbot-messages .bot {
    justify-content: flex-start; /* Alinea la burbuja del bot a la izquierda */
}

.chatbot-messages .message-bubble {
    padding: 8px 12px;
    border-radius: 18px;
    margin-bottom: 10px;
    max-width: 80%;
    word-wrap: break-word;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

.chatbot-messages .user .message-bubble {
    background-color: #dcf8c6; /* Un verde claro para el usuario */
    color: #333;
}
.chatbot-messages .bot .message-bubble {
    background-color: #f1f0f0; /* Un gris claro para el bot */
    color: #333;
}

/* Indicador de "escribiendo" (opcional) */
.typing-indicator {
    display: inline-block;
    background-color: #f1f0f0;
    border-radius: 18px;
    padding: 8px 12px;
    margin-bottom: 10px;
    font-style: italic;
    color: #777;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0% { opacity: 0.5; }
    50% { opacity: 1; }
    100% { opacity: 0.5; }
}