:root {
	--gstore-support-qa-fg: var(--gstore-color-white, #fff);
	--gstore-support-qa-fg-muted: var(--gstore-color-text-secondary, #6b6b6b);
	--gstore-support-qa-bg: linear-gradient(
		135deg,
		var(--gstore-color-accent-secondary-dark, #567745) 0%,
		var(--gstore-color-accent-secondary, #5a8900) 55%,
		var(--gstore-color-bg-dark, #0a0a0a) 100%
	);
	--gstore-support-qa-bg-chat: linear-gradient(
		135deg,
		var(--gstore-color-accent, #ff5c00) 0%,
		var(--gstore-color-accent-light, #ff6500) 55%,
		var(--gstore-color-accent-dark, #bf4500) 100%
	);
	--gstore-support-qa-chip-bg: var(--gstore-color-white-20, rgba(255, 255, 255, 0.2));
	--gstore-support-qa-surface: var(--gstore-color-bg-light, #fff);
	--gstore-support-qa-surface-muted: var(--gstore-color-bg-slate-50, #f8fafc);
	--gstore-support-qa-text: var(--gstore-color-text-primary, #1a1a1a);
	--gstore-support-qa-text-secondary: var(--gstore-color-text-gray-600, #475569);
	--gstore-support-qa-text-tertiary: var(--gstore-color-text-slate-400, #94a3b8);
	--gstore-support-qa-border: var(--gstore-color-border, #e6e6e6);
	--gstore-support-qa-border-strong: var(--gstore-color-border-card, #d1d5db);
	--gstore-support-qa-accent: var(--gstore-color-accent, #ff5c00);
	--gstore-support-qa-accent-soft: var(--gstore-color-accent-08, rgba(255, 92, 0, 0.08));
	--gstore-support-qa-shadow: var(--gstore-shadow-lg, 0 10px 30px rgba(0, 0, 0, 0.12));
	--gstore-support-qa-shadow-hover: var(--gstore-shadow-xl, 0 20px 60px rgba(17, 24, 39, 0.08));
	--gstore-support-qa-radius-pill: var(--gstore-radius-full, 9999px);
	--gstore-support-qa-radius-card: var(--gstore-radius-xl, 12px);
}

.Gstore-support-float,
.Gstore-telegram-float {
	position: fixed;
	right: calc(var(--gstore-support-float-right, 16px) + env(safe-area-inset-right, 0px));
	bottom: calc(var(--gstore-support-float-bottom, 16px) + env(safe-area-inset-bottom, 0px));
	min-height: 56px;
	padding: 0 var(--gstore-spacing-3, 12px) 0 var(--gstore-spacing-3, 12px);
	display: inline-flex;
	align-items: center;
	gap: var(--gstore-spacing-2, 8px);
	border: 1px solid var(--gstore-support-qa-border-strong);
	border-radius: var(--gstore-support-qa-radius-pill);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 250, 252, 0.96));
	color: var(--gstore-support-qa-text);
	text-decoration: none;
	box-shadow: 0 10px 28px rgba(15, 23, 42, 0.14);
	z-index: 99999;
	cursor: pointer;
	transition:
		transform var(--gstore-transition-fast, 150ms ease-in-out),
		box-shadow var(--gstore-transition-fast, 150ms ease-in-out),
		filter var(--gstore-transition-fast, 150ms ease-in-out);
	-webkit-tap-highlight-color: transparent;
	font-family: var(--gstore-font-family, sans-serif);
}

.Gstore-support-float:hover,
.Gstore-support-float:focus-visible,
.Gstore-telegram-float:hover,
.Gstore-telegram-float:focus-visible {
	transform: translateY(-2px);
	box-shadow: 0 16px 36px rgba(15, 23, 42, 0.18);
	filter: none;
	outline: none;
}

.Gstore-support-float:active,
.Gstore-telegram-float:active {
	transform: translateY(0);
}

.Gstore-support-float.is-direct-chat {
	border-color: rgba(255, 92, 0, 0.28);
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(255, 247, 240, 0.98));
}

.Gstore-support-float__icon-wrap {
	width: 34px;
	height: 34px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: var(--gstore-support-qa-radius-pill);
	background: rgba(255, 92, 0, 0.12);
	color: var(--gstore-support-qa-accent);
	flex: 0 0 auto;
}

.Gstore-support-float:not(.is-direct-chat) .Gstore-support-float__icon-wrap {
	background: rgba(255, 92, 0, 0.1);
	color: var(--gstore-support-qa-accent);
}

.Gstore-support-float__icon {
	width: 22px;
	height: 22px;
	display: block;
	fill: currentColor;
}

.Gstore-support-float__label {
	font-size: var(--gstore-font-size-sm, 0.875rem);
	font-weight: var(--gstore-font-weight-bold, 700);
	line-height: 1;
	white-space: nowrap;
	letter-spacing: var(--gstore-letter-spacing-02, 0.02em);
}

.Gstore-support-modal,
.Gstore-support-chat-shell {
	position: fixed;
	inset: 0;
	z-index: 2147483000;
	opacity: 0;
	pointer-events: none;
	transition: opacity var(--gstore-transition-fast, 150ms ease-in-out);
}

.Gstore-support-modal[aria-hidden="false"],
.Gstore-support-chat-shell[aria-hidden="false"] {
	opacity: 1;
	pointer-events: auto;
}

/* Em alguns navegadores mobile, filhos com pointer-events:auto ainda podem
 * capturar toque mesmo com o container invisível (opacity:0 + pointer-events:none).
 * Forçamos bloqueio total enquanto o modal/chat estiver fechado.
 */
.Gstore-support-modal[aria-hidden="true"] *,
.Gstore-support-chat-shell[aria-hidden="true"] * {
	pointer-events: none !important;
}

.Gstore-support-modal__backdrop,
.Gstore-support-chat-shell__backdrop {
	position: absolute;
	inset: 0;
	background: var(--gstore-color-black-60, rgba(0, 0, 0, 0.6));
	backdrop-filter: blur(2px);
}

.Gstore-support-modal__panel {
	position: absolute;
	right: 16px;
	bottom: calc(84px + env(safe-area-inset-bottom, 0px));
	width: min(420px, calc(100vw - 32px));
	border-radius: calc(var(--gstore-support-qa-radius-card) + 6px);
	background: var(--gstore-support-qa-surface);
	color: var(--gstore-support-qa-text);
	box-shadow: var(--gstore-support-qa-shadow-hover);
	transform: translateY(10px) scale(0.985);
	transition: transform var(--gstore-transition-fast, 150ms ease-in-out);
	border: 1px solid var(--gstore-support-qa-border);
}

.Gstore-support-modal[aria-hidden="false"] .Gstore-support-modal__panel {
	transform: translateY(0) scale(1);
}

.Gstore-support-modal__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: var(--gstore-support-qa-radius-pill);
	background: var(--gstore-support-qa-surface-muted);
	color: var(--gstore-support-qa-text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.Gstore-support-modal__close svg,
.Gstore-support-chat-shell__close svg {
	width: 20px;
	height: 20px;
	display: block;
	fill: currentColor;
}

.Gstore-support-modal__body {
	padding: var(--gstore-spacing-5, 20px) var(--gstore-spacing-5, 20px) var(--gstore-spacing-4, 16px);
}

.Gstore-support-modal__eyebrow {
	margin: 0 0 4px;
	font-size: var(--gstore-font-size-xs, 0.75rem);
	font-weight: var(--gstore-font-weight-bold, 700);
	text-transform: uppercase;
	letter-spacing: var(--gstore-letter-spacing-wider, 0.08em);
	color: var(--gstore-support-qa-accent);
}

.Gstore-support-modal__title {
	margin: 0 38px 8px 0;
	font-size: var(--gstore-font-size-xl, 1.25rem);
	line-height: 1.15;
	font-weight: 800;
	color: var(--gstore-support-qa-text);
}

.Gstore-support-modal__text {
	margin: 0 0 14px;
	font-size: var(--gstore-font-size-sm, 0.875rem);
	line-height: var(--gstore-line-height-normal, 1.5);
	color: var(--gstore-support-qa-text-secondary);
}

.Gstore-support-modal__options {
	display: grid;
	gap: 10px;
}

.Gstore-support-option {
	width: 100%;
	border: 1px solid var(--gstore-support-qa-border-strong);
	background: var(--gstore-support-qa-surface);
	border-radius: calc(var(--gstore-support-qa-radius-card) + 2px);
	padding: var(--gstore-spacing-3, 12px);
	text-align: left;
	display: grid;
	gap: 4px;
	cursor: pointer;
	transition:
		border-color var(--gstore-transition-fast, 150ms ease-in-out),
		transform var(--gstore-transition-fast, 150ms ease-in-out),
		box-shadow var(--gstore-transition-fast, 150ms ease-in-out);
	font-family: var(--gstore-font-family, sans-serif);
}

.Gstore-support-option:hover,
.Gstore-support-option:focus-visible {
	border-color: var(--gstore-support-qa-accent);
	box-shadow: var(--gstore-shadow-md, 0 3px 10px rgba(0, 0, 0, 0.08));
	transform: translateY(-1px);
	outline: none;
}

.Gstore-support-option.is-disabled,
.Gstore-support-option:disabled {
	cursor: not-allowed;
	opacity: 0.7;
	transform: none;
	box-shadow: none;
}

.Gstore-support-option__title {
	font-size: var(--gstore-font-size-base, 1rem);
	font-weight: var(--gstore-font-weight-bold, 700);
	color: var(--gstore-support-qa-text);
}

.Gstore-support-option__desc {
	font-size: var(--gstore-font-size-sm, 0.875rem);
	line-height: 1.35;
	color: var(--gstore-support-qa-text-secondary);
}

.Gstore-support-chat-shell {
	z-index: 2147483400;
}

.Gstore-support-chat-shell__frame {
	position: absolute;
	right: 12px;
	bottom: 12px;
	width: min(420px, calc(100vw - 24px));
	height: min(720px, calc(100vh - 24px));
	border-radius: calc(var(--gstore-support-qa-radius-card) + 6px);
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.92)),
		linear-gradient(135deg, var(--gstore-color-bg-accent-light, #faf7ed), var(--gstore-color-bg-light, #fff));
	border: 1px solid var(--gstore-color-border-light, #e8e8e6);
	box-shadow: var(--gstore-support-qa-shadow-hover);
	overflow: hidden;
	display: grid;
	grid-template-rows: auto 1fr;
	transform: translateY(10px) scale(0.985);
	transition: transform var(--gstore-transition-fast, 150ms ease-in-out);
	pointer-events: none;
}

.Gstore-support-chat-shell[aria-hidden="false"] .Gstore-support-chat-shell__frame {
	transform: translateY(0) scale(1);
}

.Gstore-support-chat-shell__header {
	position: relative;
	z-index: 2147483647;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--gstore-spacing-3, 12px);
	padding: var(--gstore-spacing-3, 12px) var(--gstore-spacing-3, 12px) var(--gstore-spacing-3, 12px) var(--gstore-spacing-4, 16px);
	background: rgba(255, 255, 255, 0.92);
	border-bottom: 1px solid var(--gstore-support-qa-border);
	pointer-events: auto;
}

.Gstore-support-chat-shell__headings {
	min-width: 0;
}

.Gstore-support-chat-shell__eyebrow {
	margin: 0;
	font-size: var(--gstore-font-size-xs, 0.75rem);
	font-weight: var(--gstore-font-weight-bold, 700);
	letter-spacing: var(--gstore-letter-spacing-wider, 0.08em);
	text-transform: uppercase;
	color: var(--gstore-color-accent-secondary-dark, #567745);
}

.Gstore-support-chat-shell__title {
	margin: 2px 0 0;
	font-size: var(--gstore-font-size-base, 1rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--gstore-support-qa-text);
}

.Gstore-support-chat-shell__actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.Gstore-support-chat-shell__link {
	border: 0;
	background: transparent;
	color: var(--gstore-support-qa-accent);
	font-size: var(--gstore-font-size-xs, 0.75rem);
	font-weight: var(--gstore-font-weight-bold, 700);
	padding: 6px 8px;
	border-radius: var(--gstore-support-qa-radius-pill);
	cursor: pointer;
	white-space: nowrap;
}

.Gstore-support-chat-shell__link:hover,
.Gstore-support-chat-shell__link:focus-visible {
	background: var(--gstore-support-qa-accent-soft);
	outline: none;
}

.Gstore-support-chat-shell__close {
	width: 34px;
	height: 34px;
	border: 0;
	border-radius: var(--gstore-support-qa-radius-pill);
	background: var(--gstore-support-qa-surface-muted);
	color: var(--gstore-support-qa-text);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
}

.Gstore-support-chat-shell__body {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: var(--gstore-spacing-4, 16px);
	color: var(--gstore-support-qa-text-secondary);
	font-size: var(--gstore-font-size-sm, 0.875rem);
	line-height: var(--gstore-line-height-normal, 1.5);
	text-align: center;
	background:
		radial-gradient(circle at 14% 12%, var(--gstore-color-accent-08, rgba(255, 92, 0, 0.08)), transparent 46%),
		radial-gradient(circle at 88% 18%, var(--gstore-color-accent-secondary-12, rgba(90, 137, 0, 0.12)), transparent 45%),
		linear-gradient(180deg, rgba(255, 255, 255, 0.85), var(--gstore-color-bg-slate-50, #f8fafc));
}

body.gstore-support-modal-open {
	overflow: hidden;
}

body.gstore-support-chat-open .Gstore-support-float {
	display: none !important;
}

/* Patch defensivo para reduzir conflito visual do launcher/widget do Chatwoot durante o modal fake (estratégia A). */
body.gstore-support-chat-open .woot-widget-bubble,
body.gstore-support-chat-open [class*="woot-widget-bubble"] {
	opacity: 0 !important;
	pointer-events: none !important;
}

body.gstore-support-chat-open .woot-widget-holder,
body.gstore-support-chat-open [class*="woot-widget-holder"] {
	z-index: 2147483300 !important;
}

/* Evita duplicidade: usa o quick action do tema para abrir o Chatwoot nativo. */
html.gstore-support-quick-action-mounted #cw-bubble-holder,
body.gstore-support-quick-action-mounted #cw-bubble-holder,
body.gstore-support-quick-action-mounted .woot-widget-bubble,
html.gstore-support-quick-action-mounted .woot-widget-bubble,
body.gstore-support-quick-action-mounted [class*="woot-widget-bubble"] {
	display: none !important;
	opacity: 0 !important;
	pointer-events: none !important;
	visibility: hidden !important;
}

/* Best effort para esconder branding do Chatwoot quando renderizado fora do iframe. */
.woot-widget-holder [class*="powered"],
.woot-widget-holder [class*="Powered"],
[class*="woot"] [class*="powered"],
[class*="woot"] [class*="Powered"],
.woot-widget-holder a[href*="chatwoot"],
[class*="woot"] a[href*="chatwoot"] {
	display: none !important;
}

@media (max-width: 768px) {
	.Gstore-support-float,
	.Gstore-telegram-float {
		right: calc(12px + env(safe-area-inset-right, 0px));
		bottom: calc(12px + env(safe-area-inset-bottom, 0px));
		min-height: 50px;
		padding: 0 12px 0 10px;
		gap: 8px;
	}

	.Gstore-support-float__icon-wrap {
		width: 30px;
		height: 30px;
	}

	.Gstore-support-float__icon {
		width: 20px;
		height: 20px;
	}

	.Gstore-support-float__label {
		font-size: 12px;
	}

	.Gstore-support-modal__panel {
		left: 12px;
		right: 12px;
		bottom: calc(74px + env(safe-area-inset-bottom, 0px));
		width: auto;
	}

	.Gstore-support-chat-shell__frame {
		inset: 0;
		width: auto;
		height: auto;
		border-radius: 0;
		border: 0;
	}

	.Gstore-support-chat-shell__header {
		padding-top: calc(10px + env(safe-area-inset-top, 0px));
	}

	.Gstore-support-chat-shell__body {
		padding: 20px 16px calc(16px + env(safe-area-inset-bottom, 0px));
	}
}

@media print {
	.Gstore-support-float,
	.Gstore-telegram-float,
	.Gstore-support-modal,
	.Gstore-support-chat-shell {
		display: none !important;
	}
}
