.gttp-ai-widget,
.gttp-ai-widget * {
	box-sizing: border-box;
}

.gttp-ai-widget {
	--gttp-ai-red: #d71920;
	--gttp-ai-black: #171717;
	--gttp-ai-gold: #c6a04a;
	font-family: inherit;
	position: fixed;
	right: 20px;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	z-index: 99990;
	direction: rtl;
}

.gttp-ai-launcher {
	align-items: center;
	background: var(--gttp-ai-red);
	border: 0;
	border-radius: 999px;
	box-shadow: 0 5px 20px rgba(0, 0, 0, .22);
	color: #fff;
	cursor: pointer;
	display: flex;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	gap: 9px;
	min-height: 52px;
	padding: 10px 17px;
}

.gttp-ai-launcher:hover,
.gttp-ai-launcher:focus-visible {
	background: #b8141a;
	color: #fff;
}

.gttp-ai-launcher-icon {
	align-items: center;
	background: #fff;
	border-radius: 50%;
	color: var(--gttp-ai-red);
	display: inline-flex;
	font-size: 18px;
	height: 27px;
	justify-content: center;
	line-height: 1;
	width: 27px;
}

.gttp-ai-panel {
	background: #fff;
	border: 1px solid #dedede;
	border-radius: 16px;
	box-shadow: 0 12px 44px rgba(0, 0, 0, .24);
	display: flex;
	flex-direction: column;
	height: min(690px, 76vh);
	max-height: calc(100dvh - 105px - env(safe-area-inset-bottom, 0px));
	min-height: 380px;
	overflow: hidden;
	position: absolute;
	right: 0;
	bottom: 68px;
	width: min(420px, calc(100vw - 32px));
}

.gttp-ai-panel[hidden] {
	display: none;
}

.gttp-ai-header {
	align-items: center;
	background: var(--gttp-ai-black);
	border-bottom: 3px solid var(--gttp-ai-gold);
	color: #fff;
	display: flex;
	gap: 12px;
	justify-content: space-between;
	min-height: 68px;
	padding: 12px 14px;
}

.gttp-ai-header strong,
.gttp-ai-header small {
	display: block;
}

.gttp-ai-header strong {
	font-size: 15px;
	line-height: 1.5;
}

.gttp-ai-header small {
	color: #e4e4e4;
	font-size: 11px;
	margin-top: 2px;
}

.gttp-ai-header-actions {
	align-items: center;
	display: flex;
	flex-shrink: 0;
	gap: 8px;
}

.gttp-ai-close,
.gttp-ai-new {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, .45);
	color: #fff;
	cursor: pointer;
	font: inherit;
}

.gttp-ai-close {
	border-radius: 50%;
	font-size: 23px;
	height: 34px;
	line-height: 1;
	padding: 0;
	width: 34px;
}

.gttp-ai-new {
	border-radius: 7px;
	font-size: 11px;
	padding: 7px 8px;
}

.gttp-ai-messages {
	background: #f7f7f7;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 11px;
	min-height: 0;
	overflow-y: auto;
	padding: 14px;
}

.gttp-ai-message {
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.85;
	max-width: 91%;
	padding: 10px 12px;
	white-space: pre-wrap;
	word-break: break-word;
}

.gttp-ai-message-user {
	align-self: flex-start;
	background: #ececec;
	color: #222;
}

.gttp-ai-message-assistant {
	align-self: flex-end;
	background: #fff;
	border: 1px solid #e6e1d4;
	color: #222;
}

.gttp-ai-message-body {
	white-space: pre-wrap;
}

.gttp-ai-product-card {
	background: #fff;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
	color: #222;
	display: block;
	font-size: 12px;
	line-height: 1.7;
	margin-top: 8px;
	padding: 8px 10px;
	text-decoration: none;
}

.gttp-ai-product-card:hover,
.gttp-ai-product-card:focus-visible {
	border-color: var(--gttp-ai-gold);
	color: #111;
}

.gttp-ai-product-card strong,
.gttp-ai-product-card span {
	display: block;
}

.gttp-ai-product-card span {
	color: #555;
	font-size: 11px;
	margin-top: 3px;
}

.gttp-ai-sources {
	display: flex;
	flex-wrap: wrap;
	font-size: 11px;
	gap: 5px 9px;
	margin-top: 9px;
}

.gttp-ai-sources span {
	color: #666;
	width: 100%;
}

.gttp-ai-sources a {
	color: #72570f;
	text-decoration: underline;
}

.gttp-ai-status {
	color: #555;
	font-size: 12px;
	min-height: 0;
	padding: 0 14px;
}

.gttp-ai-status:not(:empty) {
	padding-bottom: 7px;
}

.gttp-ai-form {
	background: #fff;
	border-top: 1px solid #e7e7e7;
	padding: 10px 12px max(10px, env(safe-area-inset-bottom, 0px));
}

.gttp-ai-input {
	background: #fff;
	border: 1px solid #cfcfcf;
	border-radius: 9px;
	color: #222;
	display: block;
	font: inherit;
	font-size: 14px;
	line-height: 1.6;
	max-height: 112px;
	min-height: 48px;
	padding: 9px 10px;
	resize: vertical;
	width: 100%;
}

.gttp-ai-input:focus {
	border-color: var(--gttp-ai-gold);
	box-shadow: 0 0 0 2px rgba(198, 160, 74, .18);
	outline: 0;
}

.gttp-ai-form-row {
	align-items: center;
	display: flex;
	gap: 10px;
	justify-content: space-between;
	margin-top: 7px;
}

.gttp-ai-hint {
	color: #777;
	font-size: 10px;
}

.gttp-ai-send {
	background: var(--gttp-ai-red);
	border: 0;
	border-radius: 7px;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	min-width: 72px;
	padding: 8px 13px;
}

.gttp-ai-send:disabled {
	cursor: wait;
	opacity: .6;
}

.gttp-ai-widget .screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	position: absolute;
	width: 1px;
}

@media (max-width: 600px) {
	.gttp-ai-widget {
		right: 14px;
		bottom: calc(14px + env(safe-area-inset-bottom, 0px));
	}

	.gttp-ai-launcher {
		font-size: 13px;
		min-height: 48px;
		padding: 8px 13px;
	}

	.gttp-ai-panel {
		border-radius: 0;
		bottom: 0;
		height: 100dvh;
		left: 0;
		max-height: 100dvh;
		min-height: 0;
		position: fixed;
		right: 0;
		width: 100vw;
	}

	.gttp-ai-widget.gttp-ai-open .gttp-ai-launcher {
		display: none;
	}

	.gttp-ai-message {
		max-width: 94%;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.gttp-ai-launcher,
	.gttp-ai-send {
		transition: background-color .15s ease, box-shadow .15s ease;
	}
}
