/* Zylenta Assistant widget. Scoped under .zya; works on any theme. */
.zya { --zya-bg: #11131c; --zya-line: rgba(255,255,255,.1); --zya-text: #eceef5; --zya-muted: #a2a8bc; --zya-accent: #8b7bff; --zya-mint: #3ee0b0; position: fixed; right: 16px; bottom: 16px; z-index: 9999; font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--zya-text); }
.zya *, .zya *::before, .zya *::after { box-sizing: border-box; }
.zya-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.zya-launch { position: relative; display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 20px 0 16px; border: 0; border-radius: 999px; cursor: pointer; color: #0a0b10; font-weight: 600; font-size: 15px; background: linear-gradient(120deg, #b3a8ff, #8b7bff 45%, #3ee0b0); box-shadow: 0 14px 40px -12px rgba(139,123,255,.8), 0 0 0 1px rgba(255,255,255,.2) inset; transition: transform .2s, box-shadow .2s; }
.zya-launch:hover { transform: translateY(-2px); box-shadow: 0 18px 48px -12px rgba(139,123,255,.95); }
.zya-launch:focus-visible { outline: 2px solid var(--zya-mint); outline-offset: 3px; }
.zya-launch__icon { display: grid; place-items: center; }
.zya-launch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: 0 0 0 0 rgba(139,123,255,.5); animation: zya-ring 3s infinite; pointer-events: none; }
@keyframes zya-ring { 0%, 60% { box-shadow: 0 0 0 0 rgba(139,123,255,.45); } 100% { box-shadow: 0 0 0 16px rgba(139,123,255,0); } }
.zya.is-open .zya-launch { display: none; }

.zya-panel { position: absolute; right: 0; bottom: 0; display: flex; flex-direction: column; width: min(400px, calc(100vw - 32px)); height: min(620px, calc(100dvh - 32px)); background: var(--zya-bg); border: 1px solid var(--zya-line); border-radius: 22px; overflow: hidden; box-shadow: 0 40px 100px -30px rgba(0,0,0,.85); animation: zya-in .22s cubic-bezier(.2,.7,.1,1); }
.zya-panel[hidden] { display: none; }
@keyframes zya-in { from { opacity: 0; transform: translateY(10px) scale(.98); } }

.zya-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; border-bottom: 1px solid var(--zya-line); background: radial-gradient(120% 140% at 0% 0%, rgba(139,123,255,.22), transparent 60%); }
.zya-avatar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, #8b7bff, #3ee0b0); color: #0a0b10; font-weight: 700; flex: none; }
.zya-head__t { display: grid; flex: 1; line-height: 1.25; }
.zya-head__t strong { font-size: 15px; }
.zya-head__t small { color: var(--zya-muted); font-size: 12px; display: flex; align-items: center; gap: 6px; }
.zya-head__t small i { width: 7px; height: 7px; border-radius: 50%; background: var(--zya-mint); }
.zya-close { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--zya-muted); cursor: pointer; }
.zya-close:hover { background: rgba(255,255,255,.06); color: var(--zya-text); }

.zya-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; scrollbar-width: thin; }
.zya-msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 14.5px; line-height: 1.5; word-wrap: break-word; }
.zya-msg--bot { align-self: flex-start; background: rgba(255,255,255,.06); border: 1px solid var(--zya-line); border-bottom-left-radius: 6px; }
.zya-msg--user { align-self: flex-end; background: #ecebff; color: #0a0b10; border-bottom-right-radius: 6px; }
.zya-msg a { color: #c2b9ff; }
.zya-typing { display: inline-flex; gap: 4px; padding: 14px; }
.zya-typing span:not(.zya-sr) { width: 7px; height: 7px; border-radius: 50%; background: var(--zya-muted); animation: zya-dot 1.2s infinite; }
.zya-typing span:nth-child(2) { animation-delay: .15s; }
.zya-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes zya-dot { 0%, 60%, 100% { opacity: .3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.zya-actions { display: none; gap: 8px; padding: 0 16px 10px; }
.zya-actions.is-on { display: flex; }
.zya-act { flex: 1; display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 8px 12px; border-radius: 12px; border: 1px solid var(--zya-line); background: rgba(255,255,255,.05); color: var(--zya-text); font-size: 14px; font-weight: 600; text-decoration: none; }
.zya-act:hover { background: rgba(255,255,255,.1); color: #fff; }
.zya-act--wa { background: rgba(62,224,176,.14); border-color: rgba(62,224,176,.4); color: var(--zya-mint); }

.zya-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 10px; }
.zya-chips[hidden] { display: none; }
.zya-chip { padding: 7px 12px; border-radius: 999px; border: 1px solid rgba(139,123,255,.4); background: rgba(139,123,255,.1); color: #d5cfff; font-size: 13px; cursor: pointer; }
.zya-chip:hover { background: rgba(139,123,255,.2); }

.zya-form { display: flex; align-items: flex-end; gap: 8px; margin: 0 12px; padding: 8px; border: 1px solid var(--zya-line); border-radius: 16px; background: rgba(255,255,255,.04); }
.zya-form:focus-within { border-color: var(--zya-accent); box-shadow: 0 0 0 3px rgba(139,123,255,.2); }
.zya-input { flex: 1; min-height: 36px; max-height: 120px; padding: 8px; border: 0; background: transparent; color: var(--zya-text); font: inherit; font-size: 16px; line-height: 1.4; resize: none; outline: none; box-shadow: none; }
.zya-input::placeholder { color: var(--zya-muted); }
.zya-send { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border: 0; border-radius: 12px; background: #fff; color: #0a0b10; cursor: pointer; }
.zya-send:disabled { opacity: .5; cursor: progress; }
.zya-foot { margin: 8px 16px 12px; color: #6f7590; font-size: 11.5px; text-align: center; }
.zya-foot a { color: var(--zya-muted); }

@media (max-width: 520px) {
	.zya { right: 12px; bottom: 12px; }
	.zya-launch__label { display: none; }
	.zya-launch { width: 56px; padding: 0; justify-content: center; }
	.zya.is-open { inset: 0; }
	.zya-panel { position: fixed; inset: 0; width: 100%; height: 100dvh; border-radius: 0; border: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.zya-launch::after, .zya-panel, .zya-typing span { animation: none !important; }
}
