/* Oryzenx — AI assistant widget */
.chat-greet { position: relative; max-width: 220px; background: var(--surface); border: 1px solid var(--border); border-radius: 14px 14px 4px 14px; padding: .6rem 1.8rem .6rem .75rem; box-shadow: var(--shadow); font-size: .82rem; display: grid; gap: .1rem; animation: sheetIn var(--t) var(--ease); }
.chat-greet span { color: var(--text-muted); }
.chat-greet-x { position: absolute; top: 4px; right: 4px; border: 0; background: none; color: var(--text-muted); width: 22px; height: 22px; border-radius: 6px; font-size: .75rem; }

.chat-panel {
  position: fixed; z-index: 760; right: 0; left: 0; bottom: 0; height: min(78vh, 600px); background: var(--surface);
  border-radius: 18px 18px 0 0; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; overflow: hidden;
  animation: sheetIn var(--t) var(--ease); border: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom);
}
.chat-panel.minimized { height: auto; }
.chat-panel.minimized .chat-body, .chat-panel.minimized .chat-quick, .chat-panel.minimized .chat-form { display: none; }
.chat-head { display: flex; align-items: center; gap: .55rem; padding: .6rem .6rem .6rem .8rem; border-bottom: 1px solid var(--border); }
.chat-avatar { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--primary), var(--accent)); flex: none; }
.chat-meta { display: grid; line-height: 1.25; flex: 1; min-width: 0; }
.chat-meta strong { font-size: .9rem; }
.chat-meta small { color: var(--text-muted); font-size: .72rem; display: flex; align-items: center; gap: .3rem; }
.online-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px color-mix(in srgb, var(--success) 25%, transparent); }
.chat-body { flex: 1; overflow-y: auto; padding: .8rem; display: flex; flex-direction: column; gap: .5rem; background: var(--surface-soft); overscroll-behavior: contain; }
.msg { display: flex; }
.msg .bubble { max-width: 84%; padding: .5rem .7rem; border-radius: 14px; font-size: .87rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; animation: msgIn var(--t-fast) var(--ease); }
.msg-bot .bubble { background: var(--surface); border: 1px solid var(--border); border-bottom-left-radius: 4px; }
.msg-user { justify-content: flex-end; }
.msg-user .bubble { background: var(--primary); color: #fff; border-bottom-right-radius: 4px; }
.msg .bubble a { color: inherit; text-decoration: underline; }
@keyframes msgIn { from { opacity: 0; transform: translateY(4px); } }
.typing { display: inline-flex; gap: 3px; padding: .2rem 0; }
.typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--text-muted); animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; } .typing i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .25; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-2px); } }
.chat-quick { display: flex; gap: .35rem; overflow-x: auto; padding: .5rem .7rem 0; scrollbar-width: none; }
.chat-quick::-webkit-scrollbar { display: none; }
.chat-quick .chip { height: 28px; font-size: .78rem; }
.chat-form { display: flex; gap: .4rem; padding: .55rem .6rem .65rem; }
.chat-form input { flex: 1; height: 38px; border-radius: 999px; border: 1px solid var(--border); padding: 0 .9rem; background: var(--surface-soft); font-size: 16px; outline: none; min-width: 0; }
.chat-form input:focus { border-color: var(--primary); }
.chat-form .icon-btn { border-radius: 50%; width: 38px; height: 38px; }
@media (min-width: 640px) {
  .chat-panel { left: auto; right: 20px; bottom: 20px; width: 370px; height: min(580px, calc(100vh - 110px)); border-radius: 18px; }
}
