/* css/chat.css — compacto+minimize */
#fraqx-chat {
    position: fixed;
    right: 12px;
    bottom: 12px;
    z-index: 99999;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

#fraqx-toggle {
    padding: .55rem .85rem;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: #ffffff;
    box-shadow: 0 10px 26px rgba(0,0,0,.18);
}

#fraqx-panel {
    width: 300px; /* más pequeño */
    height: 360px; /* más bajo */
    display: none; /* controlado por clase .open */
    flex-direction: column;
    background: rgba(255,255,255,.98);
    border-radius: 12px;
    box-shadow: 0 14px 40px rgba(0,0,0,.22);
    padding: .6rem;
    margin-top: .5rem;
}

    #fraqx-panel.open {
        display: flex;
    }

.fx-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .4rem;
    background: #2aa545;
    color: #fff; /* verde FRAQX si gustas */
    padding: .45rem .6rem;
    border-radius: 8px;
}

#fraqx-title {
    font-weight: 700;
    font-size: .95rem;
}

.fx-actions {
    display: flex;
    gap: .25rem;
}

.fx-btn {
    border: none;
    background: rgba(255,255,255,.2);
    color: #fff;
    cursor: pointer;
    width: 28px;
    height: 24px;
    border-radius: 6px;
    font-size: .9rem;
    line-height: 24px;
}

#fraqx-messages {
    flex: 1;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding-top: .4rem;
}

.msg {
    white-space: pre-wrap;
    line-height: 1.35;
    padding: .42rem .55rem;
    border-radius: 10px;
    font-size: .9rem;
}

    .msg.user {
        align-self: flex-end;
        background: rgba(0,0,0,.06);
    }

    .msg.ai {
        align-self: flex-start;
        background: rgba(0, 99, 255, .10);
    }

#fraqx-form {
    display: flex;
    align-items: center; /* alinea verticalmente */
    gap: 4px; /* espacio entre input, select, botón */
    margin: 4px 0;
}

#fraqx-input {
    flex: 1; /* ocupa todo el espacio disponible */
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

#fraqx-lang {
    flex: 0 0 60px; /* ancho fijo para el selector de idioma */
    padding: 6px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

#fraqx-form button[type="submit"] {
    flex: 0 0 auto; /* evita que el botón se estire */
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    background: #28a745; /* verde FRAQX */
    color: #fff;
    cursor: pointer;
}

    #fraqx-form button[type="submit"]:hover {
        background: #218838;
    }

/* ultra compacto en móvil */
@media (max-width: 520px) {
    #fraqx-panel {
        width: 88vw;
        height: 50vh;
    }
}
