#ga-agent-root,
#ga-agent-root * {
	box-sizing: border-box;
}

#ga-agent-root {
	position: relative;
	z-index: 9990;
	font-family: "Noto Sans", sans-serif;
	line-height: 1.4;
}

#ga-agent-root .screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ga-agent-trigger {
	position: fixed;
	bottom: calc(var(--ga-base-bottom, 20px) + var(--ga-sticky-offset, 0px));
	width: 52px;
	height: 52px;
	border: 0;
	border-radius: 999px;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ga-primary);
	color: var(--ga-white);
	cursor: pointer;
	box-shadow: var(--ga-trigger-shadow);
	z-index: 9990;
	-webkit-tap-highlight-color: transparent;
}

.ga-agent--right .ga-agent-trigger {
	right: 16px;
	left: auto;
}

.ga-agent--left .ga-agent-trigger {
	left: 16px;
	right: auto;
}

.ga-agent-trigger__icon {
	position: absolute;
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ga-agent-trigger__icon svg {
	width: 22px;
	height: 22px;
	display: block;
}

.ga-agent-trigger__icon--close {
	opacity: 0;
	visibility: hidden;
}

.ga-agent-trigger__tooltip {
	display: none;
}

#ga-agent-root.is-open .ga-agent-trigger {
	background: var(--ga-accent);
}

#ga-agent-root.is-open .ga-agent-trigger__icon--chat {
	opacity: 0;
	visibility: hidden;
}

#ga-agent-root.is-open .ga-agent-trigger__icon--close {
	opacity: 1;
	visibility: visible;
}

.ga-agent-trigger:focus-visible,
.ga-agent-panel__control:focus-visible,
.ga-agent-panel__send:focus-visible,
.ga-agent-panel__input:focus-visible {
	outline: 2px solid var(--ga-focus-ring);
	outline-offset: 3px;
}

.ga-agent-panel {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	height: 85vh;
	background: var(--ga-white);
	border-radius: 16px 16px 0 0;
	display: flex;
	flex-direction: column;
	box-shadow: var(--ga-shadow);
	z-index: 9991;
	transform: translateY(100%);
	opacity: 0;
	visibility: hidden;
	transition: transform 280ms cubic-bezier(0.32, 0.72, 0, 1), opacity 280ms ease, visibility 280ms ease;
}

#ga-agent-root.is-open .ga-agent-panel {
	transform: translateY(0);
	opacity: 1;
	visibility: visible;
}

.ga-agent-overlay {
	position: fixed;
	inset: 0;
	background: var(--ga-overlay);
	opacity: 0;
	visibility: hidden;
	z-index: 9989;
}

#ga-agent-root.is-open .ga-agent-overlay {
	opacity: 1;
	visibility: visible;
}

.ga-agent-panel__header {
	height: 56px;
	min-height: 56px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0 12px;
	background: var(--ga-header);
	color: var(--ga-white);
	border-radius: 16px 16px 0 0;
}

.ga-agent-panel__brand {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.ga-agent-panel__logo {
	width: 22px;
	height: 22px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.ga-agent-panel__logo svg {
	width: 22px;
	height: 22px;
	display: block;
}

.ga-agent-panel__title {
	font-size: 14px;
	font-weight: 500;
}

.ga-agent-panel__controls {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.ga-agent-panel__control {
	width: 44px;
	height: 44px;
	min-width: 44px;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: var(--ga-white);
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
}

.ga-agent-panel__messages {
	flex: 1;
	overflow-y: auto;
	background: var(--ga-surface);
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	scroll-behavior: smooth;
}

.ga-agent-msg {
	max-width: 85%;
	padding: 10px 14px;
	font-size: 14px;
	line-height: 1.5;
	word-break: break-word;
	white-space: pre-wrap;
}

.ga-agent-msg--user {
	align-self: flex-end;
	background: var(--ga-primary);
	color: var(--ga-white);
	border-radius: 16px 16px 4px 16px;
	max-width: 80%;
}

.ga-agent-msg--assistant {
	align-self: flex-start;
	background: var(--ga-white);
	color: var(--ga-text);
	border: 1px solid var(--ga-border);
	border-radius: 16px 16px 16px 4px;
}

.ga-agent-msg__time {
	display: block;
	margin-top: 6px;
	font-size: 11px;
	color: var(--ga-muted);
}

.ga-agent-msg--assistant .ga-agent-msg__time {
	color: var(--ga-muted);
}

.ga-agent-msg--loading {
	display: inline-flex;
	align-items: center;
	gap: 4px;
}

.ga-agent-dot {
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: var(--ga-muted);
}

.ga-agent-panel__status {
	min-height: 20px;
	margin: 0;
	padding: 0 16px 6px;
	font-size: 12px;
	color: var(--ga-muted);
	background: var(--ga-surface);
}

.ga-agent-panel__input-wrap {
	border-top: 1px solid var(--ga-border);
	background: var(--ga-white);
	padding: 12px 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ga-agent-panel__input-row {
	display: flex;
	gap: 10px;
	align-items: flex-end;
}

.ga-agent-panel__input {
	flex: 1;
	border: 0;
	outline: none;
	resize: none;
	font-size: 15px;
	line-height: 1.4;
	max-height: 96px;
	overflow-y: auto;
	background: transparent;
	color: var(--ga-text);
}

.ga-agent-panel__input::placeholder {
	color: var(--ga-muted);
}

.ga-agent-panel__send {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: 0;
	padding: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--ga-primary);
	color: var(--ga-white);
	cursor: pointer;
}

.ga-agent-panel__send svg {
	width: 18px;
	height: 18px;
	display: block;
}

.ga-agent-panel__send:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

#ga-agent-root.is-sending .ga-agent-panel__send {
	background: var(--ga-accent);
}

.ga-agent-panel__counter {
	font-size: 11px;
	color: var(--ga-muted);
	text-align: right;
}

.ga-agent-panel__footer {
	font-size: 11px;
	color: var(--ga-muted);
	text-align: center;
	padding-top: 4px;
}

#ga-agent-root.is-minimized .ga-agent-panel {
	height: 56px;
	max-height: 56px;
}

#ga-agent-root.is-minimized .ga-agent-panel__messages,
#ga-agent-root.is-minimized .ga-agent-panel__status,
#ga-agent-root.is-minimized .ga-agent-panel__input-wrap {
	display: none;
}

body.ga-agent-scroll-lock {
	overflow: hidden;
}

@media (min-width: 480px) {
	.ga-agent-panel {
		width: 380px;
		height: 560px;
		left: auto;
		right: auto;
		bottom: calc(56px + 8px + var(--ga-base-bottom, 20px) + var(--ga-sticky-offset, 0px));
		border-radius: 16px;
		transform: scale(0.96) translateY(12px);
		transition: transform 250ms ease, opacity 250ms ease, visibility 250ms ease;
	}

	#ga-agent-root.is-open .ga-agent-panel {
		transform: scale(1) translateY(0);
	}

	.ga-agent--right .ga-agent-panel {
		right: 16px;
		left: auto;
	}

	.ga-agent--left .ga-agent-panel {
		left: 16px;
		right: auto;
	}

	.ga-agent-panel__header {
		border-radius: 16px 16px 0 0;
	}
}

@media (min-width: 768px) {
	.ga-agent-trigger {
		width: 56px;
		height: 56px;
	}

	.ga-agent--right .ga-agent-trigger {
		right: 24px;
	}

	.ga-agent--left .ga-agent-trigger {
		left: 24px;
	}

	.ga-agent--right .ga-agent-panel {
		right: 24px;
	}

	.ga-agent--left .ga-agent-panel {
		left: 24px;
	}

	.ga-agent-trigger__tooltip {
		display: block;
		position: absolute;
		top: 50%;
		transform: translateY(-50%);
		white-space: nowrap;
		font-size: 12px;
		color: var(--ga-white);
		background: var(--ga-tooltip-bg);
		padding: 7px 10px;
		border-radius: 6px;
		opacity: 0;
		visibility: hidden;
		pointer-events: none;
	}

	.ga-agent--right .ga-agent-trigger__tooltip {
		right: calc(100% + 10px);
	}

	.ga-agent--left .ga-agent-trigger__tooltip {
		left: calc(100% + 10px);
	}

	.ga-agent-trigger:hover .ga-agent-trigger__tooltip,
	.ga-agent-trigger:focus-visible .ga-agent-trigger__tooltip {
		opacity: 1;
		visibility: visible;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.ga-agent-trigger,
	.ga-agent-trigger__icon,
	.ga-agent-trigger__tooltip,
	.ga-agent-overlay,
	.ga-agent-panel,
	.ga-agent-panel__control,
	.ga-agent-panel__send {
		transition: transform 200ms ease, opacity 200ms ease, visibility 200ms ease, box-shadow 200ms ease, background-color 200ms ease;
	}

	.ga-agent-trigger:hover {
		transform: scale(1.08);
		box-shadow: var(--ga-trigger-shadow), 0 0 0 2px var(--ga-accent);
	}

	.ga-agent-trigger:active {
		transform: scale(0.95);
	}

	#ga-agent-root.is-sending .ga-agent-trigger__icon {
		animation: ga-agent-pulse 1.2s ease-in-out infinite;
	}

	.ga-agent-panel__control:hover {
		opacity: 0.8;
	}

	.ga-agent-dot {
		animation: ga-agent-dots 1s ease-in-out infinite;
	}

	.ga-agent-dot:nth-child(2) {
		animation-delay: 0.1s;
	}

	.ga-agent-dot:nth-child(3) {
		animation-delay: 0.2s;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ga-agent-trigger,
	.ga-agent-trigger__icon,
	.ga-agent-trigger__tooltip,
	.ga-agent-overlay,
	.ga-agent-panel,
	.ga-agent-panel__control,
	.ga-agent-panel__send,
	.ga-agent-dot {
		transition: none !important;
		animation: none !important;
	}
}

@keyframes ga-agent-pulse {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(0.86);
	}
	100% {
		transform: scale(1);
	}
}

@keyframes ga-agent-dots {
	0% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-2px);
	}
	100% {
		transform: translateY(0);
	}
}
