#bs-chat-widget { position: fixed; bottom: max(20px, env(safe-area-inset-bottom)); right: 20px; z-index: 60; font-family: 'Abhaya Libre', serif; }
#bs-chat-toggle { width: 60px; height: 60px; border-radius: 50%; background: #b91c1c; color: white; border: 1px solid #fef08a; font-size: 24px; cursor: pointer; box-shadow: 0 4px 18px #0005; transition: transform .2s; }
#bs-chat-toggle:hover { transform: scale(1.08); }
#bs-chat-box { position: absolute; bottom: 75px; right: 0; width: min(350px, calc(100vw - 32px)); height: min(480px, calc(100dvh - 115px)); display: flex; flex-direction: column; background: white; border-radius: 16px; box-shadow: 0 8px 28px #0004; overflow: hidden; border: 1px solid #e5e7eb; }
#bs-chat-box[hidden] { display: none; }
.bs-chat-header { background: linear-gradient(135deg, #7f1d1d, #b91c1c); color: white; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bs-header-info { display: flex; align-items: center; gap: 10px; }
.bs-header-info > i { font-size: 24px; color: #fef08a; }
.bs-header-info h4 { margin: 0; font-size: 16px; font-weight: 700; }
.bs-header-info span { font-size: 12px; opacity: .9; }
#bs-chat-close { background: none; border: none; color: white; font-size: 26px; min-width: 32px; cursor: pointer; }
.bs-chat-messages { flex: 1; min-height: 0; padding: 15px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 10px; background: #fffbe8; }
.bs-msg { max-width: 88%; padding: 10px 14px; border-radius: 12px; font-size: 16px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; flex-shrink: 0; }
.bs-msg.user { align-self: flex-end; background: #b91c1c; color: white; border-bottom-right-radius: 2px; }
.bs-msg.ai { align-self: flex-start; background: white; color: #1f2937; border: 1px solid #fef08a; border-bottom-left-radius: 2px; }
.bs-chat-note { margin: 0; padding: 5px 12px; font-size: 12px; color: #6b6152; background: #fffbe8; }
.bs-chat-input-area { padding: 10px; border-top: 1px solid #e5e7eb; display: flex; gap: 8px; }
.bs-chat-input-area input { flex: 1; min-width: 0; border: 1px solid #d1d5db; padding: 8px 12px; border-radius: 24px; font-size: 16px; color: #1f2937; background: white; }
.bs-chat-input-area button { background: #b91c1c; color: white; border: none; width: 44px; height: 44px; border-radius: 50%; cursor: pointer; flex-shrink: 0; }
.bs-chat-input-area button:disabled { opacity: .5; cursor: wait; }
#bs-chat-mic { background: #fffbe8; color: #991b1b; border: 1px solid #d1b77c; }
#bs-chat-mic[aria-pressed="true"] { background: #b91c1c; color: white; box-shadow: 0 0 0 3px #fef08a; }
#bs-voice-status { margin: 0; padding: 0 12px 8px; color: #7f1d1d; background: white; font-size: 14px; line-height: 1.4; }
#bs-voice-status:empty { display: none; }
#bs-chat-widget :focus-visible { outline: 3px solid #ca8a04; outline-offset: 2px; }
@media (max-width: 400px) { #bs-chat-widget { right: 16px; bottom: max(16px, env(safe-area-inset-bottom)); } }
@media (prefers-reduced-motion: reduce) { #bs-chat-toggle { transition: none; } }
