.wsa-root { --wsa-accent: #1e66f5; position: fixed; right: 20px; bottom: 20px; z-index: 99999; font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; color: #1f2328; }
.wsa-root *, .wsa-root *::before, .wsa-root *::after { box-sizing: border-box; }
.wsa-root [hidden] { display: none !important; }

.wsa-launcher { width: 60px; height: 60px; border-radius: 50%; border: 0; background: var(--wsa-accent); color: #fff; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.25); display: grid; place-items: center; transition: transform .15s; }
.wsa-launcher:hover { transform: scale(1.06); }

.wsa-panel { width: 370px; max-width: calc(100vw - 24px); height: 560px; max-height: calc(100vh - 40px); background: #fff; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,.25); display: flex; flex-direction: column; overflow: hidden; }
.wsa-head { background: var(--wsa-accent); color: #fff; padding: 12px 14px; display: flex; align-items: center; gap: 6px; }
.wsa-title { flex: 1; font-weight: 600; }
.wsa-title small { font-weight: 400; opacity: .85; }
.wsa-head button { background: transparent; border: 0; color: #fff; font-size: 22px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.wsa-head button:hover { background: rgba(255,255,255,.18); }

.wsa-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: #f6f7f9; }
.wsa-msg { max-width: 85%; padding: 9px 12px; border-radius: 14px; word-wrap: break-word; }
.wsa-msg p { margin: 0 0 6px; } .wsa-msg p:last-child { margin: 0; }
.wsa-msg ul { margin: 4px 0; padding-left: 18px; } .wsa-msg li { margin: 2px 0; }
.wsa-bot { background: #fff; align-self: flex-start; border: 1px solid #e3e6ea; border-bottom-left-radius: 4px; }
.wsa-bot a { color: var(--wsa-accent); font-weight: 600; text-decoration: underline; }
.wsa-user { background: var(--wsa-accent); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; white-space: pre-wrap; }

.wsa-typing { display: flex; gap: 4px; padding: 12px 14px; }
.wsa-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9aa3ad; animation: wsa-dot 1.2s infinite ease-in-out; }
.wsa-typing span:nth-child(2) { animation-delay: .15s; } .wsa-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes wsa-dot { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.wsa-actions { display: flex; gap: 8px; padding: 8px 12px; border-top: 1px solid #e3e6ea; background: #fff; }
.wsa-btn { flex: 1; text-align: center; padding: 8px; border-radius: 8px; border: 1px solid var(--wsa-accent); color: var(--wsa-accent); text-decoration: none; font-weight: 600; font-size: 14px; }
.wsa-btn.wsa-primary { background: var(--wsa-accent); color: #fff; }

.wsa-form { display: flex; gap: 8px; padding: 10px 12px; border-top: 1px solid #e3e6ea; background: #fff; }
.wsa-form textarea { flex: 1; resize: none; border: 1px solid #cfd4da; border-radius: 10px; padding: 8px 10px; font: inherit; max-height: 120px; }
.wsa-form textarea:focus { outline: 2px solid var(--wsa-accent); outline-offset: -1px; border-color: transparent; }
.wsa-form button { border: 0; background: var(--wsa-accent); color: #fff; border-radius: 10px; width: 42px; cursor: pointer; font-size: 16px; }
.wsa-form button:disabled { opacity: .5; cursor: wait; }
.wsa-foot { margin: 0; padding: 0 12px 8px; font-size: 11px; color: #6b737c; text-align: center; background: #fff; }

@media (max-width: 480px) {
	.wsa-root { right: 12px; bottom: 12px; }
	.wsa-panel { width: calc(100vw - 24px); height: calc(100vh - 24px); }
}
