/* Grafix Assistant chat widget */
#ga-launcher, #ga-panel { --ga-brand: #1f2a44; --ga-accent: #4054b2; --ga-bg: #ffffff; --ga-soft: #f1f3f8; --ga-text: #1d1d1f; --ga-muted: #5f6470; font-family: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }

#ga-launcher { position: fixed; right: 20px; bottom: 20px; z-index: 99990; width: 58px; height: 58px; border: 0; border-radius: 50%; background: var(--ga-accent); color: #fff; cursor: pointer; box-shadow: 0 6px 20px rgba(0,0,0,.25); display: flex; align-items: center; justify-content: center; transition: transform .15s ease; }
#ga-launcher:hover { transform: scale(1.06); }
#ga-launcher:focus-visible { outline: 3px solid #ffb400; outline-offset: 3px; }
#ga-launcher.ga-hidden { display: none; }

#ga-panel { position: fixed; right: 20px; bottom: 20px; z-index: 99991; width: 370px; max-width: calc(100vw - 32px); height: 560px; max-height: calc(100vh - 40px); background: var(--ga-bg); color: var(--ga-text); border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.28); display: flex; flex-direction: column; overflow: hidden; font-size: 15px; line-height: 1.45; }
#ga-panel[hidden] { display: none; }

#ga-panel .ga-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; background: var(--ga-brand); color: #fff; }
#ga-panel .ga-head strong { display: block; font-size: 16px; }
#ga-panel .ga-head span { font-size: 12px; opacity: .8; }
#ga-panel .ga-head-btns { display: flex; gap: 6px; align-items: center; }
#ga-panel .ga-head button { background: transparent; color: #fff; border: 1px solid rgba(255,255,255,.35); border-radius: 6px; cursor: pointer; font-size: 12px; padding: 4px 8px; line-height: 1.2; }
#ga-panel .ga-head .ga-close { border: 0; font-size: 24px; padding: 0 4px; }

#ga-panel .ga-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--ga-soft); }
#ga-panel .ga-msg { max-width: 86%; padding: 9px 12px; border-radius: 12px; word-wrap: break-word; overflow-wrap: anywhere; }
#ga-panel .ga-bot { align-self: flex-start; background: #fff; border: 1px solid #e2e5ec; border-bottom-left-radius: 4px; }
#ga-panel .ga-user { align-self: flex-end; background: var(--ga-accent); color: #fff; border-bottom-right-radius: 4px; }
#ga-panel .ga-msg a { color: var(--ga-accent); text-decoration: underline; }
#ga-panel .ga-user a { color: #fff; }
#ga-panel .ga-msg ul { margin: 4px 0 4px 18px; padding: 0; }
#ga-panel .ga-typing { color: var(--ga-muted); letter-spacing: 2px; }

#ga-panel .ga-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid #e2e5ec; background: #fff; }
#ga-panel textarea { flex: 1; resize: none; border: 1px solid #cfd3dc; border-radius: 8px; padding: 9px 10px; font: inherit; color: var(--ga-text); background: #fff; min-height: 40px; max-height: 120px; }
#ga-panel textarea:focus { outline: 2px solid var(--ga-accent); outline-offset: 0; border-color: transparent; }
#ga-panel .ga-send { border: 0; border-radius: 8px; background: var(--ga-accent); color: #fff; padding: 0 14px; cursor: pointer; font-weight: 600; }
#ga-panel .ga-send:disabled { opacity: .55; cursor: default; }
#ga-panel .ga-note { font-size: 11px; color: var(--ga-muted); padding: 0 12px 10px; background: #fff; }
#ga-panel .ga-note a { color: var(--ga-muted); }
#ga-panel .ga-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

@media (max-width: 480px) {
	#ga-launcher { right: 16px; bottom: 16px; }
	#ga-panel { right: 0; bottom: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; border-radius: 0; }
}
