/* Gordy AI Assistant by Gorman Web — chat bubble */
.gwai { --gwai-accent: #00D084; --gwai-ink: #111111; --gwai-paper: #ffffff; --gwai-soft: #F2F3F5; --gwai-line: #E4E6EA; --gwai-muted: #5F6670;
	position: fixed; right: max(20px, env(safe-area-inset-right, 0px)); bottom: max(20px, env(safe-area-inset-bottom, 0px)); z-index: 99990;
	font-family: inherit; font-size: 15px; line-height: 1.5; color: var(--gwai-ink); }
.gwai *, .gwai *::before, .gwai *::after { box-sizing: border-box; }
.gwai [hidden] { display: none !important; }
.gwai button { font: inherit; cursor: pointer; }

.gwai .gwai-launch { --gwai-icon-cut: var(--gwai-accent); height: 64px; min-width: 64px; padding: 0 26px 0 20px; border-radius: 999px; border: 3px solid #fff;
	display: flex; align-items: center; justify-content: center; gap: 10px; margin-left: auto; white-space: nowrap;
	background: var(--gwai-accent); color: var(--gwai-ink); font-size: 17px; font-weight: 800; line-height: 1; letter-spacing: -0.01em;
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.32), 0 2px 6px rgba(0, 0, 0, 0.18); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.gwai .gwai-launch svg { width: 28px; height: 28px; flex: none; }
.gwai .gwai-launch:hover { transform: translateY(-2px); box-shadow: 0 16px 38px rgba(0, 0, 0, 0.36), 0 3px 8px rgba(0, 0, 0, 0.2); }
.gwai.is-open .gwai-launch { width: 64px; padding: 0; }
.gwai-launch:focus-visible, .gwai-chip:focus-visible, .gwai-close:focus-visible, .gwai-send:focus-visible, .gwai-hint button:focus-visible { outline: 3px solid var(--gwai-accent); outline-offset: 2px; }

.gwai-hint { position: absolute; right: 0; bottom: 80px; display: flex; align-items: flex-start; gap: 4px; width: max-content; max-width: 260px;
	background: var(--gwai-paper); border: 1px solid var(--gwai-line); border-radius: 14px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16); padding: 10px 6px 10px 14px; }
.gwai-hint-text { border: 0; background: none; padding: 0; text-align: left; color: var(--gwai-ink); font-weight: 600; font-size: 14px; }
.gwai-hint-close { border: 0; background: none; padding: 0 4px; color: var(--gwai-muted); line-height: 0; }
.gwai-hint-close svg { width: 16px; height: 16px; }

.gwai-panel { position: absolute; right: 0; bottom: 80px; width: 384px; height: min(600px, calc(100vh - 120px)); display: flex; flex-direction: column;
	background: var(--gwai-paper); border-radius: 18px; overflow: hidden; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.28); border: 1px solid var(--gwai-line); }
.gwai-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--gwai-ink); color: #fff; }
.gwai-avatar { width: 40px; height: 40px; border-radius: 50%; background: rgba(255, 255, 255, 0.08); color: var(--gwai-accent); display: flex; align-items: center; justify-content: center; flex: none; }
.gwai-avatar svg { width: 24px; height: 24px; }
.gwai-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.gwai-title strong { font-size: 16px; line-height: 1.2; }
.gwai-title small { font-size: 12.5px; color: #C9CDD3; margin-top: 2px; }
.gwai-close { border: 0; background: none; color: #fff; padding: 6px; border-radius: 8px; line-height: 0; }
.gwai-close:hover { background: rgba(255, 255, 255, 0.1); }

.gwai-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
.gwai-msg { max-width: 86%; padding: 10px 14px; border-radius: 16px; word-wrap: break-word; overflow-wrap: anywhere; }
.gwai-assistant { align-self: flex-start; background: var(--gwai-soft); border-bottom-left-radius: 5px; }
.gwai-user { align-self: flex-end; background: var(--gwai-accent); color: var(--gwai-ink); border-bottom-right-radius: 5px; }
.gwai-msg a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.gwai-assistant a { color: #0B6E4A; }
.gwai-li { display: block; padding-left: 14px; position: relative; }
.gwai-li::before { content: ""; position: absolute; left: 2px; top: 0.62em; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.gwai-typing { display: flex; gap: 5px; padding: 14px 16px; }
.gwai-typing span { width: 7px; height: 7px; border-radius: 50%; background: #9AA0A8; animation: gwai-dot 1s infinite ease-in-out; }
.gwai-typing span:nth-child(2) { animation-delay: 0.15s; } .gwai-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes gwai-dot { 0%, 80%, 100% { opacity: 0.35; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

.gwai-chips { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 16px 12px; }
.gwai-chip { border: 1.5px solid var(--gwai-ink); background: var(--gwai-paper); color: var(--gwai-ink); border-radius: 999px; padding: 6px 12px; font-size: 13.5px; font-weight: 600; text-align: left; }
.gwai-chip:hover { background: var(--gwai-ink); color: #fff; }

.gwai-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--gwai-line); }
.gwai-form textarea { flex: 1; resize: none; border: 1px solid var(--gwai-line); border-radius: 12px; padding: 10px 12px; font: inherit; font-size: 15px; line-height: 1.4; max-height: 120px; color: var(--gwai-ink); background: #fff; }
.gwai-form textarea:focus { outline: 2px solid var(--gwai-accent); outline-offset: 0; border-color: transparent; }
.gwai-send { width: 42px; height: 42px; flex: none; border: 0; border-radius: 12px; background: var(--gwai-ink); color: var(--gwai-accent); display: flex; align-items: center; justify-content: center; }
.gwai-foot { padding: 8px 14px 12px; font-size: 11.5px; line-height: 1.45; color: var(--gwai-muted); text-align: center; }
.gwai-foot a { color: #0B6E4A; font-weight: 700; text-decoration: none; }
.gwai-foot a:hover { text-decoration: underline; }
.gwai-foot span { display: block; margin-top: 2px; }
.gwai-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 600px) {
	.gwai { right: 14px; bottom: 14px; }
	.gwai .gwai-launch { height: 56px; min-width: 56px; padding: 0 20px 0 16px; font-size: 16px; gap: 8px; }
	.gwai .gwai-launch svg { width: 24px; height: 24px; }
	.gwai-hint, .gwai-panel { bottom: 70px; }
	.gwai.is-open { inset: 0; right: 0; bottom: 0; }
	.gwai.is-open .gwai-panel { position: fixed; inset: 0; width: auto; height: 100%; border-radius: 0; border: 0; }
	.gwai.is-open .gwai-launch { display: none; }
	.gwai-head { padding-top: max(14px, env(safe-area-inset-top, 0px)); }
	.gwai-foot { padding-bottom: max(12px, env(safe-area-inset-bottom, 0px)); }
	.gwai-form textarea { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
	.gwai-launch, .gwai-typing span { transition: none; animation: none; }
}
@media print { .gwai { display: none !important; } }
