/* Botón flotante para abrir el chat */
#ce-open-chat {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background-color: #0073aa; /* Azul corporativo WP */
    color: white;
    border: none;
    padding: 15px 25px;
    border-radius: 50px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    font-weight: bold;
    z-index: 9999;
    transition: transform 0.3s ease;
}

#ce-open-chat:hover {
    transform: scale(1.05);
    background-color: #005177;
}

/* Contenedor del Modal */
#ce-modal {
    display: none; /* Se activa con JS */
    position: fixed;
    bottom: 90px;
    right: 20px;
    width: 350px;
    height: 500px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    flex-direction: column;
    overflow: hidden;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Encabezado del Chat */
.ce-chat-header {
    background: #0073aa;
    color: white;
    padding: 15px;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

#ce-close {
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

/* Área de mensajes */
#ce-chat-log {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: 358px;
}

/* Estilo de las burbujas de mensaje */
.ce-msg {
    max-width: 80%;
    padding: 10px 15px;
    border-radius: 15px;
    font-size: 14px;
    line-height: 1.4;
}

.ce-msg-user {
    align-self: flex-end;
    background-color: #0073aa;
    color: white;
    border-bottom-right-radius: 2px;
}

.ce-msg-ai {
    align-self: flex-start;
    background-color: #e9e9eb;
    color: #333;
    border-bottom-left-radius: 2px;
}

/* Área de entrada de texto */
.ce-chat-footer {
    padding: 15px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

#ce-input {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 8px 15px;
    outline: none;
}

#ce-send {
    background: #0073aa;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 20px;
    cursor: pointer;
}

#ce-send:hover {
    background: #005177;
}