/* Asistente de la web de BOGI (botón flotante + ventana de chat). Usa las variables de style.css. */
.bc-launch { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer; font: 600 15px/1 system-ui, sans-serif; color: #fff; background: var(--orange); padding: 0 20px 0 16px; height: 56px; border-radius: 999px; box-shadow: 0 12px 32px rgba(255, 64, 0, .4); transition: transform .15s, background .15s, opacity .15s; }
.bc-launch:hover { background: var(--orange-d); transform: translateY(-2px); }
.bc-launch svg { width: 24px; height: 24px; flex: none; }
.bc-launch[aria-expanded="true"] { opacity: 0; pointer-events: none; }

.bc-win { position: fixed; right: 20px; bottom: 20px; z-index: 61; width: min(392px, calc(100vw - 24px)); height: min(600px, calc(100dvh - 40px)); display: flex; flex-direction: column; background: #fff; color: var(--text); border-radius: 20px; overflow: hidden; box-shadow: 0 24px 70px rgba(0, 0, 0, .35); border: 1px solid var(--line); animation: bc-in .18s ease-out; }
@keyframes bc-in { from { opacity: 0; transform: translateY(12px) scale(.98); } to { opacity: 1; transform: none; } }
.bc-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--ink); color: #fff; }
.bc-head img { height: 22px; width: auto; border-radius: 3px; }
.bc-head .t { flex: 1; min-width: 0; line-height: 1.2; }
.bc-head b { display: block; font-size: 15px; }
.bc-head small { font-size: 12.5px; opacity: .75; }
.bc-x { border: 0; background: transparent; color: #fff; width: 38px; height: 38px; border-radius: 50%; cursor: pointer; font-size: 22px; line-height: 1; }
.bc-x:hover { background: rgba(255, 255, 255, .14); }

.bc-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--alt); overscroll-behavior: contain; }
.bc-m { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 15.5px; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.bc-m a { color: inherit; text-decoration: underline; }
.bc-m.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.bc-m.me { align-self: flex-end; background: var(--orange); color: #fff; border-bottom-right-radius: 5px; }
.bc-m.err { align-self: flex-start; background: #fff4f0; border: 1px solid #ffc9b8; color: #8a2500; border-bottom-left-radius: 5px; }
.bc-m.ok { align-self: center; max-width: 100%; background: #e9f7ee; border: 1px solid #b9e3c6; color: #1e6b3a; font-size: 14px; text-align: center; border-radius: 12px; }
.bc-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 13px 16px; background: #fff; border: 1px solid var(--line); border-radius: 16px; border-bottom-left-radius: 5px; }
.bc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); opacity: .5; animation: bc-dot 1s infinite; }
.bc-typing i:nth-child(2) { animation-delay: .15s; }
.bc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes bc-dot { 0%, 60%, 100% { transform: none; opacity: .35; } 30% { transform: translateY(-4px); opacity: .9; } }

.bc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.bc-chip { border: 1px solid var(--orange); color: var(--orange-d); background: #fff; border-radius: 999px; padding: 8px 14px; font: 600 14px/1.2 system-ui, sans-serif; cursor: pointer; }
.bc-chip:hover { background: var(--orange); color: #fff; }

.bc-form { display: flex; gap: 8px; padding: 12px; background: #fff; border-top: 1px solid var(--line); align-items: flex-end; }
.bc-in { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 14px; padding: 11px 13px; font: 16px/1.35 system-ui, sans-serif; max-height: 120px; min-height: 46px; background: #fff; color: var(--text); }
.bc-in:focus { outline: 2px solid var(--orange); outline-offset: 0; border-color: transparent; }
.bc-send { flex: none; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--orange); color: #fff; cursor: pointer; display: grid; place-items: center; }
.bc-send:disabled { opacity: .45; cursor: default; }
.bc-send svg { width: 20px; height: 20px; }
.bc-note { margin: 0; padding: 0 14px 10px; background: #fff; font-size: 12px; line-height: 1.35; color: var(--muted); }

@media (max-width: 520px) {
  .bc-launch { right: 14px; bottom: 14px; padding: 0 16px; }
  .bc-launch span { display: none; }
  .bc-win { right: 0; bottom: 0; width: 100vw; height: 100dvh; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) { .bc-win, .bc-typing i { animation: none; } .bc-launch { transition: none; } }
