/**
 * Agência Triagem — Tema 2 «Janela flutuante».
 *
 * Características pedidas:
 *  - sem moldura/bordas: a janela não é um card fechado, são painéis soltos flutuando;
 *  - janela "infinita": a conversa cresce e a página rola (sem scrollbar interna);
 *  - botões grandes (tiles) e composer sempre flutuante ao fundo;
 *  - 100% responsiva (no telemóvel vira ecrã inteiro).
 *
 * Carrega DEPOIS de chat.css e todos os seletores vivem sob
 * `.agt-chat--theme-2` (ou `.agt-app.agt-theme-2`) para não vazar.
 */

/* ============================================================ tokens */
.agt-app.agt-theme-2,
.agt-chat.agt-chat--theme-2 {
	--agt-radius: 28px;
	--agt-radius-sm: 22px;
	--agt-content: 1088px;
	--agt-float: 0 30px 70px -40px rgba(0, 0, 0, 0.9), 0 2px 10px -6px rgba(0, 0, 0, 0.7);
	--agt-glass: rgba(19, 19, 22, 0.72);
	--agt-glass-strong: rgba(19, 19, 22, 0.9);
}

/* ============================================================ página */
.agt-app.agt-theme-2.ms-main {
	background-color: var(--agt-bg);
}

.agt-app.agt-theme-2 .agt-wrap {
	padding: 3rem 1.25rem 0;
	background-color: transparent;
}

/* brilho de fundo mais amplo (a janela é maior) */
.agt-app.agt-theme-2 .agt-wrap::before {
	top: -20rem;
	left: 50%;
	width: 70rem;
	height: 40rem;
	transform: translateX(-50%);
	background: radial-gradient(closest-side, rgba(240, 172, 50, 0.16), transparent 78%);
	filter: blur(120px);
}

.agt-app.agt-theme-2 .agt-wrap::after {
	display: none;
}

.agt-app.agt-theme-2 .agt-hero {
	margin-bottom: 2rem;
}

/* Em interação o hero sai: o atendimento começa no topo da página. */
.agt-app.agt-theme-2.is-chatting .agt-wrap {
	padding-top: 1rem;
}

.agt-app.agt-theme-2.is-chatting .agt-hero {
	display: none;
}

/* ============================================================ janela */
.agt-chat.agt-chat--theme-2 {
	max-width: var(--agt-content);
	overflow: visible;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	isolation: auto;
	padding-bottom: 77px;
}

.agt-chat.agt-chat--theme-2::before {
	display: none;
}

.agt-chat.agt-chat--theme-2 > * {
	position: relative;
	z-index: 1;
}

/* --------------------------------------------------------- topo */
.agt-chat--theme-2 .agt-chat-top {
	position: sticky;
	top: 0.75rem;
	z-index: 20;
	gap: 1.25rem;
	padding: 0.7rem 0.85rem 0.7rem 1.15rem;
	margin: 0 0 1.35rem;
	border: 0;
	border-radius: 999px;
	background-color: var(--agt-glass);
	-webkit-backdrop-filter: blur(18px) saturate(140%);
	backdrop-filter: blur(18px) saturate(140%);
	box-shadow: var(--agt-float);
}

.agt-chat--theme-2 .agt-chat-avatar {
	width: 46px;
	height: 46px;
	border: 0;
	border-radius: 15px;
	background-color: rgba(255, 250, 243, 0.06);
}

.agt-chat--theme-2 .agt-chat-avatar span {
	font-size: 1.15rem;
}

.agt-chat--theme-2 .agt-chat-identity strong {
	font-size: 1rem;
}

.agt-chat--theme-2 .agt-chat-logo {
	max-width: 176px;
	min-height: 46px;
}

.agt-chat--theme-2 .agt-chat-logo img {
	height: 32px;
	max-height: 32px;
	max-width: 176px;
}

.agt-chat--theme-2 .agt-chat-logo--plate {
	padding: 8px 13px;
	border-radius: 14px;
}

.agt-chat--theme-2 .agt-chat-logo--plate img {
	height: 30px;
	max-height: 30px;
}

.agt-chat--theme-2 .agt-chat-switch {
	padding: 0.8rem 1.4rem;
	border: 0;
	background-color: rgba(255, 250, 243, 0.07);
	color: var(--agt-ink);
	font-size: 0.75rem;
	letter-spacing: 0.14em;
}

.agt-chat--theme-2 .agt-chat-switch:hover {
	background-color: rgba(240, 172, 50, 0.16);
	color: var(--agt-amber-soft);
}

/* --------------------------------------------------------- stepper */
.agt-chat--theme-2 .agt-steps {
	gap: 0.75rem;
	padding: 0.6rem;
	margin: 0 0 1.35rem;
	border: 0;
	border-radius: 999px;
	background-color: rgba(255, 250, 243, 0.045);
	box-shadow: inset 0 0 0 1px rgba(255, 250, 243, 0.05);
}

.agt-chat--theme-2 .agt-step {
	gap: 0.6rem;
	padding: 0.6rem 1rem;
	border-radius: 999px;
	font-size: 0.75rem;
	letter-spacing: 0.12em;
	transition: background-color 0.25s ease, color 0.25s ease;
}

.agt-chat--theme-2 .agt-step::after {
	display: none;
}

.agt-chat--theme-2 .agt-step-n {
	width: 28px;
	height: 28px;
	border: 0;
	background-color: rgba(255, 250, 243, 0.08);
	font-size: 0.75rem;
}

.agt-chat--theme-2 .agt-step.is-active {
	background-color: rgba(240, 172, 50, 0.14);
}

.agt-chat--theme-2 .agt-step.is-active .agt-step-n {
	border: 0;
	box-shadow: none;
}

.agt-chat--theme-2 .agt-step.is-done .agt-step-n {
	border: 0;
}

/* --------------------------------------------------------- serviços */
/* Sem caixa: os tiles flutuam directo sobre o fundo (nada de moldura). */
.agt-chat--theme-2 .agt-chat-service {
	padding: 0.5rem 0.25rem 0.75rem;
	border-radius: 0;
	background: none;
	box-shadow: none;
}

.agt-chat--theme-2 .agt-chat-intro {
	max-width: 38rem;
	margin-bottom: 1.75rem;
}

.agt-chat--theme-2 .agt-chat-title {
	font-size: clamp(1.75rem, 4vw, 2.6rem);
	letter-spacing: -0.035em;
}

.agt-chat--theme-2 .agt-chat-lead {
	font-size: 1rem;
}

/* busca grande */
.agt-chat--theme-2 .agt-search {
	margin-bottom: 1.5rem;
}

.agt-chat--theme-2 .agt-search svg {
	left: 1.35rem;
	width: 20px;
	height: 20px;
}

.agt-chat--theme-2 .agt-search input {
	padding: 1.15rem 1.4rem 1.15rem 3.35rem;
	border: 0;
	border-radius: 999px;
	background-color: rgba(255, 250, 243, 0.06);
	font-size: 1rem;
	box-shadow: inset 0 0 0 1px rgba(255, 250, 243, 0.06);
}

.agt-chat--theme-2 .agt-search input:focus {
	box-shadow: 0 0 0 3px rgba(240, 172, 50, 0.22);
}

/* grupos */
.agt-chat--theme-2 .agt-group + .agt-group {
	margin-top: 2rem;
}

.agt-chat--theme-2 .agt-group-title {
	margin-bottom: 0.9rem;
	font-size: 0.72rem;
	color: rgba(255, 250, 243, 0.6);
}

.agt-chat--theme-2 .agt-group-title span {
	min-width: 26px;
	padding: 0.15rem 0.5rem;
	border: 0;
	background-color: rgba(255, 250, 243, 0.08);
	font-size: 0.68rem;
}

/* TILES — 2 colunas no desktop, 1 no telemóvel.
   Visual discreto: vidro fino, ícone âmbar translúcido, texto em caixa
   normal (o uppercase pesado + laranja chapado dava aspeto "grotesco"), e
   no hover o texto MANTÉM-se claro (antes herdava `amber-ink` e sumia). */
.agt-chat--theme-2 .agt-group-grid {
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0.85rem;
}

.agt-chat.agt-chat--theme-2 .agt-pick {
	gap: 0.9rem;
	min-height: 76px;
	padding: 0.85rem 1.15rem 0.85rem 0.85rem;
	border: 0;
	border-radius: 18px;
	background-color: rgba(255, 250, 243, 0.035);
	background-image: none;
	color: var(--agt-ink);
	font-family: var(--agt-font-body);
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: -0.005em;
	text-transform: none;
	box-shadow: inset 0 0 0 1px rgba(255, 250, 243, 0.06);
	transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), background-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.agt-chat.agt-chat--theme-2 .agt-pick:hover {
	transform: translateY(-2px);
	background-color: rgba(240, 172, 50, 0.055);
	background-image: none;
	color: var(--agt-ink);
	box-shadow: inset 0 0 0 1px rgba(240, 172, 50, 0.34), 0 20px 44px -26px rgba(0, 0, 0, 0.95);
}

.agt-chat.agt-chat--theme-2 .agt-pick:active {
	transform: translateY(0);
}

.agt-chat.agt-chat--theme-2 .agt-pick-icon {
	width: 46px;
	height: 46px;
	border: 0;
	border-radius: 14px;
	background-color: rgba(240, 172, 50, 0.1);
	background-image: none;
	color: var(--agt-amber-soft);
	box-shadow: inset 0 0 0 1px rgba(240, 172, 50, 0.16);
	transition: background-color 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}

.agt-chat--theme-2 .agt-pick:hover .agt-pick-icon {
	background-color: rgba(240, 172, 50, 0.16);
	color: var(--agt-amber);
	box-shadow: inset 0 0 0 1px rgba(240, 172, 50, 0.3);
}

/* Imagem do serviço: mantém a caixa neutra (sem o gradiente do ícone). */
.agt-chat.agt-chat--theme-2 .agt-pick-icon--image {
	width: var(--agt-pick-img-size, 46px);
	height: var(--agt-pick-img-size, 46px);
	background-color: rgba(255, 250, 243, 0.04);
	background-image: none;
	box-shadow: inset 0 0 0 1px rgba(255, 250, 243, 0.08);
}

.agt-chat--theme-2 .agt-pick:hover .agt-pick-icon--image {
	background-color: rgba(255, 250, 243, 0.07);
	box-shadow: inset 0 0 0 1px rgba(240, 172, 50, 0.32);
}

.agt-chat--theme-2 .agt-pick-icon .dashicons {
	width: 21px;
	height: 21px;
	font-size: 21px;
	line-height: 21px;
}

.agt-chat--theme-2 .agt-pick-name {
	font-size: 0.9375rem;
	font-weight: 500;
	line-height: 1.35;
	letter-spacing: -0.005em;
}

.agt-chat--theme-2 .agt-pick-go {
	flex: 0 0 auto;
	color: rgba(255, 250, 243, 0.22);
	font-size: 1rem;
	transition: transform 0.25s ease, color 0.25s ease;
}

.agt-chat--theme-2 .agt-pick:hover .agt-pick-go {
	transform: translateX(3px);
	color: var(--agt-amber);
}

/* --------------------------------------------------------- conversa (infinita) */
.agt-chat--theme-2 .agt-chat-log {
	max-height: none;
	padding: 0 0.25rem;
	overflow: visible;
	scrollbar-width: none;
	gap: 0.85rem;
}

.agt-chat--theme-2 .agt-chat-log::-webkit-scrollbar {
	display: none;
}

.agt-chat--theme-2 .agt-bubble {
	max-width: min(42rem, 88%);
	padding: 1rem 1.35rem;
	border-radius: 24px;
	font-size: 0.9375rem;
	line-height: 1.6;
}

.agt-chat--theme-2 .agt-bubble-assistant {
	border: 0;
	border-bottom-left-radius: 8px;
	background-color: rgba(255, 250, 243, 0.01);
	box-shadow: inset 0 0 0 1px rgba(255, 250, 243, 0.00);
}

.agt-chat--theme-2 .agt-bubble-user {
	border-bottom-right-radius: 8px;
	box-shadow: 0 18px 36px -22px rgba(240, 172, 50, 0.8);
}

/* --------------------------------------------------------- sugestões */
.agt-chat--theme-2 .agt-chat-suggestions {
	gap: 0.55rem;
	padding: 1.1rem 0.25rem 0;
}

.agt-chat--theme-2 .agt-chip {
	padding: 0.7rem 1.15rem;
	border: 0;
	border-radius: 999px;
	background-color: rgba(240, 172, 50, 0.14);
	font-size: 0.8125rem;
	color: var(--agt-amber-soft);
}

.agt-chat--theme-2 .agt-chip:hover {
	background-color: rgba(240, 172, 50, 0.24);
}

/* --------------------------------------------------------- composer flutuante */
.agt-chat--theme-2 .agt-chat-form {
	position: sticky;
	bottom: 0;
	z-index: 15;
	margin: 1.35rem 0 0;
	padding: 1.15rem 1.25rem 1.35rem;
	border-radius: 32px;
	background-color: rgb(19 19 22 / 25%);;
	-webkit-backdrop-filter: blur(20px) saturate(140%);
	/* backdrop-filter: blur(20px) saturate(140%);
	box-shadow: 0 -18px 40px -30px rgba(0, 0, 0, 0.9), inset 0 0 0 1px rgba(255, 250, 243, 0.06); */
}

.agt-chat--theme-2 .agt-contact-head {
	margin-bottom: 0.9rem;
}

.agt-chat--theme-2 .agt-contact-switch {
	padding: 4px;
	background-color: rgba(255, 250, 243, 0.08);
	box-shadow: none;
}

.agt-chat--theme-2 .agt-contact .agt-contact-opt {
	padding: 0.6rem 1.25rem;
	font-size: 0.75rem;
}

.agt-chat--theme-2 .agt-contact .agt-contact-opt.is-active {
	background-image: linear-gradient(135deg, var(--agt-amber-soft) 0%, var(--agt-amber) 52%, var(--agt-amber-deep) 100%);
	color: var(--agt-amber-ink);
}

.agt-chat--theme-2 .agt-contact-known {
	padding: 0.85rem 1.15rem;
	border-radius: 18px;
	font-size: 0.875rem;
}

.agt-chat--theme-2 .agt-email > span {
	margin-bottom: 0.45rem;
	font-size: 0.6875rem;
	color: rgba(255, 250, 243, 0.55);
}

.agt-chat--theme-2 .agt-email input {
	padding: 1rem 1.25rem;
	border: 0;
	border-radius: 18px;
	background-color: rgba(255, 250, 243, 0.06);
	font-size: 0.9375rem;
	box-shadow: inset 0 0 0 1px rgba(255, 250, 243, 0.06);
}

.agt-chat--theme-2 .agt-email input:focus {
	box-shadow: 0 0 0 3px rgba(240, 172, 50, 0.2);
}

.agt-chat--theme-2 .agt-composer {
	gap: 0.75rem;
	padding: 0.5rem 0.55rem 0.5rem 1.15rem;
	border: 0;
	border-radius: 999px;
	background-color: rgba(255, 250, 243, 0.07);
	box-shadow: inset 0 0 0 1px rgba(255, 250, 243, 0.07);
}

.agt-chat--theme-2 .agt-composer:focus-within {
	box-shadow: 0 0 0 3px rgba(240, 172, 50, 0.22);
}

.agt-chat--theme-2 .agt-composer textarea {
	min-height: 54px;
	max-height: 220px;
	padding: 0.95rem 0;
	font-size: 1rem;
}

.agt-chat--theme-2 .agt-attach {
	width: 44px;
	height: 54px;
}

.agt-chat--theme-2 .agt-attach svg {
	width: 22px;
	height: 22px;
}

.agt-chat--theme-2 .agt-send {
	width: 56px;
	height: 56px;
	box-shadow: 0 16px 32px -16px rgba(240, 172, 50, 0.95);
}

.agt-chat--theme-2 .agt-send svg {
	width: 22px;
	height: 22px;
}

/* --------------------------------------------------------- resumo */
.agt-chat--theme-2 .agt-summary {
	margin-top: 1.35rem;
	padding: 1.75rem;
	border: 0;
	border-radius: 32px;
	background-color: rgba(255, 250, 243, 0.045);
	box-shadow: inset 0 0 0 1px rgba(255, 250, 243, 0.06);
}

.agt-chat--theme-2 .agt-summary h3 {
	font-size: 1.25rem;
}

.agt-chat--theme-2 .agt-summary pre {
	padding: 1.25rem;
	border: 0;
	border-radius: 22px;
	background-color: rgba(0, 0, 0, 0.28);
	font-size: 0.875rem;
}

.agt-chat--theme-2 .agt-confirm,
.agt-chat--theme-2 .agt-edit,
.agt-chat--theme-2 .agt-accept,
.agt-chat--theme-2 .agt-decline {
	padding: 1rem 1.75rem;
	font-size: 0.75rem;
	line-height: 1.2;
	letter-spacing: 0.12em;
}

/* ================================================================ mobile */
@media (max-width: 900px) {
	.agt-chat--theme-2 .agt-group-grid {
		grid-template-columns: 1fr;
	}

	.agt-chat--theme-2 .agt-chat-service {
		padding: 1.75rem 1.1rem 1.25rem;
		border-radius: 26px;
	}

	/* no telemóvel a janela ocupa o ecrã inteiro */
	.agt-app.agt-theme-2 .agt-wrap {
		padding: 0;
	}

	.agt-app.agt-theme-2 .agt-inner {
		padding: 0 0.75rem calc(1rem + env(safe-area-inset-bottom));
	}

	.agt-chat--theme-2 .agt-chat-top {
		top: 0;
		margin: 0 -0.75rem 0.9rem;
		padding: 0.6rem 0.75rem;
		border-radius: 0 0 22px 22px;
		gap: 0.6rem;
	}

	/* No telemóvel a barra fica só com o logo e o botão. */
	.agt-chat--theme-2 .agt-chat-identity-text {
		display: none;
	}

	.agt-chat--theme-2 .agt-chat-logo {
		max-width: 120px;
	}

	.agt-chat--theme-2 .agt-chat-logo img,
	.agt-chat--theme-2 .agt-chat-logo--plate img {
		height: 24px;
		max-height: 24px;
		max-width: 120px;
	}

	.agt-chat--theme-2 .agt-chat-switch {
		flex: 0 0 auto;
		padding: 0.7rem 1rem;
		font-size: 0.6875rem;
		letter-spacing: 0.1em;
		white-space: nowrap;
	}

	.agt-chat--theme-2 .agt-chat-avatar {
		width: 40px;
		height: 40px;
		border-radius: 13px;
	}

	.agt-chat--theme-2 .agt-steps {
		gap: 0.35rem;
		margin-bottom: 0.9rem;
		border-radius: 999px;
	}

	.agt-chat--theme-2 .agt-step {
		justify-content: center;
		padding: 0.45rem 0.35rem;
	}

	.agt-chat--theme-2 .agt-step span:not(.agt-step-n) {
		display: none;
	}

	.agt-chat--theme-2 .agt-bubble {
		max-width: 94%;
	}

	.agt-chat--theme-2 .agt-chat-form {
		margin: 0 -0.75rem;
		padding: 0.9rem 0.75rem calc(0.9rem + env(safe-area-inset-bottom));
		border-radius: 26px 26px 0 0;
	}

	.agt-chat--theme-2 .agt-send {
		width: 50px;
		height: 50px;
	}

	.agt-chat--theme-2 .agt-summary {
		padding: 1.25rem 1.1rem;
		border-radius: 26px;
	}
}

@media (max-width: 420px) {
	.agt-chat--theme-2 .agt-pick-icon {
		width: 42px;
		height: 42px;
		border-radius: 13px;
	}

	.agt-chat--theme-2 .agt-pick-icon .dashicons {
		width: 19px;
		height: 19px;
		font-size: 19px;
		line-height: 19px;
	}

	.agt-chat--theme-2 .agt-pick {
		padding: 0.8rem 0.95rem 0.8rem 0.8rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.agt-chat--theme-2 .agt-pick,
	.agt-chat--theme-2 .agt-send {
		transition: none;
	}
}
