.rpp-assistant {
	--rpp-assistant-ink: var(--rpp-color-charcoal, #1a1a1a);
	--rpp-assistant-muted: var(--rpp-color-text-muted, #6b6560);
	--rpp-assistant-cream: var(--rpp-color-warm-white, #f7f4ef);
	--rpp-assistant-line: var(--rpp-color-border, #e6e1d8);
	position: relative;
	z-index: 1200;
	font-family: var(--rpp-font-serif, Georgia, "Times New Roman", serif);
}

.rpp-assistant__fab {
	display: inline-flex;
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	z-index: 1201;
	align-items: center;
	justify-content: center;
	width: 3.25rem;
	height: 3.25rem;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: transparent;
	cursor: pointer;
	box-shadow: none;
}

.rpp-assistant.is-open .rpp-assistant__fab {
	display: none;
}

.rpp-assistant__fab-pulse,
.rpp-assistant__fab-core {
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}

.rpp-assistant__fab-core {
	width: 0.85rem;
	height: 0.85rem;
	background: var(--rpp-assistant-accent);
	box-shadow: 0 0 0 6px rgba(196, 163, 90, 0.22);
}

.rpp-assistant__fab-pulse {
	width: 2.75rem;
	height: 2.75rem;
	background: radial-gradient(circle, rgba(196, 163, 90, 0.35) 0%, rgba(196, 163, 90, 0.12) 45%, rgba(196, 163, 90, 0) 70%);
	animation: rpp-assistant-pulse 2.4s ease-out infinite;
}

@keyframes rpp-assistant-pulse {
	0% {
		transform: scale(0.72);
		opacity: 0.9;
	}
	70% {
		transform: scale(1.15);
		opacity: 0.25;
	}
	100% {
		transform: scale(1.35);
		opacity: 0;
	}
}

.rpp-assistant__panel {
	position: fixed;
	right: 1.25rem;
	bottom: 1.25rem;
	width: min(400px, calc(100vw - 1.5rem));
	max-height: min(88vh, 680px);
	overflow: hidden;
	background: var(--rpp-assistant-cream);
	border-radius: 18px;
	box-shadow: 0 18px 50px rgba(45, 41, 38, 0.22), 0 2px 8px rgba(45, 41, 38, 0.08);
	z-index: 1200;
	display: flex;
	flex-direction: column;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.rpp-assistant:not(.is-open) .rpp-assistant__panel,
.rpp-assistant__panel[hidden] {
	display: none !important;
}

.rpp-assistant.is-open .rpp-assistant__panel {
	display: flex !important;
}

.rpp-assistant__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.95rem 1rem;
	background: var(--rpp-assistant-ink);
	color: #fff;
	flex-shrink: 0;
}

.rpp-assistant__brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
}

.rpp-assistant__avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: rgba(196, 163, 90, 0.18);
	border: 1px solid rgba(196, 163, 90, 0.55);
	object-fit: contain;
	padding: 4px;
	flex-shrink: 0;
}

.rpp-assistant__avatar--fallback {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--rpp-assistant-accent);
	font-weight: 700;
	font-size: 1rem;
}

.rpp-assistant__title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 600;
	line-height: 1.2;
	color: #fff;
	font-family: Georgia, "Times New Roman", serif;
}

.rpp-assistant__subtitle {
	margin: 0.2rem 0 0;
	font-size: 0.72rem;
	line-height: 1.35;
	color: rgba(255, 255, 255, 0.72);
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.rpp-assistant__close {
	appearance: none;
	border: none;
	background: transparent;
	color: rgba(255, 255, 255, 0.75);
	font-size: 1.45rem;
	line-height: 1;
	cursor: pointer;
	padding: 0.15rem 0.35rem;
}

.rpp-assistant__close:hover {
	color: #fff;
}

.rpp-assistant__body {
	flex: 1 1 auto;
	min-height: 0;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.rpp-assistant__chat {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 1rem 1rem 0.5rem;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	min-height: 160px;
}

.rpp-assistant__msg {
	max-width: 94%;
	padding: 0.75rem 0.9rem;
	border-radius: 14px;
	font-size: 0.875rem;
	line-height: 1.5;
}

.rpp-assistant__msg p {
	margin: 0;
}

.rpp-assistant__msg p + p {
	margin-top: 0.45rem;
}

.rpp-assistant__msg--bot {
	align-self: flex-start;
	background: #fff;
	color: var(--rpp-assistant-ink);
	border: 1px solid var(--rpp-assistant-line);
	border-bottom-left-radius: 5px;
}

.rpp-assistant__msg--user {
	align-self: flex-end;
	background: var(--rpp-assistant-ink);
	color: #fff;
	border-bottom-right-radius: 5px;
}

.rpp-assistant__msg-summary {
	margin: 0.5rem 0 0;
	padding: 0;
	list-style: none;
	font-size: 0.78rem;
	color: var(--rpp-assistant-muted);
}

.rpp-assistant__msg-summary li {
	margin: 0.18rem 0;
}

.rpp-assistant__suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	padding: 0.55rem 1rem 0.85rem;
	flex-shrink: 0;
}

.rpp-assistant__suggestions[hidden] {
	display: none !important;
}

.rpp-assistant__chip {
	appearance: none;
	border: 1px solid #d9d3c8;
	background: #fff;
	color: var(--rpp-assistant-ink);
	border-radius: 999px;
	padding: 0.42rem 0.8rem;
	font: inherit;
	font-size: 0.78rem;
	font-weight: 500;
	cursor: pointer;
	line-height: 1.3;
}

.rpp-assistant__chip:hover {
	border-color: var(--rpp-assistant-accent);
	background: #fffdf6;
}

.rpp-assistant__chip--primary {
	background: var(--rpp-assistant-accent);
	border-color: var(--rpp-assistant-accent);
	color: var(--rpp-assistant-ink);
	font-weight: 700;
}

.rpp-assistant__composer {
	display: flex;
	align-items: center;
	gap: 0.55rem;
	padding: 0.75rem 1rem 0.35rem;
	border-top: 1px solid var(--rpp-assistant-line);
	flex-shrink: 0;
	background: var(--rpp-assistant-cream);
}

.rpp-assistant__chat-input {
	flex: 1 1 auto;
	min-width: 0;
	border: 1px solid #d5cfc4;
	border-radius: 999px;
	padding: 0.7rem 1rem;
	font: inherit;
	font-size: 0.875rem;
	color: var(--rpp-assistant-ink);
	background: #fff;
	box-shadow: inset 0 0 0 1px rgba(196, 163, 90, 0.35);
}

.rpp-assistant__chat-input:focus {
	outline: none;
	border-color: var(--rpp-assistant-accent);
	box-shadow: inset 0 0 0 1px var(--rpp-assistant-accent), 0 0 0 3px rgba(196, 163, 90, 0.18);
}

.rpp-assistant__chat-send {
	appearance: none;
	border: none;
	border-radius: 50%;
	width: 2.55rem;
	height: 2.55rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--rpp-assistant-accent);
	color: var(--rpp-assistant-ink);
	font-size: 1.15rem;
	font-weight: 700;
	cursor: pointer;
	flex-shrink: 0;
	line-height: 1;
}

.rpp-assistant__chat-send:hover {
	filter: brightness(0.97);
}

.rpp-assistant__disclaimer {
	margin: 0;
	padding: 0 1.1rem 0.75rem;
	font-size: 0.65rem;
	line-height: 1.4;
	color: #8a847c;
	flex-shrink: 0;
}

.rpp-assistant__filters {
	border-top: 1px solid var(--rpp-assistant-line);
	flex-shrink: 0;
	background: #fff;
}

.rpp-assistant__filters > summary {
	cursor: pointer;
	padding: 0.65rem 1.1rem;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--rpp-assistant-muted);
	list-style: none;
	user-select: none;
}

.rpp-assistant__filters > summary::-webkit-details-marker {
	display: none;
}

.rpp-assistant__form {
	padding: 0 1.1rem 1.1rem;
	display: flex;
	flex-direction: column;
	gap: 0.7rem;
	max-height: 200px;
	overflow-y: auto;
}

.rpp-assistant__row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.6rem;
}

.rpp-assistant__field {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
}

.rpp-assistant__field label {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #555;
}

.rpp-assistant__field select,
.rpp-assistant__field input {
	width: 100%;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 0.55rem 0.65rem;
	font: inherit;
	font-size: 0.875rem;
	color: var(--rpp-assistant-ink);
	background: #fff;
}

.rpp-assistant__submit {
	appearance: none;
	border: none;
	border-radius: 8px;
	padding: 0.75rem 1rem;
	background: var(--rpp-assistant-accent);
	color: var(--rpp-assistant-ink);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 700;
	cursor: pointer;
}

body.rpp-assistant-lock {
	overflow: hidden;
}

@media (max-width: 900px) {
	.rpp-assistant__fab {
		right: 1rem;
		bottom: 1rem;
	}

	.rpp-assistant__panel {
		right: 0;
		left: 0;
		bottom: 0;
		width: 100%;
		max-width: 100%;
		max-height: 92vh;
		border-radius: 18px 18px 0 0;
	}
}

.rpp-assistant .screen-reader-text {
	border: 0;
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	margin: -1px;
	overflow: hidden;
	padding: 0;
	position: absolute;
	width: 1px;
	word-wrap: normal !important;
}
