/* Digitalmart Hub — AI Chatbot widget styles
   Estilo inspirado no padrao CtrlMIND: pill-shape FAB + full-screen dark panel.
   Variaveis isoladas pra nao colidir com o tema. */

.dmhub-aibot-fab,
.dmhub-aibot-overlay,
.dmhub-aibot-panel {
	--dm-bot-bg:        #0a0a0a;
	--dm-bot-bg-2:      #141414;
	--dm-bot-bg-3:      #1f1f1f;
	--dm-bot-border:    rgba(255,255,255,0.08);
	--dm-bot-text:      #ffffff;
	--dm-bot-muted:     #a1a1aa;
	--dm-bot-accent:    #f4a261;
	--dm-bot-success:   #10b981;
	box-sizing: border-box;
}
.dmhub-aibot-fab *,
.dmhub-aibot-panel * { box-sizing: border-box; }

/* ════ FAB botao bottom-center ════════════════════════════════════════════ */
.dmhub-aibot-fab {
	--dm-fab-bottom: 22px;
	position: fixed;
	bottom: var( --dm-fab-bottom );
	left: 50%;
	transform: translateX(-50%);
	/* z-index alto: FAB precisa ficar acima de tudo na pagina (headers
	   sticky, sticky cart bars, popups). Sidecarts costumam usar
	   z-index 999999+, mas em vez de confiar so' no z-index, esconder
	   via JS (isSideCartOpen) quando drawer aberto — mais robusto pra
	   temas que usam z-index baixo no drawer. */
	z-index: 99996;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 22px 12px 18px;
	background: var(--dm-bot-bg);
	color: var(--dm-bot-text);
	border: 1px solid var(--dm-bot-border);
	border-radius: 999px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -.1px;
	cursor: pointer;
	box-shadow: 0 8px 32px rgba(0,0,0,.25), 0 2px 8px rgba(0,0,0,.18);
	transition:
		transform .25s cubic-bezier(.4,0,.2,1),
		opacity   .25s cubic-bezier(.4,0,.2,1),
		bottom    .3s ease,
		box-shadow .18s;
}
.dmhub-aibot-fab--hidden {
	opacity: 0;
	pointer-events: none;
	transform: translateX(-50%) translateY(120%);
}
.dmhub-aibot-fab:hover {
	transform: translateX(-50%) translateY(-2px);
	box-shadow: 0 12px 40px rgba(0,0,0,.32), 0 4px 12px rgba(0,0,0,.22);
}
.dmhub-aibot-fab:active { transform: translateX(-50%) translateY(0); }
.dmhub-aibot-fab__label { line-height: 1; }

/* ════ Orb IA — blob morphing organico estilo Pi/Siri/Gemini ═══════════════
   3 camadas: core (blob com border-radius animado + cores fluidas),
   halo (anel difuso respirando contra-fase), glow (conic spin).
   O effeito de "ser vivo" vem do morphing irregular do border-radius,
   nao de simples scale — sensacao de "esta pensando". */
.dmhub-aibot-orb {
	position: relative;
	width: 24px; height: 24px;
	flex-shrink: 0;
	display: inline-block;
}
.dmhub-aibot-orb__core,
.dmhub-aibot-orb__halo,
.dmhub-aibot-orb__glow {
	position: absolute;
	inset: 0;
	pointer-events: none;
}
/* Core blob: border-radius assimetrico morphing + gradient deslizando.
   Cores vibrantes IA: cyan -> violeta -> azul royal. */
.dmhub-aibot-orb__core {
	inset: 3px;
	background: linear-gradient(135deg,
		#22d3ee 0%,    /* cyan-400 */
		#3b82f6 35%,   /* blue-500 */
		#8b5cf6 70%,   /* violet-500 */
		#22d3ee 100%); /* loop */
	background-size: 200% 200%;
	box-shadow:
		inset 0 0 6px rgba(255,255,255,0.45),
		0 0 12px rgba(59,130,246,0.65);
	border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%;
	animation:
		dmhub-orb-morph 4s ease-in-out infinite,
		dmhub-orb-shift 5s ease-in-out infinite;
}
/* Halo: respira contra-fase do morph, da' o "pulso vital" */
.dmhub-aibot-orb__halo {
	border-radius: 50%;
	background: radial-gradient(circle,
		rgba(96,165,250,0.55) 0%,
		rgba(139,92,246,0.20) 45%,
		transparent 70%);
	filter: blur(3px);
	animation: dmhub-orb-halo 2.8s ease-in-out infinite;
}
/* Glow conico girando lentamente — cor de aura */
.dmhub-aibot-orb__glow {
	inset: -3px;
	border-radius: 50%;
	background: conic-gradient(from 0deg,
		rgba(34,211,238,0.75),
		rgba(139,92,246,0.55),
		rgba(59,130,246,0.65),
		rgba(34,211,238,0.75));
	filter: blur(5px);
	opacity: .75;
	animation: dmhub-orb-spin 6s linear infinite;
	z-index: -1;
}

/* Morph: border-radius muda continuamente — blob organico */
@keyframes dmhub-orb-morph {
	0%   { border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%; transform: rotate(0deg)   scale(1);    }
	25%  { border-radius: 40% 60% 60% 40% / 60% 40% 60% 40%; transform: rotate(90deg)  scale(1.02); }
	50%  { border-radius: 50% 50% 40% 60% / 40% 60% 50% 60%; transform: rotate(180deg) scale(0.96); }
	75%  { border-radius: 60% 40% 50% 50% / 50% 40% 60% 50%; transform: rotate(270deg) scale(1.01); }
	100% { border-radius: 60% 40% 50% 50% / 50% 60% 40% 50%; transform: rotate(360deg) scale(1);    }
}
/* Shift: gradient se move pelo blob, parece liquido fluindo */
@keyframes dmhub-orb-shift {
	0%, 100% { background-position: 0% 50%; }
	50%      { background-position: 100% 50%; }
}
@keyframes dmhub-orb-halo {
	0%, 100% { transform: scale(0.82); opacity: 0.45; }
	50%      { transform: scale(1.22); opacity: 0.95; }
}
@keyframes dmhub-orb-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.dmhub-aibot-orb__core,
	.dmhub-aibot-orb__halo,
	.dmhub-aibot-orb__glow { animation: none !important; }
}

@media (max-width: 480px) {
	.dmhub-aibot-fab { padding: 11px 18px 11px 14px; font-size: 13px; }
}

/* ════ Overlay full-screen com blur do site ═══════════════════════════════ */
.dmhub-aibot-overlay {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	/* iOS Safari/Chrome mobile: 100vh inclui address bar, escondendo
	   conteudo no rodape quando barra aparece. dvh = dynamic viewport
	   height que ajusta. Suportado iOS 15.4+, Android Chrome 108+. */
	height: 100dvh !important;
	max-width: none !important;
	max-height: none !important;
	/* z-index abaixo do sidecart tipico (99999+) pra que o drawer
	   apareça por cima quando user adiciona ao carrinho dentro do bot.
	   Mesmo level do viewer de Stories (99998) — so' um abre por vez. */
	z-index: 99998;
	background: rgba(8, 8, 12, 0.55);
	backdrop-filter: blur(24px) saturate(140%);
	-webkit-backdrop-filter: blur(24px) saturate(140%);
	opacity: 0;
	pointer-events: none;
	transition: opacity .25s ease;
	display: flex;
	flex-direction: column;
	margin: 0 !important;
	padding: 0 !important;
	box-sizing: border-box;
}
.dmhub-aibot-overlay.is-open {
	opacity: 1;
	pointer-events: auto;
}
html.dmhub-aibot-locked, body.dmhub-aibot-locked { overflow: hidden !important; }
/* Esconde FAB enquanto panel do bot aberto (panel cobre viewport
   com z-index 99998; sem display:none o FAB peek atras nao,
   mas mantem por seguranca em caso de scroll/transform).
   Hide adicional do FAB quando viewer Stories aberto e' feito em
   dmhub-social-proof.css. */
body.dmhub-aibot-locked .dmhub-aibot-fab { display: none !important; }

.dmhub-aibot-panel {
	position: relative;
	flex: 1 1 auto;
	width: 100%;
	height: 100%;
	min-height: 0; /* CRITICAL: permite overflow no filho .dmhub-aibot-messages */
	max-width: none !important;
	display: flex;
	flex-direction: column;
	background: rgba(10, 10, 12, 0.78);
	color: var(--dm-bot-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.55;
	overflow: hidden;
	margin: 0 !important;
	padding: 0;
}

/* ════ Topbar ═════════════════════════════════════════════════════════════ */
.dmhub-aibot-topbar {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 16px 22px;
	flex-shrink: 0;
}
.dmhub-aibot-topbar__spacer { flex: 1; }
.dmhub-aibot-icon-btn {
	width: 44px; height: 44px;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	border: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 28px;
	font-weight: 300;
	line-height: 1;
	padding: 0;
	transition: opacity .15s, transform .12s;
	opacity: .85;
}
.dmhub-aibot-icon-btn:hover { opacity: 1; }
.dmhub-aibot-icon-btn:active { transform: scale(.92); }
.dmhub-aibot-icon-btn--close { font-size: 32px; }

/* Menu dropdown — estilo CtrlMIND com 3 zonas: links, reset box, disclaimer */
.dmhub-aibot-menu {
	position: absolute;
	top: 70px;
	right: 22px;
	background: var(--dm-bot-bg-2);
	border: 1px solid var(--dm-bot-border);
	border-radius: 16px;
	padding: 8px;
	min-width: 280px;
	max-width: 360px;
	display: none;
	box-shadow: 0 18px 48px rgba(0,0,0,.5);
	z-index: 10;
}
.dmhub-aibot-menu.is-open { display: block; }

/* Itens de link externo (Termos, Privacidade) */
.dmhub-aibot-menu-link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 14px;
	color: var(--dm-bot-text);
	text-decoration: none;
	border-radius: 10px;
	font-size: 14px;
	transition: background .15s;
}
.dmhub-aibot-menu-link:hover { background: var(--dm-bot-bg-3); color: var(--dm-bot-text); }
.dmhub-aibot-menu-link__icon { font-size: 16px; flex-shrink: 0; }
.dmhub-aibot-menu-link__label { flex: 1; font-weight: 500; }
.dmhub-aibot-menu-link__chevron {
	font-size: 20px;
	color: var(--dm-bot-muted);
	line-height: 1;
}

/* Box de reset chat */
.dmhub-aibot-menu-reset {
	margin: 8px 0 0;
	padding: 16px 14px 14px;
	background: rgba(255,255,255,0.04);
	border: 1px solid var(--dm-bot-border);
	border-radius: 12px;
	text-align: center;
}
.dmhub-aibot-menu-reset__title {
	font-size: 14px;
	font-weight: 600;
	color: var(--dm-bot-text);
	margin-bottom: 6px;
}
.dmhub-aibot-menu-reset__sub {
	font-size: 12px;
	color: var(--dm-bot-muted);
	line-height: 1.5;
	margin-bottom: 12px;
}
.dmhub-aibot-menu-reset__btn {
	display: block;
	width: 100%;
	padding: 11px 14px;
	background: var(--dm-bot-text);
	color: var(--dm-bot-bg);
	border: 0;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .15s;
}
.dmhub-aibot-menu-reset__btn:hover { opacity: .9; }

/* Disclaimer no rodape */
.dmhub-aibot-menu-disclaimer {
	padding: 12px 14px 6px;
	font-size: 11px;
	color: var(--dm-bot-muted);
	text-align: center;
	line-height: 1.5;
}

/* ════ Messages area ══════════════════════════════════════════════════════ */
.dmhub-aibot-messages {
	flex: 1;
	overflow-y: auto;
	padding: 0 22px 24px;
	scroll-behavior: smooth;
}
.dmhub-aibot-messages::-webkit-scrollbar { width: 8px; }
.dmhub-aibot-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 8px; }

.dmhub-aibot-welcome {
	padding: 14vh 0 40px;
	max-width: 820px;
	margin: 0 auto;
}
.dmhub-aibot-welcome__wave { font-size: 56px; margin-bottom: 22px; line-height: 1; }
.dmhub-aibot-welcome__title {
	margin: 0 0 14px;
	font-size: 52px;
	font-weight: 700;
	letter-spacing: -1.2px;
	line-height: 1.05;
	color: var(--dm-bot-text);
}
.dmhub-aibot-welcome__sub {
	margin: 0;
	font-size: 19px;
	color: var(--dm-bot-muted);
	line-height: 1.5;
}
@media (max-width: 640px) {
	.dmhub-aibot-welcome__title { font-size: 32px; letter-spacing: -.6px; }
	.dmhub-aibot-welcome__sub { font-size: 15px; }
	.dmhub-aibot-welcome { padding: 8vh 0 24px; }
}

.dmhub-aibot-msg {
	max-width: 760px;
	margin: 0 auto 16px;
}
.dmhub-aibot-msg--user {
	display: flex;
	justify-content: flex-end;
}
.dmhub-aibot-msg--user .dmhub-aibot-bubble {
	background: var(--dm-bot-bg-2);
	color: var(--dm-bot-text);
	padding: 10px 16px;
	border-radius: 18px;
	max-width: 75%;
	word-wrap: break-word;
}
.dmhub-aibot-msg--bot .dmhub-aibot-bot-body {
	color: var(--dm-bot-text);
	line-height: 1.65;
}
.dmhub-aibot-text { margin-bottom: 12px; }
.dmhub-aibot-text:last-child { margin-bottom: 0; }
.dmhub-aibot-text a { color: #93c5fd; text-decoration: underline; }
.dmhub-aibot-text strong { color: #fff; font-weight: 600; }

/* Typing dots */
.dmhub-aibot-typing {
	display: inline-flex;
	gap: 4px;
	padding: 8px 0;
}
.dmhub-aibot-typing span {
	width: 7px; height: 7px;
	background: var(--dm-bot-muted);
	border-radius: 50%;
	animation: dmhub-typing 1.2s infinite;
}
.dmhub-aibot-typing span:nth-child(2) { animation-delay: .2s; }
.dmhub-aibot-typing span:nth-child(3) { animation-delay: .4s; }
@keyframes dmhub-typing {
	0%, 60%, 100% { opacity: .25; transform: translateY(0); }
	30%           { opacity: 1;   transform: translateY(-3px); }
}

/* ════ Product cards ══════════════════════════════════════════════════════ */
/* Carrossel wrapper: posiciona setas + scroll track. Setas absolutas no
   wrapper (desktop only); swipe nativo no mobile via touch + scroll-snap. */
.dmhub-aibot-carousel {
	position: relative;
	margin: 12px 0;
}
.dmhub-aibot-carousel__nav {
	display: none; /* hidden por default; desktop media query abaixo liga */
	position: absolute;
	top: 38%; /* alinha com a imagem (head ocupa 60% do card) */
	transform: translateY(-50%);
	width: 42px; height: 42px;
	border-radius: 50%;
	background: rgba(20,20,24,0.92);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	border: 1px solid rgba(255,255,255,0.12);
	color: #fff;
	cursor: pointer;
	align-items: center;
	justify-content: center;
	z-index: 5;
	padding: 0;
	box-shadow: 0 6px 18px rgba(0,0,0,0.35);
	transition: opacity .18s ease, transform .12s ease;
	opacity: 1;
}
.dmhub-aibot-carousel__nav:hover {
	transform: translateY(-50%) scale(1.06);
	background: rgba(30,30,36,1);
}
.dmhub-aibot-carousel__nav:active { transform: translateY(-50%) scale(0.97); }
.dmhub-aibot-carousel__nav.is-hidden {
	opacity: 0;
	pointer-events: none;
}
.dmhub-aibot-carousel__nav svg { width: 22px; height: 22px; }
.dmhub-aibot-carousel__nav--prev { left: -6px; }
.dmhub-aibot-carousel__nav--next { right: -6px; }
@media (min-width: 641px) {
	.dmhub-aibot-carousel__nav { display: inline-flex; }
}

/* Scroll-snap pra swipe suave no mobile + scroll-x no desktop. */
.dmhub-aibot-products-row {
	display: flex;
	gap: 12px;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-padding-left: 0;
	-webkit-overflow-scrolling: touch;
	padding: 4px 4px 18px 0;
	margin: 0; /* wrapper .dmhub-aibot-carousel cuida do margin */
	scrollbar-width: thin;
	scrollbar-color: rgba(255,255,255,0.18) transparent;
}
.dmhub-aibot-products-row::-webkit-scrollbar { height: 6px; }
.dmhub-aibot-products-row::-webkit-scrollbar-track { background: transparent; }
.dmhub-aibot-products-row::-webkit-scrollbar-thumb {
	background: rgba(255,255,255,0.18);
	border-radius: 999px;
}
.dmhub-aibot-products-row .dmhub-aibot-product-card {
	flex: 0 0 280px;
	max-width: 280px;
	scroll-snap-align: start;
	margin: 0;
}
@media (max-width: 640px) {
	.dmhub-aibot-products-row .dmhub-aibot-product-card {
		flex: 0 0 84%;
		max-width: 84%;
	}
}

.dmhub-aibot-product-card {
	background: var(--dm-bot-bg-2);
	border: 1px solid var(--dm-bot-border);
	border-radius: 16px;
	overflow: hidden;
	margin: 12px 0;
	max-width: 340px;
	transition: transform .15s, border-color .15s;
}
.dmhub-aibot-product-card:hover {
	transform: translateY(-2px);
	border-color: rgba(255,255,255,0.18);
}
.dmhub-aibot-product-card__head {
	aspect-ratio: 1 / 1; /* quadrada, sem corte (object-fit: contain) */
	background: var(--dm-bot-bg-3);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 8px;
}
.dmhub-aibot-product-card__img {
	width: 100%;
	height: 100%;
	object-fit: contain; /* respeita proporcao original */
	display: block;
}
.dmhub-aibot-product-card__head--no-img {
	background: linear-gradient(135deg, #1f1f1f 0%, #2a2a2a 100%);
}
/* Card vira coluna flex pra alinhar botao "Adicionar" no rodape */
.dmhub-aibot-product-card {
	display: flex;
	flex-direction: column;
}
.dmhub-aibot-product-card__body {
	padding: 14px 16px 16px;
	display: flex;
	flex-direction: column;
	flex: 1 1 auto; /* ocupa o restante do card */
}
.dmhub-aibot-product-card__title {
	font-size: 15px;
	font-weight: 600;
	color: var(--dm-bot-text);
	line-height: 1.3;
	margin-bottom: 4px;
	min-height: 2.6em; /* 2 linhas — alinha cards de titulo curto/longo */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	text-decoration: none;
}
.dmhub-aibot-product-card__title:hover {
	text-decoration: underline;
	color: var(--dm-bot-text);
}
.dmhub-aibot-product-card__actions {
	margin-top: auto; /* empurra pro rodape do card */
}
.dmhub-aibot-product-card__desc {
	font-size: 12px;
	color: var(--dm-bot-muted);
	margin-bottom: 8px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.dmhub-aibot-product-card__price {
	font-size: 15px;
	font-weight: 600;
	color: var(--dm-bot-text);
	margin-bottom: 10px;
}
.dmhub-aibot-product-card__price-block {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px;
	margin: 6px 0 4px;
}
.dmhub-aibot-product-card__price-regular {
	font-size: 12px;
	color: var(--dm-bot-muted);
	text-decoration: line-through;
}
.dmhub-aibot-product-card__price-current {
	font-size: 17px;
	font-weight: 700;
	color: var(--dm-bot-text);
	letter-spacing: -.3px;
}
.dmhub-aibot-product-card__meta {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 11.5px;
	color: var(--dm-bot-muted);
	margin: 4px 0;
	line-height: 1.4;
}
.dmhub-aibot-product-card__meta strong {
	color: var(--dm-bot-text);
	font-weight: 600;
}
.dmhub-aibot-product-card__meta-icon {
	font-size: 13px;
	flex-shrink: 0;
}
.dmhub-aibot-product-card__meta--pix strong {
	color: #34d399;
}
/* Espaco entre bloco de price e actions */
.dmhub-aibot-product-card__meta + .dmhub-aibot-product-card__actions,
.dmhub-aibot-product-card__price-block + .dmhub-aibot-product-card__actions {
	margin-top: 12px;
}
.dmhub-aibot-product-card__actions {
	display: flex;
	gap: 8px;
	align-items: center;
}
.dmhub-aibot-product-card__view {
	width: 36px; height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--dm-bot-bg-3);
	border: 1px solid var(--dm-bot-border);
	color: var(--dm-bot-text);
	border-radius: 8px;
	font-size: 14px;
	text-decoration: none;
}
.dmhub-aibot-product-card__view:hover { background: var(--dm-bot-bg); }
.dmhub-aibot-product-card__add {
	flex: 1;
	padding: 10px 16px;
	background: var(--dm-bot-text);
	color: var(--dm-bot-bg);
	border: 0;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: opacity .15s;
}
.dmhub-aibot-product-card__add:hover { opacity: .88; }
.dmhub-aibot-product-card__add:disabled { opacity: .55; cursor: default; }
.dmhub-aibot-product-card__add.is-added {
	background: var(--dm-bot-success);
	color: #fff;
}

.dmhub-aibot-cart-confirm {
	padding: 10px 14px;
	background: rgba(16,185,129,0.10);
	border: 1px solid rgba(16,185,129,0.35);
	color: #d1fae5;
	border-radius: 10px;
	font-size: 13px;
	margin: 8px 0 0;
}

/* ════ Input row ══════════════════════════════════════════════════════════ */
.dmhub-aibot-input-row {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 14px 22px 22px;
	max-width: 760px;
	width: 100%;
	margin: 0 auto;
	background: transparent; /* panel ja' tem o fundo com blur */
	flex-shrink: 0;
}
/* Wrapper relativo pra ancorar a orb DENTRO do input field */
.dmhub-aibot-input-wrap {
	position: relative;
	flex: 1;
	display: flex;
	align-items: center;
}
.dmhub-aibot-orb--input {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 22px; height: 22px;
	z-index: 2;
	pointer-events: none;
}

/* Mic button — Web Speech API. Hidden em Firefox (sem suporte). */
.dmhub-aibot-mic {
	position: absolute;
	right: 8px;
	top: 50%;
	transform: translateY(-50%);
	width: 40px; height: 40px;
	background: transparent;
	border: 0;
	color: var(--dm-bot-muted, #a1a1aa);
	cursor: pointer;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background .15s, color .15s;
	z-index: 2;
}
.dmhub-aibot-mic:hover {
	color: #fff;
	background: rgba(255,255,255,0.06);
}
.dmhub-aibot-mic[hidden] { display: none !important; }
.dmhub-aibot-mic svg { width: 20px; height: 20px; display: block; }
/* Gravando: pulse vermelho */
.dmhub-aibot-mic.is-recording {
	color: #ef4444;
	background: rgba(239,68,68,0.10);
}
.dmhub-aibot-mic.is-recording::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: 50%;
	box-shadow: 0 0 0 0 rgba(239,68,68,0.45);
	animation: dmhub-mic-pulse 1.4s ease-out infinite;
	pointer-events: none;
}
@keyframes dmhub-mic-pulse {
	0%   { box-shadow: 0 0 0 0   rgba(239,68,68,0.5);  }
	70%  { box-shadow: 0 0 0 12px rgba(239,68,68,0);   }
	100% { box-shadow: 0 0 0 0   rgba(239,68,68,0);   }
}

.dmhub-aibot-input,
.dmhub-aibot-input:focus,
.dmhub-aibot-input:focus-visible,
.dmhub-aibot-input:active,
.dmhub-aibot-input:hover {
	flex: 1;
	width: 100%;
	height: 56px;
	padding: 0 56px 0 46px; /* left pra orb + right pra mic */
	background: var(--dm-bot-bg-2);
	color: var(--dm-bot-text);
	border: 1px solid var(--dm-bot-border);
	border-radius: 999px !important; /* blinda contra reset do tema em :focus */
	font-size: 15px;
	outline: none !important;
	box-shadow: none !important;
	font-family: inherit;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}
.dmhub-aibot-input::placeholder { color: var(--dm-bot-muted); opacity: 1; }
.dmhub-aibot-input:focus,
.dmhub-aibot-input:focus-visible {
	border-color: rgba(255,255,255,0.25);
}
.dmhub-aibot-send {
	width: 56px; height: 56px;
	border-radius: 50%;
	background: linear-gradient(135deg, #ffffff 0%, #d8d8d8 100%);
	color: #0a0a0a;
	border: 0;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	flex-shrink: 0;
	box-shadow: 0 6px 18px rgba(255,255,255,0.15), inset 0 1px 0 rgba(255,255,255,0.6);
	transition: transform .15s ease, box-shadow .15s ease, opacity .15s;
}
.dmhub-aibot-send:hover:not(:disabled) {
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(255,255,255,0.22), inset 0 1px 0 rgba(255,255,255,0.7);
}
.dmhub-aibot-send:active:not(:disabled) {
	transform: translateY(0);
}
.dmhub-aibot-send:disabled { opacity: .4; cursor: default; }
.dmhub-aibot-send svg { width: 22px; height: 22px; display: block; }

.dmhub-aibot-cart-btn {
	position: relative;
	width: 56px; height: 56px;
	border-radius: 50%;
	background: var(--dm-bot-bg-2);
	color: var(--dm-bot-text);
	border: 1px solid var(--dm-bot-border);
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	flex-shrink: 0;
	transition: background .15s;
}
.dmhub-aibot-cart-btn:hover { background: var(--dm-bot-bg-3); }
.dmhub-aibot-cart-btn { color: #fff; }
.dmhub-aibot-cart-btn svg,
.dmhub-aibot-cart-btn img { width: 24px; height: 24px; display: block; pointer-events: none; }
/* Forca branco no icone clonado do tema (que pode ter fill/stroke preto
   hardcoded). !important porque o SVG do tema pode trazer cores inline. */
.dmhub-aibot-cart-btn svg,
.dmhub-aibot-cart-btn svg * {
	color: #fff !important;
}
.dmhub-aibot-cart-btn svg[fill]:not([fill="none"]),
.dmhub-aibot-cart-btn svg [fill]:not([fill="none"]) {
	fill: #fff !important;
}
.dmhub-aibot-cart-btn svg:not([fill]),
.dmhub-aibot-cart-btn svg path:not([fill]),
.dmhub-aibot-cart-btn svg circle:not([fill]),
.dmhub-aibot-cart-btn svg rect:not([fill]) {
	fill: currentColor !important;
}
.dmhub-aibot-cart-btn svg[stroke]:not([stroke="none"]),
.dmhub-aibot-cart-btn svg [stroke]:not([stroke="none"]) {
	stroke: #fff !important;
}
/* Icone via <img>: truque classico que pinta a imagem inteira de branco */
.dmhub-aibot-cart-btn img {
	filter: brightness(0) invert(1);
}
/* Cart bar — CTA "Finalizar compra" aparece SO' quando cart > 0,
   acima do input. Slim bar gradient pra chamar atencao sem dominar. */
.dmhub-aibot-cart-bar {
	max-width: 760px;
	width: 100%;
	margin: 0 auto;
	padding: 10px 22px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: linear-gradient(90deg,
		rgba(34,211,238,0.10),
		rgba(59,130,246,0.10),
		rgba(139,92,246,0.10));
	border-top: 1px solid rgba(96,165,250,0.18);
	border-bottom: 1px solid rgba(96,165,250,0.10);
	flex-shrink: 0;
	animation: dmhub-cart-bar-in .25s ease-out;
}
.dmhub-aibot-cart-bar[hidden] { display: none !important; }
@keyframes dmhub-cart-bar-in {
	from { opacity: 0; transform: translateY(8px); }
	to   { opacity: 1; transform: translateY(0); }
}
.dmhub-aibot-cart-bar__info {
	display: flex;
	align-items: center;
	gap: 8px;
	color: var(--dm-bot-text);
	font-size: 13px;
	font-weight: 500;
	min-width: 0;
	flex: 1;
}
.dmhub-aibot-cart-bar__icon { font-size: 16px; }
.dmhub-aibot-cart-bar__text {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}
.dmhub-aibot-cart-bar__cta {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 9px 16px;
	background: linear-gradient(135deg, #22d3ee 0%, #3b82f6 50%, #8b5cf6 100%);
	color: #fff;
	border-radius: 999px;
	font-size: 13px;
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
	transition: transform .15s, box-shadow .15s;
	box-shadow: 0 4px 14px rgba(59,130,246,0.35);
}
.dmhub-aibot-cart-bar__cta:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 18px rgba(59,130,246,0.5);
	color: #fff;
	text-decoration: none;
}
.dmhub-aibot-cart-bar__cta:active { transform: translateY(0); }
@media (max-width: 640px) {
	.dmhub-aibot-cart-bar { padding: 9px 14px; gap: 8px; }
	.dmhub-aibot-cart-bar__info { font-size: 12px; }
	.dmhub-aibot-cart-bar__cta { padding: 8px 14px; font-size: 12px; }
}

/* Aviso pequeno embaixo do input (opt-in via admin) */
.dmhub-aibot-input-disclaimer {
	max-width: 760px;
	width: 100%;
	margin: 0 auto;
	padding: 0 22px;
	/* safe-area-inset garante respiro acima da home indicator no iPhone */
	padding-bottom: max( 18px, env( safe-area-inset-bottom, 18px ) );
	font-size: 11px;
	line-height: 1.45;
	color: var(--dm-bot-muted);
	text-align: center;
	flex-shrink: 0;
}
@media (max-width: 640px) {
	.dmhub-aibot-input-disclaimer {
		padding-left: 14px;
		padding-right: 14px;
		font-size: 10px;
	}
}

.dmhub-aibot-cart-count {
	position: absolute;
	top: -4px; right: -4px;
	min-width: 18px; height: 18px;
	padding: 0 5px;
	background: var(--dm-bot-accent);
	color: #1c1917;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 700;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}
/* UA stylesheet '[hidden]{display:none}' tem mesma especificidade que
   '.dmhub-aibot-cart-count' — regra de autor vence UA, fazendo o
   badge aparecer mesmo com attr hidden. Override explicito esconde. */
.dmhub-aibot-cart-count[hidden] {
	display: none !important;
}

@media (max-width: 640px) {
	.dmhub-aibot-welcome__title { font-size: 24px; }
	.dmhub-aibot-welcome { padding: 30px 0 20px; }
	.dmhub-aibot-messages { padding: 0 14px 16px; }
	/* Mobile: reduz padding-bottom do input-row pq disclaimer ja' tem
	   safe-area-inset abaixo. Senao soma e empurra disclaimer pra fora. */
	.dmhub-aibot-input-row { padding: 10px 14px 8px; }
	.dmhub-aibot-topbar { padding: 12px 14px; }
}
