/* GCIS Admissions: website chat assistant. Forest and gold, Inter. Scoped to #gcis-chat. */
#gcis-chat {
	--c-forest: #1e4a33;
	--c-forest-2: #2a5d42;
	--c-cream: #f4f1e6;
	--c-gold: #c9a24e;
	--c-ink: #16221a;
	--c-ink-2: #4c5a50;
	--c-line: #dfe4dc;
	--c-bg: #f3f5f1;
	--c-font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	position: fixed;
	right: 12px;
	bottom: 20px;
	z-index: 99990;
	font-family: var(--c-font);
	font-size: 15px;
	line-height: 1.45;
	color: var(--c-ink);
	-webkit-font-smoothing: antialiased;
	transition: transform .25s ease;
}
#gcis-chat.open { transform: none !important; }
#gcis-chat *, #gcis-chat *::before, #gcis-chat *::after { box-sizing: border-box; }
#gcis-chat button { font-family: inherit; letter-spacing: normal; text-transform: none; }

/* launcher: a round crest button; the label slides out on hover or keyboard focus */
#gcis-chat .gc-launch {
	position: relative; display: flex; align-items: center; justify-content: flex-end; gap: 0;
	height: 54px; min-width: 54px; padding: 0 !important;
	border: 0 !important; border-radius: 999px !important;
	background: var(--c-forest) !important; color: var(--c-cream) !important;
	box-shadow: 0 10px 28px rgba(15, 42, 29, .38);
	cursor: pointer; font-size: 14.5px; font-weight: 600; line-height: 1;
	transition: transform .2s ease, box-shadow .2s ease;
}
#gcis-chat .gc-launch img { order: 2; width: 54px; height: 54px; border-radius: 50%; background: #fff; padding: 6px; object-fit: contain; border: 3px solid var(--c-forest); }
#gcis-chat .gc-launch .gc-label { order: 1; max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .25s ease, opacity .2s ease, padding .25s ease; }
#gcis-chat .gc-launch:hover .gc-label, #gcis-chat .gc-launch:focus-visible .gc-label { max-width: 220px; opacity: 1; padding: 0 10px 0 18px; }
#gcis-chat .gc-launch .gc-dot { position: absolute; top: 2px; right: 2px; width: 12px; height: 12px; border-radius: 50%; background: #4cc274; border: 2px solid #fff; }
#gcis-chat .gc-launch:hover { box-shadow: 0 14px 34px rgba(15, 42, 29, .45); }
#gcis-chat .gc-launch:focus-visible, #gcis-chat button:focus-visible, #gcis-chat textarea:focus-visible, #gcis-chat a:focus-visible { outline: 3px solid var(--c-gold); outline-offset: 2px; }
#gcis-chat.open .gc-launch { display: none; }

/* panel */
#gcis-chat .gc-panel {
	display: none; flex-direction: column;
	width: 380px; height: min(620px, calc(100vh - 40px));
	background: var(--c-bg); border-radius: 16px; overflow: hidden;
	box-shadow: 0 24px 60px rgba(10, 30, 20, .35), 0 0 0 1px rgba(10, 30, 20, .06);
}
#gcis-chat.open .gc-panel { display: flex; animation: gcUp .22s ease-out; }
@keyframes gcUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { #gcis-chat, #gcis-chat.open .gc-panel { animation: none; transition: none; } #gcis-chat .gc-launch { transition: none; } }

#gcis-chat .gc-head { display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; background: var(--c-forest); color: var(--c-cream); }
#gcis-chat .gc-head img { width: 38px; height: 38px; border-radius: 50%; background: #fff; padding: 4px; object-fit: contain; flex: none; }
#gcis-chat .gc-head-t { flex: 1; min-width: 0; }
#gcis-chat .gc-head-t b { display: block; font-size: 15px; font-weight: 600; }
#gcis-chat .gc-head-t span { display: block; font-size: 12px; opacity: .8; }
#gcis-chat .gc-x { width: 36px; height: 36px; border: 0 !important; border-radius: 50% !important; background: rgba(255, 255, 255, .12) !important; color: var(--c-cream) !important; cursor: pointer; font-size: 20px; line-height: 1; display: grid; place-items: center; padding: 0; }
#gcis-chat .gc-x:hover { background: rgba(255, 255, 255, .22) !important; }
#gcis-chat .gc-test { background: #fbecd2; color: #6b4304; font-size: 12px; padding: 6px 16px; }

#gcis-chat .gc-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; }
#gcis-chat .gc-msg { max-width: 86%; padding: 10px 13px; border-radius: 14px; white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; font-size: 14.5px; }
#gcis-chat .gc-bot { align-self: flex-start; background: #fff; border: 1px solid var(--c-line); border-bottom-left-radius: 4px; }
#gcis-chat .gc-me { align-self: flex-end; background: var(--c-forest); color: var(--c-cream); border-bottom-right-radius: 4px; }
#gcis-chat .gc-msg a { color: var(--c-forest-2); text-decoration: underline; font-weight: 600; }
#gcis-chat .gc-me a { color: #fff; }
#gcis-chat .gc-done { align-self: stretch; max-width: 100%; background: #dff0e5; border: 1px solid #b9dcc5; color: #1f5a37; font-size: 13.5px; }
#gcis-chat .gc-typing { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
#gcis-chat .gc-typing i { width: 6px; height: 6px; border-radius: 50%; background: #9aa69d; animation: gcB 1s infinite ease-in-out; }
#gcis-chat .gc-typing i:nth-child(2) { animation-delay: .15s; }
#gcis-chat .gc-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes gcB { 0%, 80%, 100% { opacity: .3; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }

#gcis-chat .gc-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; }
#gcis-chat .gc-chip { border: 1px solid #c7d1c9 !important; background: #fff !important; color: var(--c-forest) !important; border-radius: 999px !important; padding: 7px 12px; font-size: 13px; font-weight: 500; cursor: pointer; line-height: 1.2; }
#gcis-chat .gc-chip:hover { background: #eef3ee !important; border-color: var(--c-forest) !important; }

#gcis-chat .gc-human { display: flex; gap: 8px; padding: 0 16px 10px; }
#gcis-chat .gc-human a { flex: 1; display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px; border-radius: 10px; font-size: 13px; font-weight: 600; text-decoration: none; border: 1px solid var(--c-line); background: #fff; color: var(--c-forest); }
#gcis-chat .gc-human a:hover { border-color: var(--c-forest); }
#gcis-chat .gc-human svg { width: 16px; height: 16px; flex: none; }

#gcis-chat .gc-form { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--c-line); }
#gcis-chat .gc-form textarea { flex: 1; resize: none; border: 1px solid var(--c-line) !important; border-radius: 12px !important; padding: 10px 12px !important; font: inherit; font-size: 15px; line-height: 1.4; max-height: 120px; min-height: 44px; background: #fff !important; color: var(--c-ink) !important; margin: 0 !important; box-shadow: none !important; }
#gcis-chat .gc-send { width: 44px; height: 44px; flex: none; border: 0 !important; border-radius: 12px !important; background: var(--c-forest) !important; color: var(--c-cream) !important; cursor: pointer; display: grid; place-items: center; padding: 0; }
#gcis-chat .gc-send:disabled { opacity: .45; cursor: default; }
#gcis-chat .gc-send svg { width: 20px; height: 20px; }
#gcis-chat .gc-fine { margin: 0; padding: 6px 14px 10px; background: #fff; font-size: 11.5px; color: var(--c-ink-2); text-align: center; }
#gcis-chat .gc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@media (max-width: 520px) {
	#gcis-chat { right: 12px; bottom: 20px; }
	#gcis-chat.open { inset: 0; right: 0; bottom: 0; }
	#gcis-chat .gc-panel { width: 100%; height: 100%; height: 100dvh; border-radius: 0; }
}

/* attention: a gold ripple around the button every 2.5 seconds while the chat is closed */
#gcis-chat .gc-launch::before, #gcis-chat .gc-launch::after {
	content: ""; position: absolute; right: 0; top: 0; width: 54px; height: 54px; border-radius: 50%;
	border: 2px solid var(--c-gold); pointer-events: none; opacity: 0;
	animation: gcRing 2.5s ease-out infinite;
}
#gcis-chat .gc-launch::after { animation-delay: .4s; }
#gcis-chat .gc-launch:hover::before, #gcis-chat .gc-launch:hover::after { animation: none; }
@keyframes gcRing { 0% { transform: scale(1); opacity: .9; } 55% { transform: scale(1.9); opacity: 0; } 100% { transform: scale(1.9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #gcis-chat .gc-launch::before, #gcis-chat .gc-launch::after { animation: none; } }

/* Keep the theme's "back to top" button clear of the chat button. */
#to-top { bottom: 88px !important; }
