#sales-assistant { position: fixed; inset-inline-end: 1.5rem; bottom: 1.5rem; z-index: 1040; }
#sales-assistant [hidden] { display: none !important; }
#sales-assistant-launcher { display: flex; gap: .5rem; align-items: center; min-height: 3.25rem; }
#sales-assistant-panel { position: absolute; inset-inline-end: 0; bottom: 4rem; width: min(480px, calc(100vw - 3rem)); height: min(720px, calc(100dvh - 8rem)); display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--bs-border-color, #ddd); border-radius: 1.25rem; background: white; color: var(--bs-body-color, #333); box-shadow: 0 12px 48px #0002; }
#sales-assistant-panel.sales-assistant-expanded { width: min(760px, calc(100vw - 3rem)); height: min(850px, calc(100dvh - 8rem)); }
.sales-assistant-header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--bs-border-color, #eee); }
.sales-assistant-brand, .sales-assistant-toolbar { display: flex; align-items: center; gap: .65rem; }
.sales-assistant-avatar { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: .85rem; font-size: 1.5rem; color: var(--bs-primary, #c83a3e); background: rgba(var(--bs-primary-rgb, 255, 76, 81), .1); }
#sales-assistant-title { font-size: 1rem; margin: 0 0 .2rem; }
.sales-assistant-brand small { font-size: .75rem; }
.sales-assistant-toolbar button { font-size: 1.3rem; min-width: 2rem; }
#sales-assistant-messages { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 1.2rem; min-height: 5rem; scrollbar-width: thin; }
.sales-assistant-message { margin-bottom: 1.4rem; overflow-wrap: anywhere; font-size: .9rem; }
.sales-assistant-speaker { display: block; font-size: .73rem; font-weight: 600; opacity: .75; margin-bottom: .4rem; }
.sales-assistant-body p, .sales-assistant-details p { white-space: pre-wrap; margin: 0 0 .65rem; line-height: 1.65; }
.sales-assistant-body p:last-child, .sales-assistant-details p:last-child { margin-bottom: 0; }
.sales-assistant-message ul, .sales-assistant-message ol { padding-inline-start: 1.3rem; margin: .3rem 0 .65rem; line-height: 1.65; }
.sales-assistant-message li + li { margin-top: .3rem; }
.sales-assistant-message[data-role="user"] { width: fit-content; max-width: 90%; margin-inline-start: auto; padding: .7rem 1rem; border-radius: 1rem 1rem .3rem 1rem; background: rgba(var(--bs-primary-rgb, 255, 76, 81), .09); }
.sales-assistant-message[data-role="user"] .sales-assistant-speaker { text-align: end; }
.sales-assistant-details { margin-top: .8rem; font-size: .82rem; border: 1px solid var(--bs-border-color, #e5e5e5); border-radius: .65rem; }
.sales-assistant-details summary { cursor: pointer; padding: .6rem .75rem; font-weight: 500; }
.sales-assistant-details > div { padding: .25rem .75rem .75rem; }
.sales-assistant-message-tools { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: .6rem; }
.sales-assistant-message-tools a, .sales-assistant-message-tools button { font: inherit; font-size: .74rem; border: 0; border-radius: .25rem; background: transparent; padding: .15rem .2rem; color: var(--bs-link-color, #a22d31); text-decoration: underline; text-underline-offset: 3px; }
.sales-assistant-message-tools button { color: inherit; cursor: pointer; }
.sales-assistant-suggestions { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0 1rem; max-height: 6rem; overflow-y: auto; }
.sales-assistant-suggestions button { text-align: start; border-radius: 1rem; font-size: .73rem; padding: .35rem .65rem; }
#sales-assistant-status { min-height: 1.1rem; font-size: .72rem; margin: .4rem 1rem; }
#sales-assistant-form { margin: 0 .8rem .8rem; padding: .65rem; border: 1px solid var(--bs-border-color, #ddd); border-radius: .85rem; }
#sales-assistant-form:focus-within { border-color: var(--bs-primary, #ff4c51); }
#sales-assistant-input { resize: none; max-height: 140px; min-height: 3rem; overflow-x: hidden; overflow-y: auto; white-space: pre-wrap; overflow-wrap: anywhere; border: 0; box-shadow: none; background: transparent; font-size: .9rem; line-height: 1.5; padding: .2rem; }
#sales-assistant-input:focus { outline: none; }
.sales-assistant-actions { display: flex; align-items: center; gap: .4rem; margin-top: .4rem; }
.sales-assistant-actions small { font-size: .62rem; flex: 1; text-align: center; }
#sales-assistant-send, #sales-assistant-stop { margin-inline-start: auto; }
.sales-assistant-typing { display: flex; gap: .25rem; padding: .25rem 0 1rem; }
.sales-assistant-typing span { height: .4rem; width: .4rem; background: currentColor; opacity: .4; border-radius: 50%; animation: sales-assistant-pulse 1.2s infinite; }
.sales-assistant-typing span:nth-child(2) { animation-delay: .15s; }
.sales-assistant-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes sales-assistant-pulse { 50% { opacity: .85; transform: translateY(-3px); } }
@media (prefers-reduced-motion: reduce) { .sales-assistant-typing span { animation: none; } }
@media (max-width: 575px) {
  #sales-assistant { inset-inline-end: .75rem; bottom: .75rem; }
  #sales-assistant-panel, #sales-assistant-panel.sales-assistant-expanded { width: calc(100vw - 1.5rem); height: min(720px, calc(100dvh - 6rem)); }
  .sales-assistant-header { padding: .8rem; }
  .sales-assistant-actions small { display: none; }
}
