/* Khung chat trợ lý Làng Bè trên trang menu */
.lbc-fab { position: fixed; right: 12px; bottom: calc(76px + env(safe-area-inset-bottom)); z-index: 32; display: flex; align-items: center; gap: 8px; height: 48px; padding: 0 16px 0 14px; border-radius: 24px; background: var(--green-d, #1f4237); color: #fff; font: 700 14px/1 "Be Vietnam Pro", system-ui, sans-serif; box-shadow: 0 4px 16px rgba(0,0,0,.28); border: 0; cursor: pointer; }
.lbc-fab svg { width: 22px; height: 22px; flex: none; }
body:has(.cartbar.on) .lbc-fab { bottom: calc(140px + env(safe-area-inset-bottom)); }
.lbc-fab[hidden] { display: none; }

.lbc { position: fixed; z-index: 60; inset: 0; display: none; flex-direction: column; background: var(--bg, #fbf8f3); font-family: "Be Vietnam Pro", system-ui, sans-serif; color: var(--ink, #1c1b19); }
.lbc.on { display: flex; }
.lbc-head { flex: none; display: flex; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px 10px 16px; background: var(--green-d, #1f4237); color: #fff; }
.lbc-head b { display: block; font-size: 16px; line-height: 1.2; }
.lbc-head small { display: block; font-size: 12px; color: #cfe3d8; margin-top: 1px; }
.lbc-head > div { flex: 1; min-width: 0; }
.lbc-x { flex: none; width: 40px; height: 40px; border-radius: 20px; background: rgba(255,255,255,.14); color: #fff; font-size: 22px; line-height: 1; border: 0; cursor: pointer; }

.lbc-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 14px 12px; display: flex; flex-direction: column; gap: 6px; -webkit-overflow-scrolling: touch; }
.lbc-m { max-width: 86%; padding: 9px 13px; border-radius: 18px; font-size: 15px; line-height: 1.4; white-space: pre-wrap; overflow-wrap: anywhere; }
.lbc-m.bot { align-self: flex-start; background: #fff; border: 1px solid var(--line, #ebe4d8); border-bottom-left-radius: 6px; }
.lbc-m.me { align-self: flex-end; background: var(--green, #2e5e4e); color: #fff; border-bottom-right-radius: 6px; }
.lbc-m a { color: var(--coral, #e4592f); font-weight: 700; }
.lbc-m.me a { color: #fff; }
.lbc-m.err { background: var(--peach, #fbe1d6); border-color: transparent; }
.lbc-act { align-self: flex-start; display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 4px; }
.lbc-act a { display: inline-flex; align-items: center; height: 38px; padding: 0 16px; border-radius: 19px; background: var(--coral, #e4592f); color: #fff; font: 700 14px/1 "Be Vietnam Pro", system-ui, sans-serif; text-decoration: none; }
.lbc-act a + a { background: var(--green, #2e5e4e); }
.lbc-m { white-space: pre-line; }
.lbc-quick { align-self: flex-start; display: flex; flex-wrap: wrap; gap: 8px; margin: 2px 0 6px; }
.lbc-quick button { height: 36px; padding: 0 14px; border-radius: 18px; background: var(--mint, #dfece4); color: var(--green-d, #1f4237); font: 600 13.5px/1 "Be Vietnam Pro", system-ui, sans-serif; border: 1px solid transparent; cursor: pointer; }
.lbc-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: #fff; border: 1px solid var(--line, #ebe4d8); border-radius: 18px; border-bottom-left-radius: 6px; }
.lbc-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--gray, #7d776e); animation: lbc-b 1s infinite; }
.lbc-typing i:nth-child(2) { animation-delay: .15s; }
.lbc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes lbc-b { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .lbc-typing i { animation: none; opacity: .7; } }

.lbc-chips { flex: none; display: flex; gap: 8px; overflow-x: auto; padding: 4px 12px 8px; scrollbar-width: none; }
.lbc-chips::-webkit-scrollbar { display: none; }
.lbc-chips button { flex: none; height: 36px; padding: 0 14px; border-radius: 18px; background: var(--mint, #dfece4); color: var(--green-d, #1f4237); font: 600 13.5px/1 "Be Vietnam Pro", system-ui, sans-serif; border: 0; cursor: pointer; white-space: nowrap; }

.lbc-form { flex: none; display: flex; align-items: flex-end; gap: 8px; padding: 8px 12px calc(10px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line, #ebe4d8); background: var(--bg, #fbf8f3); }
.lbc-form textarea { flex: 1; min-width: 0; max-height: 110px; min-height: 44px; resize: none; padding: 11px 14px; border-radius: 22px; border: 1px solid var(--line, #ebe4d8); background: #fff; font: 16px/1.3 "Be Vietnam Pro", system-ui, sans-serif; color: inherit; }
.lbc-form button { flex: none; width: 44px; height: 44px; border-radius: 22px; background: var(--coral, #e4592f); color: #fff; border: 0; cursor: pointer; display: flex; align-items: center; justify-content: center; }
.lbc-form button svg { width: 20px; height: 20px; }
.lbc-form button:disabled { opacity: .5; cursor: default; }
.lbc-note { flex: none; text-align: center; font-size: 11.5px; color: var(--gray, #7d776e); padding: 0 12px calc(6px + env(safe-area-inset-bottom)); margin-top: -4px; }

@media (min-width: 700px) {
  .lbc { inset: auto 20px 20px auto; width: 390px; height: min(640px, calc(100vh - 40px)); border-radius: 20px; overflow: hidden; box-shadow: 0 12px 40px rgba(0,0,0,.3); border: 1px solid var(--line, #ebe4d8); }
  .lbc-fab { bottom: 84px; right: 20px; }
}
