/* Contenedor principal del Widget */
#haja-chat-widget {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Botón Flotante */
.haja-float-button {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #000000;
    color: #ffffff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

.haja-float-button:hover {
    transform: scale(1.05);
    background-color: #1a1a1a;
}

.haja-float-button svg {
    width: 30px;
    height: 30px;
    fill: #f5b000;
}

/* Ventana del Chat */
.haja-chat-container {
    display: none;
    position: absolute;
    bottom: 75px;
    left: 0;
    width: 340px;
    height: 450px;
    background-color: #ffffff;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid #e5e5e5;
}

/* Estado Activo */
.haja-chat-container.active {
    display: flex !important;
    flex-direction: column;
}

/* Encabezado del Chat */
.haja-chat-header {
    background-color: #000000;
    color: #ffffff;
    padding: 14px 16px;
    font-weight: 600;
    font-size: 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.haja-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.haja-whatsapp-button {
    color: #ffffff;
    text-decoration: none;
    font-size: 16px;
}

.haja-close-chat {
    background: none;
    border: none;
    color: #ffffff;
    font-size: 20px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

/* Área de Mensajes */
.haja-chat-messages {
    flex: 1;
    padding: 15px;
    overflow-y: auto;
    background-color: #f9f9f9;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.message {
    max-width: 80%;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.4;
    word-break: break-word;
}

.message.bot {
    align-self: flex-start;
    background-color: #ffffff;
    color: #333333;
    border: 1px solid #e2e2e2;
    border-top-left-radius: 2px;
}

.message.user {
    align-self: flex-end;
    background-color: #000000;
    color: #ffffff;
    border-top-right-radius: 2px;
}

.message a {
    color: #f5b000;
    text-decoration: underline;
    font-weight: 600;
}

/* Área de Entrada de Texto */
.haja-chat-input {
    display: flex;
    padding: 10px;
    background-color: #ffffff;
    border-top: 1px solid #eee;
    align-items: center;
}

.haja-input-field {
    flex: 1;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 13px;
    resize: none;
    outline: none;
    font-family: inherit;
}

.haja-input-field:focus {
    border-color: #000000;
}

.haja-send-button {
    background-color: #000000;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    margin-left: 8px;
    cursor: pointer;
    font-size: 14px;
}

.haja-send-button:hover {
    background-color: #222222;
}