/* Guará — assistente flutuante */
.ppc-guara {
	position: fixed;
	right: 1.25rem;
	bottom: 5.75rem;
	z-index: 99990;
	font-family: var(--ppc-body, 'Open Sans', sans-serif);
}

.ppc-guara__launcher {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.65rem 1rem 0.65rem 0.75rem;
	border: none;
	border-radius: 999px;
	background: linear-gradient(135deg, #2d5a1a 0%, #1a3d10 100%);
	color: #fff;
	box-shadow: 0 8px 28px rgba(4, 38, 9, 0.35);
	cursor: pointer;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	max-width: min(280px, calc(100vw - 2rem));
}

.ppc-guara__launcher:hover,
.ppc-guara__launcher:focus {
	transform: translateY(-2px);
	box-shadow: 0 12px 32px rgba(4, 38, 9, 0.45);
}

.ppc-guara__launcher-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	flex-shrink: 0;
	background: #fff;
	border-radius: 50%;
	padding: 0.15rem;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
	overflow: hidden;
}

.ppc-guara__launcher-icon img,
.ppc-guara__launcher-icon svg {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
}

.ppc-guara__launcher-text {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	text-align: left;
	line-height: 1.2;
}

.ppc-guara__launcher-text strong {
	font-size: 0.95rem;
	font-weight: 700;
}

.ppc-guara__launcher-text small {
	font-size: 0.75rem;
	opacity: 0.9;
}

.ppc-guara__panel {
	position: absolute;
	right: 0;
	bottom: calc(100% + 0.75rem);
	width: min(380px, calc(100vw - 2rem));
	max-height: min(560px, calc(100vh - 6rem));
	display: flex;
	flex-direction: column;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
	overflow: hidden;
	border: 1px solid #e5e7eb;
}

.ppc-guara__panel[hidden] {
	display: none !important;
}

.ppc-guara.is-open .ppc-guara__launcher {
	opacity: 0;
	pointer-events: none;
	transform: scale(0.9);
}

.ppc-guara__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.875rem 1rem;
	background: linear-gradient(135deg, #2d5a1a 0%, #042609 100%);
	color: #fff;
}

.ppc-guara__header-info {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	min-width: 0;
}

.ppc-guara__avatar {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	background: #fff;
	border-radius: 50%;
	padding: 0.1rem;
	flex-shrink: 0;
	overflow: hidden;
}

.ppc-guara__avatar img,
.ppc-guara__avatar svg {
	width: 100%;
	height: 100%;
	display: block;
	object-fit: contain;
}

.ppc-guara__header-title {
	display: block;
	font-size: 0.95rem;
}

.ppc-guara__header-sub {
	display: block;
	font-size: 0.75rem;
	opacity: 0.85;
}

.ppc-guara__header-actions {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex-shrink: 0;
}

.ppc-guara__close,
.ppc-guara__reset {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.15);
	color: #fff;
	cursor: pointer;
	flex-shrink: 0;
}

.ppc-guara__close:hover,
.ppc-guara__close:focus,
.ppc-guara__reset:hover,
.ppc-guara__reset:focus {
	background: rgba(255, 255, 255, 0.25);
}

.ppc-guara__messages {
	flex: 1;
	overflow-y: auto;
	padding: 1rem;
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	background: #f8faf9;
	min-height: 220px;
}

.ppc-guara__msg {
	max-width: 88%;
	padding: 0.65rem 0.875rem;
	border-radius: 12px;
	font-size: 0.9rem;
	line-height: 1.5;
	word-break: break-word;
}

.ppc-guara__msg--bot {
	align-self: flex-start;
	background: #fff;
	border: 1px solid #e5e7eb;
	color: #1f2937;
	border-bottom-left-radius: 4px;
}

.ppc-guara__msg--user {
	align-self: flex-end;
	background: #2d5a1a;
	color: #fff;
	border-bottom-right-radius: 4px;
}

.ppc-guara__msg--typing {
	font-style: italic;
	color: #6b7280;
	background: transparent;
	border: none;
	padding-left: 0;
}

.ppc-guara__form {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
	padding: 0.75rem;
	border-top: 1px solid #e5e7eb;
	background: #fff;
}

.ppc-guara__input {
	width: 100%;
	resize: vertical;
	min-height: 2.75rem;
	max-height: 120px;
	padding: 0.625rem 0.75rem;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	font: inherit;
}

.ppc-guara__input:focus {
	outline: none;
	border-color: #2d5a1a;
	box-shadow: 0 0 0 2px rgba(45, 90, 26, 0.15);
}

.ppc-guara__send {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	align-self: flex-end;
	padding: 0.5rem 1rem;
	border: none;
	border-radius: 8px;
	background: #e87722;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s ease;
}

.ppc-guara__send:hover,
.ppc-guara__send:focus {
	background: #d06818;
}

.ppc-guara__send:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

@media (max-width: 480px) {
	.ppc-guara {
		right: 0.75rem;
		bottom: 5.25rem;
	}

	.ppc-guara__launcher-text small {
		display: none;
	}

	.ppc-guara__panel {
		width: calc(100vw - 1.5rem);
	}
}
