.wpga-chat-widget {
    font-family: Arial, sans-serif;
    width: 350px;
    max-width: 100%;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background-color: #fff;
    margin: 20px auto; /* Para centrar si está solo en la página */
}

.wpga-chat-header {
    background-color: #f1f1f1; /* Un color de cabecera suave */
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    display: flex;
    align-items: center;
}

.wpga-chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 10px;
    object-fit: cover;
}

.wpga-chat-name {
    font-weight: bold;
    font-size: 1.1em;
}

.wpga-chat-messages-container {
    flex-grow: 1;
    padding: 15px;
    overflow-y: auto;
    height: 300px; /* Altura fija, puedes ajustarla */
    display: flex;
    flex-direction: column;
}

.wpga-message {
    margin-bottom: 10px;
    padding: 8px 12px;
    border-radius: 18px;
    max-width: 80%;
    word-wrap: break-word;
}

.wpga-message.user {
    background-color: #007bff; /* Azul para el usuario */
    color: white;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
}

.wpga-message.model {
    background-color: #e9e9eb; /* Gris claro para el modelo */
    color: #333;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
}

.wpga-message-content {
    font-size: 0.95em;
    line-height: 1.4;
}

.wpga-message-meta {
    font-size: 0.75em;
    color: #888;
    margin-top: 3px;
    text-align: right;
}
.wpga-message.model .wpga-message-meta {
    text-align: left;
}


.wpga-chat-input-area {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ddd;
    background-color: #f9f9f9;
}

.wpga-chat-input-area textarea {
    flex-grow: 1;
    border: 1px solid #ccc;
    border-radius: 20px;
    padding: 10px 15px;
    resize: none; /* Evita que el usuario redimensione */
    min-height: 20px; /* Altura mínima antes de que crezca */
    max-height: 100px; /* Altura máxima para evitar que sea demasiado grande */
    overflow-y: auto;
    font-size: 1em;
    line-height: 1.4;
    margin-right: 8px;
}

.wpga-chat-input-area textarea:focus {
    outline: none;
    border-color: #007bff;
}

.wpga-chat-send-btn {
    background-color: #007bff;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.2s;
}

.wpga-chat-send-btn:hover {
    background-color: #0056b3;
}
.wpga-chat-send-btn:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.wpga-chat-typing-indicator {
    padding: 5px 15px;
    font-style: italic;
    color: #777;
    font-size: 0.9em;
}