/*
 * BoxIA — estilos del widget de chat (assets/js/comun/boxia-widget.js).
 * Usa los tokens --box-* de BoxUI con respaldo. Sin !important.
 * Documentación: DOC/BOXIA_DOC.md
 */
.boxia-fab { position: fixed; right: 1rem; bottom: 1rem; z-index: 1040; width: 3.5rem; height: 3.5rem; border: 0; border-radius: 50%;
    background: var(--box-brand, #2563eb); color: #fff; font-size: 1.4rem; cursor: pointer; box-shadow: 0 4px 14px rgba(0,0,0,.28); }
.boxia-fab.boxia-oculto { display: none; }
.boxia-panel { position: fixed; right: 1rem; bottom: 1rem; z-index: 1041; display: flex; flex-direction: column; width: 22rem; max-width: calc(100vw - 2rem);
    height: 32rem; max-height: calc(100vh - 2rem); background: var(--box-surface, #fff); color: var(--box-text, #1f2937);
    border: 1px solid var(--box-border, #e5e7eb); border-radius: 14px; box-shadow: 0 10px 34px rgba(0,0,0,.3); overflow: hidden; }
.boxia-panel[hidden] { display: none; }
.boxia-head { display: flex; align-items: center; gap: .6rem; padding: .7rem .9rem; background: var(--box-brand, #2563eb); color: #fff; }
.boxia-avatar { display: inline-flex; align-items: center; justify-content: center; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: rgba(255,255,255,.22); }
.boxia-head-info { flex: 1; display: flex; flex-direction: column; line-height: 1.2; }
.boxia-estado::before { content: ""; display: inline-block; width: .5rem; height: .5rem; margin-right: .35rem; border-radius: 50%; background: #4ade80; }
.boxia-close { border: 0; background: transparent; color: inherit; font-size: 1.1rem; cursor: pointer; }
.boxia-body { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .5rem; background: var(--box-bg, #f3f4f6); }
.boxia-msg { max-width: 85%; padding: .5rem .75rem; border-radius: 12px; font-size: .92rem; line-height: 1.35; overflow-wrap: anywhere; }
.boxia-bot { align-self: flex-start; background: var(--box-surface, #fff); border: 1px solid var(--box-border, #e5e7eb); border-top-left-radius: 3px; }
.boxia-user { align-self: flex-end; background: var(--box-brand, #2563eb); color: #fff; border-top-right-radius: 3px; }
.boxia-typing { display: inline-flex; gap: .25rem; }
.boxia-typing span { width: .45rem; height: .45rem; border-radius: 50%; background: #9ca3af; animation: boxia-punto 1s infinite ease-in-out; }
.boxia-typing span:nth-child(2) { animation-delay: .15s; }
.boxia-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes boxia-punto { 0%, 80%, 100% { opacity: .3; } 40% { opacity: 1; } }
.boxia-cards { display: flex; flex-direction: column; gap: .4rem; align-self: stretch; }
.boxia-card { display: flex; gap: .6rem; padding: .45rem; text-decoration: none; color: inherit; background: var(--box-surface, #fff);
    border: 1px solid var(--box-border, #e5e7eb); border-radius: 10px; }
.boxia-card:hover { border-color: var(--box-brand, #2563eb); }
.boxia-card-img { flex: none; width: 4.2rem; height: 4.2rem; object-fit: cover; border-radius: 8px; background: #e5e7eb; }
.boxia-card-info { display: flex; flex-direction: column; min-width: 0; gap: .1rem; }
.boxia-card-name { font-weight: 600; font-size: .88rem; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.boxia-card-price { font-weight: 700; color: var(--box-brand, #2563eb); font-size: .9rem; }
.boxia-card-price s { margin-left: .4rem; font-weight: 400; color: #9ca3af; font-size: .78rem; }
.boxia-card-store { color: #6b7280; }
.boxia-ok { color: #15803d; }
.boxia-out { color: #b91c1c; }
.boxia-card-ver { font-size: .78rem; color: var(--box-brand, #2563eb); }
.boxia-wa { align-self: flex-start; padding: .45rem .8rem; border-radius: 999px; background: #25d366; color: #fff; font-size: .85rem; text-decoration: none; }
.boxia-form { display: flex; gap: .4rem; padding: .6rem; border-top: 1px solid var(--box-border, #e5e7eb); background: var(--box-surface, #fff); }
.boxia-input { flex: 1; min-width: 0; margin: 0; padding: .5rem .8rem; border: 1px solid var(--box-border, #d1d5db); border-radius: 999px; font-size: .92rem; }
.boxia-send { width: 2.5rem; height: 2.5rem; border: 0; border-radius: 50%; background: var(--box-brand, #2563eb); color: #fff; cursor: pointer; }
@media (max-width: 480px) {
    .boxia-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
}
