/**
 * Timbragem de logo — ferramenta local do atendimento.
 */

.agt-chat .agt-timb {
	margin-top: 1.4rem;
	padding: clamp(1rem, 2.4vw, 1.6rem);
	border: 1px solid var(--agt-line);
	border-radius: var(--agt-radius-sm);
	background:
		radial-gradient(120% 140% at 0% 0%, rgba(240, 172, 50, 0.09), transparent 55%),
		var(--agt-card-2);
	color: var(--agt-ink);
	font-family: var(--agt-font-body);
}

.agt-chat .agt-timb-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1rem;
	margin-bottom: 1.1rem;
}

.agt-chat .agt-timb-kicker {
	margin: 0 0 0.2rem;
	color: var(--agt-amber-soft);
	font-family: var(--agt-font-display);
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.agt-chat .agt-timb-title {
	margin: 0;
	font-family: var(--agt-font-display);
	font-size: clamp(1.15rem, 2.6vw, 1.45rem);
	font-weight: 750;
	letter-spacing: -0.02em;
}

.agt-chat .agt-timb-lead {
	margin: 0.35rem 0 0;
	max-width: 60ch;
	color: var(--agt-muted);
	font-size: 0.86rem;
	line-height: 1.55;
}

.agt-chat .agt-timb-pill {
	flex: 0 0 auto;
	padding: 0.28rem 0.6rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: var(--agt-radius-pill);
	background: rgba(255, 250, 243, 0.04);
	color: var(--agt-muted);
	font-size: 0.66rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.agt-chat .agt-timb-pill.is-ready {
	border-color: rgba(72, 199, 142, 0.45);
	background: rgba(72, 199, 142, 0.12);
	color: #8ee7bd;
}

.agt-chat .agt-timb-error {
	margin: 0 0 0.9rem;
	padding: 0.6rem 0.8rem;
	border: 1px solid rgba(255, 106, 106, 0.4);
	border-radius: 12px;
	background: rgba(255, 106, 106, 0.1);
	color: #ffc9c9;
	font-size: 0.82rem;
}

/* ------------------------------------------------------------ layout */

.agt-chat .agt-timb-grid {
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(260px, 0.85fr);
	gap: 1.1rem;
	align-items: start;
}

.agt-chat .agt-timb-main {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
	min-width: 0;
}

.agt-chat .agt-timb-side {
	display: flex;
	flex-direction: column;
	gap: 0.85rem;
	padding: 0.9rem;
	border: 1px solid var(--agt-line);
	border-radius: 14px;
	background: rgba(10, 10, 12, 0.35);
}

/* ------------------------------------------------------------ upload */

.agt-chat .agt-timb-drop {
	display: flex;
	align-items: center;
	gap: 0.8rem;
	padding: 1rem;
	border: 1px dashed var(--agt-line-strong);
	border-radius: 14px;
	background: rgba(255, 250, 243, 0.02);
	cursor: pointer;
	transition: border-color 0.18s ease, background 0.18s ease;
}

.agt-chat .agt-timb-drop:hover,
.agt-chat .agt-timb-drop.is-over {
	border-color: var(--agt-amber);
	background: rgba(240, 172, 50, 0.07);
}

.agt-chat .agt-timb-drop.is-loaded {
	padding: 0.6rem 1rem;
}

.agt-chat .agt-timb-drop svg {
	flex: 0 0 auto;
	width: 26px;
	height: 26px;
	color: var(--agt-amber-soft);
}

.agt-chat .agt-timb-drop strong {
	display: block;
	font-size: 0.9rem;
	font-weight: 650;
}

.agt-chat .agt-timb-drop small {
	display: block;
	margin-top: 0.15rem;
	color: var(--agt-muted);
	font-size: 0.76rem;
}

/* ------------------------------------------------------------- palco */

.agt-chat .agt-timb-stage {
	padding: 0.6rem;
	border: 1px solid var(--agt-line);
	border-radius: 14px;
	background:
		repeating-conic-gradient(rgba(255, 250, 243, 0.05) 0% 25%, transparent 0% 50%) 50% / 18px 18px,
		rgba(10, 10, 12, 0.5);
	text-align: center;
}

/* A moldura encaixa no formato escolhido (--agt-frame-ratio vem do JS). */
.agt-chat .agt-timb-frame {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 auto;
	width: 100%;
}

.agt-chat .agt-timb-frame canvas {
	display: block;
	max-width: 100%;
	max-height: 58vh;
	width: auto;
	height: auto;
	border-radius: 8px;
	cursor: grab;
	image-rendering: auto;
}

.agt-chat .agt-timb-frame canvas.is-dragging {
	cursor: grabbing;
}

.agt-chat .agt-timb-drag-hint {
	margin: 0.5rem 0 0;
	color: var(--agt-muted);
	font-size: 0.72rem;
}

.agt-chat .agt-timb-meta {
	margin: 0;
	color: var(--agt-muted);
	font-size: 0.74rem;
	font-variant-numeric: tabular-nums;
}

/* ------------- formatos de saída (feed 1:1, 4:5, story/reels 9:16) ------ */

.agt-chat .agt-timb-format-head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 0.6rem;
	flex-wrap: wrap;
}

.agt-chat .agt-timb-format-head h4 {
	margin: 0;
	color: var(--agt-ink);
	font-family: var(--agt-font-display);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

.agt-chat .agt-timb-format-hint {
	color: var(--agt-muted);
	font-size: 0.72rem;
}

.agt-chat .agt-timb-formats {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(88px, 1fr));
	gap: 6px;
	margin-top: 0.45rem;
}

.agt-chat .agt-timb-format {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.28rem;
	padding: 0.5rem 0.35rem 0.45rem;
	border: 1px solid var(--agt-line);
	border-radius: 12px;
	background: rgba(255, 250, 243, 0.04);
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.agt-chat .agt-timb-format:hover {
	border-color: rgba(240, 172, 50, 0.4);
	background: rgba(240, 172, 50, 0.1);
}

.agt-chat .agt-timb-format.is-active {
	border-color: var(--agt-amber);
	background: rgba(240, 172, 50, 0.16);
}

/* Miniatura com a proporção real do formato. */
.agt-chat .agt-timb-format-ratio {
	display: block;
	width: auto;
	height: 26px;
	aspect-ratio: var(--agt-ratio, 1);
	border: 1.5px solid var(--agt-muted);
	border-radius: 3px;
	transition: border-color 0.15s ease;
}

.agt-chat .agt-timb-format.is-active .agt-timb-format-ratio {
	border-color: var(--agt-amber-soft);
}

.agt-chat .agt-timb-format-label {
	color: var(--agt-ink);
	font-family: var(--agt-font-display);
	font-size: 0.72rem;
	font-weight: 650;
	line-height: 1.2;
	text-align: center;
}

.agt-chat .agt-timb-format small {
	color: var(--agt-muted);
	font-size: 0.62rem;
	font-variant-numeric: tabular-nums;
}

/* ------------- ajuste da imagem antes do recorte ------------------------ */

.agt-chat .agt-timb-block--crop {
	margin-top: 0.8rem;
	padding: 0.8rem;
	border: 1px solid var(--agt-line);
	border-radius: 14px;
	background: rgba(10, 10, 12, 0.35);
}

.agt-chat .agt-timb-block-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	margin-bottom: 0.55rem;
}

.agt-chat .agt-timb-block-head h4 {
	margin: 0;
}

.agt-chat .agt-timb-crop-reset {
	appearance: none;
	padding: 0.2rem 0.55rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 999px;
	background: transparent;
	color: var(--agt-muted);
	font-family: var(--agt-font-display);
	font-size: 0.68rem;
	font-weight: 650;
	cursor: pointer;
}

.agt-chat .agt-timb-crop-reset:hover {
	color: var(--agt-ink);
	border-color: var(--agt-amber);
}

.agt-chat .agt-timb-fit {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
}

.agt-chat .agt-timb-fit--pair {
	grid-template-columns: repeat(2, 1fr);
}

.agt-chat .agt-timb-fit-btn {
	appearance: none;
	padding: 0.4rem 0.25rem;
	border: 1px solid var(--agt-line);
	border-radius: 9px;
	background: rgba(255, 250, 243, 0.05);
	color: var(--agt-muted);
	font-family: var(--agt-font-display);
	font-size: 0.72rem;
	font-weight: 650;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.agt-chat .agt-timb-fit-btn:hover {
	background: rgba(240, 172, 50, 0.14);
	border-color: rgba(240, 172, 50, 0.35);
}

.agt-chat .agt-timb-fit-btn.is-active {
	border-color: var(--agt-amber);
	background: rgba(240, 172, 50, 0.2);
	color: var(--agt-ink);
}

.agt-chat .agt-timb-stage canvas {
	display: block;
	max-width: 100%;
	max-height: 58vh;
	width: auto;
	height: auto;
	border-radius: 8px;
}

/* ------------- lote de fotos (e-commerce) ------------------------------ */

.agt-chat .agt-timb-batch {
	padding: 0.6rem;
	border: 1px solid var(--agt-line);
	border-radius: 12px;
	background: rgba(10, 10, 12, 0.35);
}

.agt-chat .agt-timb-batch-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	margin-bottom: 0.5rem;
}

.agt-chat .agt-timb-batch-count {
	color: var(--agt-muted);
	font-family: var(--agt-font-display);
	font-size: 0.72rem;
	font-weight: 650;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.agt-chat .agt-timb-thumbs {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.agt-chat .agt-timb-thumb {
	position: relative;
	aspect-ratio: 1;
	border: 2px solid transparent;
	border-radius: 9px;
	background: rgba(255, 250, 243, 0.06);
	overflow: hidden;
	cursor: pointer;
	transition: border-color 0.15s ease;
}

.agt-chat .agt-timb-thumb:hover {
	border-color: rgba(240, 172, 50, 0.45);
}

.agt-chat .agt-timb-thumb.is-active {
	border-color: var(--agt-amber);
}

.agt-chat .agt-timb-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.agt-chat .agt-timb-thumb-remove {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 18px;
	height: 18px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(10, 10, 12, 0.75);
	color: var(--agt-ink);
	font-size: 0.72rem;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	opacity: 0;
	transition: opacity 0.15s ease, background 0.15s ease;
}

.agt-chat .agt-timb-thumb:hover .agt-timb-thumb-remove,
.agt-chat .agt-timb-thumb.is-active .agt-timb-thumb-remove {
	opacity: 1;
}

.agt-chat .agt-timb-thumb-remove:hover {
	background: #d9534f;
}

.agt-chat .agt-timb-download--all {
	margin-top: 0.45rem;
	background: transparent;
	border: 1px solid var(--agt-amber);
	color: var(--agt-amber-soft);
	box-shadow: none;
}

.agt-chat .agt-timb-download--all:not( :disabled ):hover {
	background: #ffffff;
	border-color: #ffffff;
	color: var(--agt-amber-ink);
	box-shadow: 0 8px 20px rgba(255, 255, 255, 0.16);
}

/* ------------- imagem com IA (única parte paga) ------------------------ */

.agt-chat .agt-timb-ai {
	display: flex;
	align-items: center;
	gap: 0.7rem;
	width: 100%;
	padding: 0.75rem 0.95rem;
	border: 1px solid rgba(240, 172, 50, 0.4);
	border-radius: 14px;
	background:
		radial-gradient(130% 160% at 0% 0%, rgba(240, 172, 50, 0.16), transparent 60%),
		rgba(10, 10, 12, 0.5);
	color: var(--agt-ink);
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.agt-chat .agt-timb-ai:hover {
	border-color: var(--agt-amber);
	transform: translateY( -1px );
}

.agt-chat .agt-timb-ai svg {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	color: var(--agt-amber-soft);
}

.agt-chat .agt-timb-ai strong {
	display: block;
	font-family: var(--agt-font-display);
	font-size: 0.9rem;
	font-weight: 700;
}

.agt-chat .agt-timb-ai small {
	display: block;
	margin-top: 0.1rem;
	color: var(--agt-muted);
	font-size: 0.74rem;
}

.agt-chat .agt-timb-ai-panel {
	padding: 0.9rem;
	border: 1px solid var(--agt-line);
	border-radius: 14px;
	background: rgba(10, 10, 12, 0.35);
}

.agt-chat .agt-timb-ai-panel textarea {
	width: 100%;
	min-height: 74px;
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 10px;
	background: rgba(10, 10, 12, 0.55);
	color: var(--agt-ink);
	font-family: var(--agt-font-body);
	font-size: 0.84rem;
	line-height: 1.5;
	resize: vertical;
}

.agt-chat .agt-timb-ai-panel textarea:focus {
	outline: 2px solid var(--agt-amber);
	outline-offset: 1px;
}

.agt-chat .agt-timb-ai-credit {
	margin: 0.1rem 0 0.7rem;
	padding: 0.4rem 0.6rem;
	border: 1px solid rgba(72, 199, 142, 0.35);
	border-radius: 10px;
	background: rgba(72, 199, 142, 0.1);
	color: #9fe9c6;
	font-size: 0.76rem;
	font-weight: 600;
}

.agt-chat .agt-timb-ai-credit.is-empty {
	border-color: rgba(240, 172, 50, 0.45);
	background: rgba(240, 172, 50, 0.12);
	color: var(--agt-amber-soft);
}

.agt-chat .agt-timb-ai-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem;
}

.agt-chat .agt-timb-ai-actions .agt-timb-download {
	flex: 1 1 150px;
}

.agt-chat .agt-timb-ai-buy {
	flex: 0 0 auto;
	padding: 0.72rem 1rem;
	border: 1px solid var(--agt-amber);
	border-radius: 999px;
	color: var(--agt-amber-soft);
	font-family: var(--agt-font-display);
	font-size: 0.82rem;
	font-weight: 700;
	text-decoration: none;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.agt-chat .agt-timb-ai-buy:hover {
	background: rgba(240, 172, 50, 0.14);
	color: var(--agt-ink);
}

.agt-chat .agt-timb-ai-status {
	margin: 0.6rem 0 0;
	color: var(--agt-muted);
	font-size: 0.76rem;
	line-height: 1.45;
	min-height: 1em;
}

.agt-chat .agt-timb-ai-status.is-warning {
	color: var(--agt-amber-soft);
}

.agt-chat .agt-timb-ai-status.is-ok {
	color: #8ee7bd;
}

.agt-chat .agt-timb-ai-status.is-loading::after {
	content: "";
	display: inline-block;
	width: 0.6em;
	height: 0.6em;
	margin-left: 0.4em;
	border: 2px solid var(--agt-amber);
	border-top-color: transparent;
	border-radius: 50%;
	vertical-align: -0.1em;
	animation: agt-timb-spin 0.8s linear infinite;
}

@keyframes agt-timb-spin {
	to { transform: rotate( 360deg ); }
}

/* Selo Premium: fita no canto superior direito do botão. */
.agt-chat .agt-timb-ai {
	position: relative;
	overflow: hidden;
	padding-top: 1.55rem;
	border-color: rgba(240, 172, 50, 0.55);
	box-shadow: 0 0 0 1px rgba(240, 172, 50, 0.12), 0 10px 24px rgba(240, 172, 50, 0.1);
}

.agt-chat .agt-timb-ai::before {
	content: "";
	position: absolute;
	inset: -40% -10% auto auto;
	width: 150px;
	height: 150px;
	background: radial-gradient(circle, rgba(240, 172, 50, 0.24), transparent 70%);
	pointer-events: none;
}

.agt-chat .agt-timb-premium {
	position: absolute;
	top: 0;
	right: 0;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 0.16rem 0.45rem 0.16rem 0.38rem;
	border-bottom-left-radius: 9px;
	background: linear-gradient(135deg, var(--agt-amber-soft), var(--agt-amber));
	color: var(--agt-amber-ink);
	font-family: var(--agt-font-display);
	font-size: 0.6rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.35;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
	z-index: 1;
}

.agt-chat .agt-timb-premium svg {
	width: 9px;
	height: 9px;
}

/* Variante verde (casa com o botão de melhorar). */
.agt-chat .agt-timb-premium--cool {
	background: linear-gradient(135deg, #9ff0c8, #48c78e);
	color: #082f20;
}

.agt-chat .agt-timb-ai-icon {
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
}

/* Par de botões: criar + melhorar. */
.agt-chat .agt-timb-ai-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.agt-chat .agt-timb-ai--improve {
	background:
		radial-gradient(130% 160% at 0% 0%, rgba(72, 199, 142, 0.14), transparent 60%),
		rgba(10, 10, 12, 0.5);
	border-color: rgba(72, 199, 142, 0.55);
	box-shadow: 0 0 0 1px rgba(72, 199, 142, 0.12), 0 10px 24px rgba(72, 199, 142, 0.08);
}

.agt-chat .agt-timb-ai--improve:hover {
	border-color: #48c78e;
}

.agt-chat .agt-timb-ai--improve::before {
	background: radial-gradient(circle, rgba(72, 199, 142, 0.22), transparent 70%);
}

.agt-chat .agt-timb-ai--improve svg {
	color: #8ee7bd;
}

/* Upload compacto dentro do painel de melhoria. */
.agt-chat .agt-timb-drop--mini {
	padding: 0.7rem 0.85rem;
	margin-bottom: 0.75rem;
}

.agt-chat .agt-timb-drop--mini.is-loaded {
	border-style: solid;
	border-color: rgba(72, 199, 142, 0.5);
}

.agt-chat .agt-timb-drop--mini svg {
	width: 20px;
	height: 20px;
}

.agt-chat .agt-timb-drop--mini strong {
	font-size: 0.82rem;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	max-width: 100%;
}

/* Opções rápidas de melhoria. */
.agt-chat .agt-timb-improv-presets {
	display: grid;
	gap: 6px;
	margin-bottom: 0.75rem;
}

.agt-chat .agt-timb-improv-preset {
	display: block;
	width: 100%;
	padding: 0.55rem 0.7rem;
	border: 1px solid var(--agt-line);
	border-radius: 11px;
	background: rgba(255, 250, 243, 0.04);
	text-align: left;
	cursor: pointer;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.agt-chat .agt-timb-improv-preset:hover {
	border-color: rgba(72, 199, 142, 0.45);
	background: rgba(72, 199, 142, 0.08);
}

.agt-chat .agt-timb-improv-preset.is-active {
	border-color: #48c78e;
	background: rgba(72, 199, 142, 0.16);
}

.agt-chat .agt-timb-improv-preset strong {
	display: block;
	color: var(--agt-ink);
	font-family: var(--agt-font-display);
	font-size: 0.82rem;
	font-weight: 700;
}

.agt-chat .agt-timb-improv-preset small {
	display: block;
	margin-top: 0.12rem;
	color: var(--agt-muted);
	font-size: 0.72rem;
	line-height: 1.4;
}

/* "Descrever" não gasta créditos: destaque neutro. */
.agt-chat .agt-timb-improv-preset--describe {
	border-style: dashed;
}

.agt-chat .agt-timb-improv-preset--describe.is-active {
	border-style: solid;
	border-color: var(--agt-amber);
	background: rgba(240, 172, 50, 0.14);
}

.agt-chat .agt-timb-ai-panel textarea {
	width: 100%;
	min-height: 60px;
	padding: 0.5rem 0.6rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 10px;
	background: rgba(10, 10, 12, 0.55);
	color: var(--agt-ink);
	font-family: var(--agt-font-body);
	font-size: 0.84rem;
	line-height: 1.5;
	resize: vertical;
}

.agt-chat .agt-timb-ai-panel textarea:focus {
	outline: 2px solid var(--agt-amber);
	outline-offset: 1px;
}

/* ------------------------------------------------------------ blocos */

.agt-chat .agt-timb-block h4 {
	margin: 0 0 0.5rem;
	color: var(--agt-ink);
	font-family: var(--agt-font-display);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
}

/* Grelha 3×3 de ancoragem. */
.agt-chat .agt-timb-anchor {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
	padding: 6px;
	border: 1px solid var(--agt-line);
	border-radius: 12px;
	background: rgba(10, 10, 12, 0.45);
}

.agt-chat .agt-timb-anchor-btn {
	position: relative;
	appearance: none;
	height: 34px;
	border: 1px solid transparent;
	border-radius: 8px;
	background: rgba(255, 250, 243, 0.05);
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.agt-chat .agt-timb-anchor-btn::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 7px;
	height: 7px;
	margin: -3.5px 0 0 -3.5px;
	border-radius: 50%;
	background: var(--agt-muted);
	transition: background 0.15s ease, transform 0.15s ease;
}

.agt-chat .agt-timb-anchor-btn:hover {
	background: rgba(240, 172, 50, 0.14);
	border-color: rgba(240, 172, 50, 0.35);
}

.agt-chat .agt-timb-anchor-btn.is-active {
	border-color: var(--agt-amber);
	background: rgba(240, 172, 50, 0.2);
}

.agt-chat .agt-timb-anchor-btn.is-active::after {
	background: var(--agt-amber-soft);
	transform: scale( 1.5 );
}

/* ------------------------------------------------------------ campos */

.agt-chat .agt-timb-field {
	display: block;
	margin-bottom: 0.7rem;
}

.agt-chat .agt-timb-field > span {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.5rem;
	margin-bottom: 0.28rem;
	color: var(--agt-muted);
	font-size: 0.78rem;
}

.agt-chat .agt-timb-field output {
	color: var(--agt-ink);
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.agt-chat .agt-timb-field input[type="range"] {
	width: 100%;
	height: 22px;
	appearance: none;
	background: transparent;
	cursor: pointer;
}

.agt-chat .agt-timb-field input[type="range"]::-webkit-slider-runnable-track {
	height: 4px;
	border-radius: 999px;
	background: var(--agt-line-strong);
}

.agt-chat .agt-timb-field input[type="range"]::-webkit-slider-thumb {
	appearance: none;
	width: 15px;
	height: 15px;
	margin-top: -5.5px;
	border: none;
	border-radius: 50%;
	background: var(--agt-amber);
	box-shadow: 0 0 0 3px rgba(240, 172, 50, 0.18);
}

.agt-chat .agt-timb-field input[type="range"]::-moz-range-track {
	height: 4px;
	border-radius: 999px;
	background: var(--agt-line-strong);
}

.agt-chat .agt-timb-field input[type="range"]::-moz-range-thumb {
	width: 15px;
	height: 15px;
	border: none;
	border-radius: 50%;
	background: var(--agt-amber);
}

.agt-chat .agt-timb-field input[type="text"],
.agt-chat .agt-timb-field select {
	width: 100%;
	padding: 0.45rem 0.6rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 10px;
	background: rgba(10, 10, 12, 0.55);
	color: var(--agt-ink);
	font-family: var(--agt-font-body);
	font-size: 0.84rem;
}

.agt-chat .agt-timb-field input[type="text"]:focus,
.agt-chat .agt-timb-field select:focus {
	outline: 2px solid var(--agt-amber);
	outline-offset: 1px;
}

.agt-chat .agt-timb-check {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	margin-bottom: 0.6rem;
	color: var(--agt-muted);
	font-size: 0.8rem;
	cursor: pointer;
}

.agt-chat .agt-timb-check input {
	margin-top: 2px;
	accent-color: var(--agt-amber);
}

.agt-chat .agt-timb-hint {
	margin: -0.3rem 0 0.6rem;
	color: var(--agt-muted);
	font-size: 0.7rem;
	line-height: 1.45;
}

/* Endereço: valor vindo do cadastro + posição em relação ao logo. */
.agt-chat .agt-timb-site-value {
	margin: 0 0 0.55rem;
	padding: 0.4rem 0.6rem;
	border: 1px dashed var(--agt-line-strong);
	border-radius: 10px;
	background: rgba(10, 10, 12, 0.4);
	color: var(--agt-amber-soft);
	font-family: var(--agt-font-display);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.01em;
	word-break: break-all;
}

/* Endereço em linha: valor + cor + automático. */
.agt-chat .agt-timb-site-row {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-bottom: 0.55rem;
	flex-wrap: wrap;
}

.agt-chat .agt-timb-site-row .agt-timb-site-value {
	flex: 1 1 120px;
	min-width: 0;
	margin: 0;
}

.agt-chat .agt-timb-color {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 0.22rem 0.45rem 0.22rem 0.3rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 9px;
	background: rgba(10, 10, 12, 0.55);
	cursor: pointer;
}

.agt-chat .agt-timb-color input[type="color"] {
	width: 26px;
	height: 22px;
	padding: 0;
	border: none;
	border-radius: 6px;
	background: transparent;
	cursor: pointer;
}

.agt-chat .agt-timb-color input[type="color"]::-webkit-color-swatch-wrapper {
	padding: 0;
}

.agt-chat .agt-timb-color input[type="color"]::-webkit-color-swatch {
	border: 1px solid var(--agt-line-strong);
	border-radius: 5px;
}

.agt-chat .agt-timb-color input[type="color"]:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.agt-chat .agt-timb-color span {
	color: var(--agt-muted);
	font-family: var(--agt-font-display);
	font-size: 0.68rem;
	font-weight: 650;
}

.agt-chat .agt-timb-color-auto {
	appearance: none;
	padding: 0.28rem 0.5rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 9px;
	background: transparent;
	color: var(--agt-muted);
	font-family: var(--agt-font-display);
	font-size: 0.68rem;
	font-weight: 650;
	cursor: pointer;
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.agt-chat .agt-timb-color-auto:hover {
	color: var(--agt-ink);
	border-color: var(--agt-amber);
}

.agt-chat .agt-timb-color-auto.is-active {
	border-color: var(--agt-amber);
	background: rgba(240, 172, 50, 0.18);
	color: var(--agt-ink);
}

.agt-chat .agt-timb-field-label {
	display: block;
	margin-bottom: 0.32rem;
	color: var(--agt-muted);
	font-size: 0.78rem;
}

.agt-chat .agt-timb-textpos {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 4px;
}

.agt-chat .agt-timb-textpos-btn {
	appearance: none;
	padding: 0.4rem 0.3rem;
	border: 1px solid var(--agt-line);
	border-radius: 9px;
	background: rgba(255, 250, 243, 0.05);
	color: var(--agt-muted);
	font-family: var(--agt-font-display);
	font-size: 0.72rem;
	font-weight: 650;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.agt-chat .agt-timb-textpos-btn:hover {
	background: rgba(240, 172, 50, 0.14);
	border-color: rgba(240, 172, 50, 0.35);
}

.agt-chat .agt-timb-textpos-btn.is-active {
	border-color: var(--agt-amber);
	background: rgba(240, 172, 50, 0.2);
	color: var(--agt-ink);
}

/* ------------------------------------- cores e fontes predefinidas */

.agt-chat .agt-timb-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 0.7rem;
}

.agt-chat .agt-timb-swatch {
	appearance: none;
	position: relative;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
	transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.agt-chat .agt-timb-swatch:hover {
	transform: translateY( -1px );
	border-color: var(--agt-amber);
}

.agt-chat .agt-timb-swatch.is-active {
	border-color: var(--agt-amber);
	box-shadow: 0 0 0 2px rgba(240, 172, 50, 0.35);
}

/* "Auto" é o contraste calculado: metade clara, metade escura. */
.agt-chat .agt-timb-swatch.is-auto {
	background: linear-gradient(135deg, #ffffff 0 50%, #111114 50% 100%);
	color: transparent;
	font-size: 0;
	overflow: hidden;
}

.agt-chat .agt-timb-swatch.is-auto::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(135deg, transparent 48%, rgba(240, 172, 50, 0.9) 48% 52%, transparent 52%);
}

.agt-chat .agt-timb-fonts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 5px;
	margin-bottom: 0.7rem;
}

.agt-chat .agt-timb-font-btn {
	appearance: none;
	overflow: hidden;
	padding: 0.45rem 0.5rem;
	border: 1px solid var(--agt-line);
	border-radius: 9px;
	background: rgba(255, 250, 243, 0.05);
	color: var(--agt-ink);
	font-size: 0.74rem;
	line-height: 1.25;
	text-align: left;
	white-space: nowrap;
	text-overflow: ellipsis;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.agt-chat .agt-timb-font-btn:hover {
	background: rgba(240, 172, 50, 0.14);
	border-color: rgba(240, 172, 50, 0.35);
}

.agt-chat .agt-timb-font-btn.is-active {
	border-color: var(--agt-amber);
	background: rgba(240, 172, 50, 0.2);
}

/* ------------------------------------------------------------ acções */

.agt-chat .agt-timb-download,
.agt-chat .agt-timb-reset {
	width: 100%;
	padding: 0.72rem 1rem;
	border-radius: 999px;
	font-family: var(--agt-font-display);
	font-size: 0.86rem;
	font-weight: 700;
	cursor: pointer;
	transition: transform 0.15s ease, opacity 0.15s ease;
}

.agt-chat .agt-timb-download {
	border: none;
	background: var(--agt-amber);
	color: var(--agt-amber-ink);
	box-shadow: 0 8px 20px rgba(240, 172, 50, 0.22);
}

.agt-chat .agt-timb-download:disabled {
	background: rgba(255, 250, 243, 0.12);
	color: var(--agt-muted);
	box-shadow: none;
	cursor: not-allowed;
}

.agt-chat .agt-timb-download:not( :disabled ):hover {
	transform: translateY( -1px );
}

.agt-chat .agt-timb-reset {
	border: 1px solid var(--agt-line-strong);
	background: transparent;
	color: var(--agt-muted);
	margin-top: 0.45rem;
}

.agt-chat .agt-timb-reset:hover {
	color: var(--agt-ink);
	border-color: var(--agt-amber);
}

.agt-chat .agt-timb-note {
	margin: 0.35rem 0 0;
	color: var(--agt-muted);
	font-size: 0.72rem;
	line-height: 1.5;
	text-align: center;
}

/* ------------------------------------------------- cards / publicidade */

.agt-chat .agt-timb-ads {
	margin-top: 1.2rem;
	padding-top: 1rem;
	border-top: 1px solid var(--agt-line);
}

.agt-chat .agt-timb-ads-head {
	display: grid;
	justify-items: center;
	gap: 0.15rem;
	margin-bottom: 0.4rem;
	text-align: center;
}

.agt-chat .agt-timb-ads-kicker {
	margin: 0;
	color: var(--agt-amber-soft);
	font-family: var(--agt-font-display);
	font-size: 0.62rem;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.agt-chat .agt-timb-ads-title {
	margin: 0;
	color: var(--agt-ink);
	font-family: var(--agt-font-display);
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: -0.01em;
}

/* Geometria compacta: o carrossel vive dentro do card do atendimento.
   O palco é o próprio container (container-type: inline-size), por isso os
   tamanhos são proporcionais à largura disponível — antes sobrava ~25% de
   espaço morto em cada lado no desktop. */
.agt-chat .agt-timb-ads .pcs3d {
	container-type: inline-size;
	--pcs3d-perspective: 900px;
	--pcs3d-scale-1: 0.9;
	--pcs3d-scale-2: 0.8;
	--pcs3d-scale-3: 0.7;
	--pcs3d-rot-1: 15deg;
	--pcs3d-rot-2: 25deg;
	--pcs3d-rot-3: 32deg;
	--pcs3d-radius: 10px;
	--pcs3d-dim: 40%;
	--pcs3d-alpha: 0.7;
	--pcs3d-arrow-size: 34px;
	--pcs3d-arrow-offset: 10px;
	--pcs3d-caption-gap: 10px;
	--pcs3d-caption-width: 100%;
	--pcs3d-caption-color: var(--agt-muted);
	/* Afastamento dos vizinhos calculado a partir da largura do palco e do
	   card: a borda externa do vizinho cai sempre em 1cqw, nunca é cortada.
	   O card nunca passa de ~52% da largura, senão não sobra vizinho. */
	--pcs3d-shift-1: calc( 49cqw - var(--pcs3d-card-w) * 0.5 );
	--pcs3d-shift-2: calc( 49cqw - var(--pcs3d-card-w) * 0.5 + var(--pcs3d-card-w) * 0.7 );
	--pcs3d-shift-3: calc( 49cqw - var(--pcs3d-card-w) * 0.5 + var(--pcs3d-card-w) * 1.4 );
	padding: 0 0 0.4rem;
}

/* O reflexo é decalcado abaixo do card: sem clip ele invadia a linha das
   setas (o palco antigo era mais baixo que o card × 2). */
.agt-chat .agt-timb-ads .pcs3d-stage {
	overflow: hidden;
}

/* Cards na horizontal (paisagem 16:9). */
.agt-chat .agt-timb-ads--horizontal .pcs3d {
	--pcs3d-card-w: min( 46cqw, 430px );
	--pcs3d-reflect-h: calc( var(--pcs3d-card-w) * 0.5625 * 0.22 );
	--pcs3d-stage-h: calc( var(--pcs3d-card-w) * 0.5625 * 1.22 );
}

/* Cards na vertical (retrato 9:16): o card manda na altura do palco. */
.agt-chat .agt-timb-ads--vertical .pcs3d {
	--pcs3d-card-w: min( 40cqw, 380px );
	--pcs3d-reflect-h: calc( var(--pcs3d-card-w) * 1.7778 * 0.16 );
	--pcs3d-stage-h: calc( var(--pcs3d-card-w) * 1.7778 * 1.16 );
}

/* Com cards grandes só o central e os dois vizinhos cabem na faixa: os
   restantes ficariam cortados nas bordas do palco. */
.agt-chat .agt-timb-ads .pcs3d-slide[data-pos="2"],
.agt-chat .agt-timb-ads .pcs3d-slide[data-pos="-2"],
.agt-chat .agt-timb-ads .pcs3d-slide[data-pos="3"],
.agt-chat .agt-timb-ads .pcs3d-slide[data-pos="-3"] {
	opacity: 0;
	pointer-events: none;
}

.agt-chat .agt-timb-ads .pcs3d-caption {
	font-size: 0.78rem;
	line-height: 1.45;
}

/* ------------------------------------------------- textos (premium) */

.agt-chat .agt-timb-texts {
	margin-top: 0.8rem;
	padding: 0.85rem;
	border: 1px solid var(--agt-line);
	border-radius: 14px;
	background: rgba(10, 10, 12, 0.35);
}

.agt-chat .agt-timb-texts-premium {
	display: inline-flex;
	align-items: center;
	margin-left: 0.35rem;
	padding: 0.1rem 0.42rem;
	border-radius: 999px;
	background: linear-gradient(135deg, #ffd07a, var(--agt-amber));
	color: #211605;
	font-family: var(--agt-font-display);
	font-size: 0.56rem;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	vertical-align: middle;
}

.agt-chat .agt-timb-texts-body {
	margin-top: 0.7rem;
}

.agt-chat .agt-timb-texts-top {
	display: grid;
	grid-template-columns: 132px minmax(0, 1fr);
	gap: 0.8rem;
	align-items: start;
}

.agt-chat .agt-timb-texts-anchor .agt-timb-field-label {
	display: block;
	margin-bottom: 0.35rem;
}

.agt-chat .agt-timb-texts-globals {
	display: flex;
	flex-direction: column;
	gap: 0.45rem;
}

.agt-chat .agt-timb-texts-offsets {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
}

.agt-chat .agt-timb-field--inline {
	display: flex;
	align-items: center;
	gap: 0.4rem;
}

.agt-chat .agt-timb-field--inline > span:first-child {
	flex: 0 0 auto;
	color: var(--agt-muted);
	font-size: 0.7rem;
}

.agt-chat .agt-timb-field--inline input[type="number"] {
	width: 72px;
	padding: 0.3rem 0.4rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 8px;
	background: rgba(10, 10, 12, 0.55);
	color: var(--agt-ink);
	font-family: var(--agt-font-body);
	font-size: 0.76rem;
}

.agt-chat .agt-timb-unit {
	color: var(--agt-muted);
	font-size: 0.64rem;
}

.agt-chat .agt-timb-texts-empty {
	margin: 0.65rem 0 0;
	color: var(--agt-muted);
	font-size: 0.72rem;
}

.agt-chat .agt-timb-texts-list {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	margin-top: 0.6rem;
}

.agt-chat .agt-timb-text-block {
	border: 1px solid var(--agt-line);
	border-radius: 12px;
	background: rgba(255, 250, 243, 0.02);
	overflow: hidden;
}

.agt-chat .agt-timb-text-block[open] {
	border-color: var(--agt-line-strong);
}

.agt-chat .agt-timb-text-block-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.5rem 0.55rem;
	cursor: pointer;
	list-style: none;
}

.agt-chat .agt-timb-text-block-head::-webkit-details-marker {
	display: none;
}

.agt-chat .agt-timb-text-block-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: rgba(240, 172, 50, 0.16);
	color: var(--agt-amber-soft);
	font-family: var(--agt-font-display);
	font-size: 0.62rem;
	font-weight: 800;
}

.agt-chat .agt-timb-text-block-preview {
	flex: 1;
	min-width: 0;
	overflow: hidden;
	color: var(--agt-muted);
	font-size: 0.72rem;
	white-space: nowrap;
	text-overflow: ellipsis;
}

.agt-chat .agt-timb-text-block-remove {
	appearance: none;
	flex: 0 0 auto;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 1px solid transparent;
	border-radius: 50%;
	background: transparent;
	color: var(--agt-muted);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
}

.agt-chat .agt-timb-text-block-remove:hover {
	border-color: #ff8080;
	color: #ff9a9a;
}

.agt-chat .agt-timb-text-block-body {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0 0.55rem 0.65rem;
}

.agt-chat .agt-timb-text-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.4rem;
}

.agt-chat .agt-timb-text-row--title input[type="text"] {
	flex: 1 1 150px;
	min-width: 0;
}

.agt-chat .agt-timb-text-row--body textarea {
	width: 100%;
	min-height: 46px;
	resize: vertical;
}

.agt-chat .agt-timb-texts input[type="text"],
.agt-chat .agt-timb-texts input[type="number"],
.agt-chat .agt-timb-texts select,
.agt-chat .agt-timb-texts textarea {
	padding: 0.35rem 0.5rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 8px;
	background: rgba(10, 10, 12, 0.55);
	color: var(--agt-ink);
	font-family: var(--agt-font-body);
	font-size: 0.78rem;
}

.agt-chat .agt-timb-texts input[type="text"]:focus,
.agt-chat .agt-timb-texts input[type="number"]:focus,
.agt-chat .agt-timb-texts select:focus,
.agt-chat .agt-timb-texts textarea:focus {
	outline: 2px solid var(--agt-amber);
	outline-offset: 1px;
}

.agt-chat .agt-timb-texts select {
	max-width: 180px;
}

.agt-chat .agt-timb-text-row--title select {
	flex: 0 0 auto;
	width: 64px;
}

.agt-chat .agt-timb-text-label {
	flex: 0 0 auto;
	color: var(--agt-muted);
	font-size: 0.7rem;
}

.agt-chat .agt-timb-text-row--fonts > label {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	min-width: 0;
	color: var(--agt-muted);
	font-size: 0.68rem;
}

.agt-chat .agt-timb-text-row--fonts input[type="number"] {
	width: 58px;
	flex: 0 0 auto;
}

.agt-chat .agt-timb-text-row--fonts select {
	width: 138px;
	max-width: 100%;
	flex: 0 1 auto;
	min-width: 0;
}

.agt-chat .agt-timb-text-color {
	display: inline-flex;
	align-items: center;
	gap: 0.3rem;
	color: var(--agt-muted);
	font-size: 0.68rem;
}

.agt-chat .agt-timb-text-color input[type="color"] {
	width: 26px;
	height: 24px;
	padding: 0;
	border: 1px solid var(--agt-line-strong);
	border-radius: 7px;
	background: transparent;
	cursor: pointer;
}

.agt-chat .agt-timb-text-auto {
	appearance: none;
	padding: 0.16rem 0.45rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 999px;
	background: transparent;
	color: var(--agt-muted);
	font-family: var(--agt-font-display);
	font-size: 0.6rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	cursor: pointer;
}

.agt-chat .agt-timb-text-auto.is-active {
	border-color: var(--agt-amber);
	background: rgba(240, 172, 50, 0.16);
	color: var(--agt-amber-soft);
}

.agt-chat .agt-timb-icon-field {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.agt-chat .agt-timb-icon-preview {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	width: 34px;
	height: 34px;
	padding: 3px;
	border: 1px dashed var(--agt-line-strong);
	border-radius: 9px;
	background: rgba(10, 10, 12, 0.5) center / contain no-repeat;
	color: var(--agt-muted);
	font-size: 0.7rem;
	overflow: hidden;
}

/* A prévia recebe um <img> do ícone: sem limite ele sai no tamanho real
   (512×448) e estoura o bloco. */
.agt-chat .agt-timb-icon-preview > img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.agt-chat .agt-timb-icon-preview.has-icon {
	border-style: solid;
	border-color: var(--agt-amber);
}

.agt-chat .agt-timb-icon-empty {
	opacity: 0.6;
}

.agt-chat .agt-timb-icon-upload {
	display: inline-flex;
	align-items: center;
	padding: 0.24rem 0.55rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 999px;
	color: var(--agt-muted);
	font-family: var(--agt-font-display);
	font-size: 0.62rem;
	font-weight: 700;
	cursor: pointer;
}

.agt-chat .agt-timb-icon-upload:hover {
	border-color: var(--agt-amber);
	color: var(--agt-ink);
}

.agt-chat .agt-timb-icon-clear {
	appearance: none;
	padding: 0.2rem 0.4rem;
	border: 0;
	background: transparent;
	color: #ff9a9a;
	font-size: 0.62rem;
	cursor: pointer;
}

.agt-chat .agt-timb-icon-library {
	appearance: none;
	padding: 0.24rem 0.55rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 999px;
	background: transparent;
	color: var(--agt-muted);
	font-family: var(--agt-font-display);
	font-size: 0.62rem;
	font-weight: 700;
	cursor: pointer;
}

.agt-chat .agt-timb-icon-library:hover {
	border-color: var(--agt-amber);
	color: var(--agt-ink);
}

/* ------------------------------------------------- seletor de ícones */

.agt-chat .agt-timb-iconpicker {
	position: fixed;
	inset: 0;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	background: rgba(6, 6, 8, 0.72);
	backdrop-filter: blur(3px);
}

.agt-chat .agt-timb-iconpicker[hidden] {
	display: none;
}

.agt-chat .agt-timb-iconpicker-card {
	display: flex;
	flex-direction: column;
	width: min(760px, 100%);
	max-height: min(86vh, 720px);
	overflow: hidden;
	border: 1px solid var(--agt-line-strong);
	border-radius: 16px;
	background: #14131a;
	box-shadow: 0 24px 70px rgba(0, 0, 0, 0.6);
}

.agt-chat .agt-timb-iconpicker-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 0.9rem;
	border-bottom: 1px solid var(--agt-line);
}

.agt-chat .agt-timb-iconpicker-head h4 {
	margin: 0;
	color: var(--agt-ink);
	font-family: var(--agt-font-display);
	font-size: 0.86rem;
	letter-spacing: 0.02em;
}

.agt-chat .agt-timb-iconpicker-close {
	appearance: none;
	width: 28px;
	height: 28px;
	padding: 0;
	border: 1px solid var(--agt-line-strong);
	border-radius: 50%;
	background: transparent;
	color: var(--agt-muted);
	font-size: 1.1rem;
	line-height: 1;
	cursor: pointer;
}

.agt-chat .agt-timb-iconpicker-close:hover {
	border-color: #ff8080;
	color: #ff9a9a;
}

.agt-chat .agt-timb-iconpicker-filters {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0.7rem 0.9rem 0.55rem;
}

.agt-chat .agt-timb-iconpicker-filters input[type="search"] {
	width: 100%;
	padding: 0.45rem 0.6rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 9px;
	background: rgba(10, 10, 12, 0.6);
	color: var(--agt-ink);
	font-family: var(--agt-font-body);
	font-size: 0.8rem;
}

.agt-chat .agt-timb-iconpicker-filters input[type="search"]:focus {
	outline: 2px solid var(--agt-amber);
	outline-offset: 1px;
}

.agt-chat .agt-timb-iconpicker-libs {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem;
}

.agt-chat .agt-timb-iconpicker-lib {
	appearance: none;
	padding: 0.24rem 0.6rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 999px;
	background: transparent;
	color: var(--agt-muted);
	font-family: var(--agt-font-display);
	font-size: 0.62rem;
	font-weight: 700;
	cursor: pointer;
}

.agt-chat .agt-timb-iconpicker-lib span {
	margin-left: 0.25rem;
	opacity: 0.6;
	font-weight: 500;
}

.agt-chat .agt-timb-iconpicker-lib.is-active {
	border-color: var(--agt-amber);
	background: rgba(240, 172, 50, 0.16);
	color: var(--agt-amber-soft);
}

.agt-chat .agt-timb-iconpicker-colorbar {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0 0.9rem 0.6rem;
	color: var(--agt-muted);
	font-size: 0.68rem;
}

.agt-chat .agt-timb-iconpicker-count {
	margin-left: auto;
	color: var(--agt-muted);
	font-size: 0.66rem;
}

.agt-chat .agt-timb-iconpicker-status,
.agt-chat .agt-timb-iconpicker-empty {
	margin: 0 0.9rem 0.5rem;
	color: var(--agt-muted);
	font-size: 0.72rem;
}

.agt-chat .agt-timb-iconpicker-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(58px, 1fr));
	gap: 0.4rem;
	flex: 1;
	min-height: 140px;
	padding: 0.2rem 0.9rem 0.6rem;
	overflow-y: auto;
}

.agt-chat .agt-timb-iconpicker-item {
	appearance: none;
	display: flex;
	align-items: center;
	justify-content: center;
	aspect-ratio: 1;
	padding: 0.45rem;
	border: 1px solid var(--agt-line);
	border-radius: 10px;
	background: rgba(255, 250, 243, 0.03);
	color: #f4efe6;
	cursor: pointer;
}

.agt-chat .agt-timb-iconpicker-item.is-auto {
	color: rgba(244, 239, 230, 0.9);
}

.agt-chat .agt-timb-iconpicker-item:hover,
.agt-chat .agt-timb-iconpicker-item:focus-visible {
	border-color: var(--agt-amber);
	background: rgba(240, 172, 50, 0.12);
	outline: none;
}

.agt-chat .agt-timb-iconpicker-item svg {
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.agt-chat .agt-timb-iconpicker-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.6rem;
	padding: 0.55rem 0.9rem 0.7rem;
	border-top: 1px solid var(--agt-line);
}

.agt-chat .agt-timb-iconpicker-more {
	appearance: none;
	padding: 0.28rem 0.7rem;
	border: 1px solid var(--agt-line-strong);
	border-radius: 999px;
	background: transparent;
	color: var(--agt-ink);
	font-family: var(--agt-font-display);
	font-size: 0.64rem;
	font-weight: 700;
	cursor: pointer;
}

.agt-chat .agt-timb-iconpicker-credit {
	margin-left: auto;
	color: var(--agt-muted);
	font-size: 0.6rem;
	opacity: 0.75;
}

.agt-chat .agt-timb-text-row--icon-opts {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.55rem 0.8rem;
}
.agt-chat .agt-timb-text-row--icon-opts .agt-timb-field--inline {
	display: flex;
	align-items: center;
	gap: 0.35rem;
	min-width: 0;
	overflow: hidden;
}

.agt-chat .agt-timb-text-row--icon-opts .agt-timb-field--inline > span:first-child {
	flex: 0 0 auto;
	max-width: 6.5rem;
	line-height: 1.2;
}

.agt-chat .agt-timb-text-row--icon-opts output {
	flex: 0 1 auto;
	min-width: 0;
	color: var(--agt-muted);
	font-size: 0.64rem;
	text-align: right;
	white-space: nowrap;
}

.agt-chat .agt-timb-text-row--icon-opts input[type="range"] {
	flex: 1 1 60px;
	min-width: 50px;
}

/* Em painéis estreitos (barra lateral do carrossel) o rótulo + slider +
   valor não cabem lado a lado: o valor desce para a linha seguinte. */
@media (max-width: 1400px) {
	.agt-chat .agt-timb-text-row--icon-opts .agt-timb-field--inline {
		flex-wrap: wrap;
	}

	.agt-chat .agt-timb-text-row--icon-opts output {
		margin-left: auto;
	}
}

@media (max-width: 520px) {
	.agt-chat .agt-timb-text-row--icon-opts {
		grid-template-columns: 1fr;
	}
}

/* ------------------------------------------------------------ mobile */

@media (max-width: 860px) {
	.agt-chat .agt-timb-grid {
		grid-template-columns: 1fr;
	}

	/* Editor de textos: a grade de posição e os campos globais empilham. */
	.agt-chat .agt-timb-texts-top {
		grid-template-columns: 1fr;
	}

	.agt-chat .agt-timb-texts-anchor {
		max-width: 160px;
	}

	/* Em ecrã estreito o card em foco ocupa 100% da largura do componente.
	   A altura continua a ser a da proporção do formato (9:16 no retrato,
	   16:9 na paisagem): como o palco e o reflexo derivam de
	   --pcs3d-card-w, tudo cresce junto — nada de card esticado ou cortado. */
	.agt-chat .agt-timb-ads--vertical .pcs3d,
	.agt-chat .agt-timb-ads--horizontal .pcs3d {
		--pcs3d-card-w: 100cqw;
	}

	/* O limite de 92% do carrossel existia para os vizinhos respirarem;
	   com o card a ocupar a faixa inteira ele só encolheria o foco. */
	.agt-chat .agt-timb-ads .pcs3d-slide {
		max-width: 100%;
	}

	/* Troca lateral, como um slider: o card que sai desliza para o lado e o
	   que entra vem do lado oposto, sempre a uma largura exata. Sem fade de
	   alpha e sem o filtro cinza/brightness que o modo 3D aplica aos vizinhos
	   — a imagem entra e sai com a cor cheia. */
	.agt-chat .agt-timb-ads .pcs3d-slide[data-pos="-1"],
	.agt-chat .agt-timb-ads .pcs3d-slide[data-pos="1"] {
		filter: none;
		opacity: 1;
		pointer-events: none;
	}

	/* Um card por posição, parqueado imediatamente fora do palco (que tem
	   overflow: hidden): é a entrada e a saída da troca, uma largura exata. */
	.agt-chat .agt-timb-ads .pcs3d-slide[data-pos="-1"] {
		transform: translate3d(calc(-50% - 100cqw), var(--pcs3d-slide-y), 0);
	}

	.agt-chat .agt-timb-ads .pcs3d-slide[data-pos="1"] {
		transform: translate3d(calc(-50% + 100cqw), var(--pcs3d-slide-y), 0);
	}

	/* Fora do foco só existem as duas posições vizinhas. As demais ficam sem
	   caixa: o card que "dá a volta" no carrossel (ex.: -1 → +2) é removido e
	   recriado direto na posição certa, em vez de atravessar o palco durante
	   a transição. */
	.agt-chat .agt-timb-ads .pcs3d-slide:not([data-pos="-1"]):not([data-pos="0"]):not([data-pos="1"]) {
		display: none;
	}

	.agt-chat .agt-timb-stage canvas {
		max-height: 46vh;
	}

	.agt-chat .agt-timb-head {
		flex-direction: column;
	}

	.agt-chat .agt-timb-anchor-btn {
		height: 40px;
	}

	/* Botões premium passam a ocupar a linha inteira para o texto respirar. */
	.agt-chat .agt-timb-ai-row {
		grid-template-columns: 1fr;
	}

	.agt-chat .agt-timb-ai {
		padding-top: 1.5rem;
	}

	.agt-chat .agt-timb-premium {
		font-size: 0.56rem;
		letter-spacing: 0.06em;
	}

	/* Afasta a fita do texto do topo do botão. */
	.agt-chat .agt-timb-ai > span:last-child {
		padding-right: 4.4rem;
	}
}
