/* Optinovate shop assistant — same colours and fonts as the Cobalt theme. */
.optchat-launcher,
.optchat-panel {
	--optchat-brand: #1e2fa0;
	--optchat-deep: #121d6b;
	--optchat-ink: #0e1330;
	--optchat-muted: #59627d;
	--optchat-rule: #dce0ea;
	--optchat-bg: #f6f7fa;
	--optchat-glow: #c6f24e;
	font-family: "Archivo", system-ui, sans-serif;
	box-sizing: border-box;
}

.optchat-panel *,
.optchat-panel *::before,
.optchat-panel *::after {
	box-sizing: border-box;
}

/* The button: bottom right, above the language switcher when that is there. */
.optchat-launcher {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9990;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 12px 18px 12px 14px;
	border: 0;
	border-radius: 999px;
	background: var(--optchat-brand);
	color: #fff;
	font: 600 15px/1 "Archivo", system-ui, sans-serif;
	box-shadow: 0 6px 20px rgba(14, 19, 48, 0.25);
	cursor: pointer;
}

.optchat-launcher:hover,
.optchat-launcher:focus-visible {
	background: var(--optchat-deep);
}

.optchat-launcher svg {
	width: 22px;
	height: 22px;
}

.optchat-launcher[aria-expanded="true"] .optchat-launcher__label {
	display: none;
}

body:has(.gt_float_switcher) .optchat-launcher {
	bottom: 84px;
}

/* The chat window. */
.optchat-panel {
	position: fixed;
	right: 20px;
	bottom: 84px;
	z-index: 2147483000; /* An open chat sits above the site's other floating buttons (language switcher, badges). */
	display: flex;
	flex-direction: column;
	width: 380px;
	max-width: calc(100vw - 40px);
	height: min(600px, calc(100vh - 120px));
	border: 1px solid var(--optchat-rule);
	border-radius: 6px;
	background: #fff;
	color: var(--optchat-ink);
	box-shadow: 0 16px 48px rgba(14, 19, 48, 0.22);
	overflow: hidden;
}

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

body:has(.gt_float_switcher) .optchat-panel {
	bottom: 148px;
	height: min(600px, calc(100vh - 184px));
}

.optchat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	background: var(--optchat-brand);
	color: #fff;
}

.optchat-head p {
	margin: 0;
}

.optchat-head__title {
	font-weight: 700;
	font-size: 16px;
}

.optchat-head__sub {
	opacity: 0.85;
	font: 500 12px/1.4 "IBM Plex Mono", ui-monospace, monospace;
}

.optchat-head__tools {
	display: flex;
	flex: none;
	align-items: center;
	gap: 4px;
}

.optchat-restart {
	padding: 6px 10px;
	border: 1px solid rgba(255, 255, 255, 0.55);
	border-radius: 999px;
	background: transparent;
	color: #fff;
	font: 600 12px/1 "Archivo", system-ui, sans-serif;
	cursor: pointer;
}

.optchat-restart:hover,
.optchat-restart:focus-visible {
	background: rgba(255, 255, 255, 0.15);
}

.optchat-close {
	width: 32px;
	height: 32px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
}

.optchat-close:hover,
.optchat-close:focus-visible {
	background: rgba(255, 255, 255, 0.15);
}

.optchat-list {
	flex: 1 1 auto;
	padding: 16px;
	overflow-y: auto;
	background: var(--optchat-bg);
}

.optchat-text,
.optchat-you {
	margin: 0 0 8px;
	font-size: 14px;
	line-height: 1.5;
}

.optchat-bot {
	margin: 0 0 14px;
	max-width: 94%;
}

.optchat-bot > .optchat-text {
	display: inline-block;
	padding: 10px 12px;
	border: 1px solid var(--optchat-rule);
	border-radius: 2px 12px 12px 12px;
	background: #fff;
}

.optchat-you {
	width: fit-content;
	max-width: 85%;
	margin: 0 0 14px auto;
	padding: 9px 12px;
	border-radius: 12px 2px 12px 12px;
	background: var(--optchat-brand);
	color: #fff;
	overflow-wrap: anywhere;
}

.optchat-dots {
	display: inline-block;
	margin: 0 0 14px;
	padding: 8px 12px;
	border: 1px solid var(--optchat-rule);
	border-radius: 2px 12px 12px 12px;
	background: #fff;
	color: var(--optchat-muted);
	font-size: 12px;
	letter-spacing: 3px;
	animation: optchat-pulse 1s ease-in-out infinite;
}

@keyframes optchat-pulse {
	50% {
		opacity: 0.35;
	}
}

@media (prefers-reduced-motion: reduce) {
	.optchat-dots {
		animation: none;
	}
}

.optchat-typing {
	color: var(--optchat-muted);
	font-style: italic;
}

.optchat-chips,
.optchat-links {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 4px 0 0;
}

.optchat-chip {
	padding: 7px 12px;
	border: 1px solid var(--optchat-brand);
	border-radius: 999px;
	background: #fff;
	color: var(--optchat-brand);
	font: 600 13px/1.2 "Archivo", system-ui, sans-serif;
	cursor: pointer;
}

.optchat-chip:hover,
.optchat-chip:focus-visible {
	background: var(--optchat-brand);
	color: #fff;
}

.optchat-link {
	color: var(--optchat-brand);
	font-size: 13px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.optchat-links .optchat-link {
	margin-right: 8px;
}

/* A product in the chat. */
.optchat-product {
	display: flex;
	gap: 10px;
	margin: 0 0 8px;
	padding: 10px;
	border: 1px solid var(--optchat-rule);
	border-radius: 4px;
	background: #fff;
}

.optchat-product img {
	flex: none;
	width: 56px;
	height: 56px;
	object-fit: contain;
}

.optchat-product__body {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.optchat-product__name {
	color: var(--optchat-ink);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
}

.optchat-product__name:hover {
	color: var(--optchat-brand);
	text-decoration: underline;
}

.optchat-product__price {
	color: var(--optchat-brand);
	font: 500 12px/1.3 "IBM Plex Mono", ui-monospace, monospace;
}

.optchat-product__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 4px;
}

.optchat-btn {
	display: inline-block;
	padding: 6px 10px;
	border: 1px solid var(--optchat-brand);
	border-radius: 2px;
	background: var(--optchat-brand);
	color: #fff;
	font: 600 12px/1.2 "Archivo", system-ui, sans-serif;
	text-decoration: none;
	cursor: pointer;
}

.optchat-btn:hover,
.optchat-btn:focus-visible {
	background: var(--optchat-deep);
	color: #fff;
}

.optchat-btn--quiet {
	background: #fff;
	color: var(--optchat-brand);
}

.optchat-btn--quiet:hover,
.optchat-btn--quiet:focus-visible {
	background: var(--optchat-bg);
	color: var(--optchat-brand);
}

/* Typing. */
.optchat-form {
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 12px;
	border-top: 1px solid var(--optchat-rule);
	background: #fff;
}

.optchat-input {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid #c6cbda;
	border-radius: 2px;
	color: var(--optchat-ink);
	font: 400 15px/1.3 "Archivo", system-ui, sans-serif;
}

.optchat-input:focus {
	border-color: var(--optchat-brand);
	outline: 2px solid rgba(30, 47, 160, 0.18);
}

.optchat-send {
	padding: 10px 14px;
	border: 0;
	border-radius: 2px;
	background: var(--optchat-brand);
	color: #fff;
	font: 600 14px/1 "Archivo", system-ui, sans-serif;
	cursor: pointer;
}

.optchat-send:hover,
.optchat-send:focus-visible {
	background: var(--optchat-deep);
}

/* Phones: a round button, and the chat as a sheet over the page. */
@media (max-width: 640px) {
	.optchat-launcher {
		right: 16px;
		bottom: 16px;
		padding: 14px;
	}

	.optchat-launcher__label {
		display: none;
	}

	body:has(.gt_float_switcher) .optchat-launcher {
		bottom: 76px;
	}

	.optchat-panel,
	body:has(.gt_float_switcher) .optchat-panel {
		right: 0;
		bottom: 0;
		width: 100%;
		max-width: none;
		height: 85vh;
		height: 85dvh;
		border-radius: 12px 12px 0 0;
	}

	html.optchat-is-open .optchat-launcher {
		display: none;
	}

	.optchat-head {
		padding: 12px 12px 12px 16px;
	}

	.optchat-input {
		font-size: 16px; /* no zoom-in on iPhones */
	}
}

@media print {
	.optchat-launcher,
	.optchat-panel {
		display: none !important;
	}
}
