/**
 * Conversation widget styles — scoped under .sgp-haia-widget--conversation
 *
 * Panel height, launcher visibility and body scroll-lock are owned by
 * frontend.css / frontend.js so static and conversational modes stay aligned.
 */

.sgp-haia-widget--conversation .sgp-haia-suggestions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 16px;
}

.sgp-haia-widget--conversation .sgp-haia-suggestions[hidden] {
	display: none;
}

.sgp-haia-widget--conversation .sgp-haia-suggestions__item {
	min-height: 44px;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--sgp-haia-border);
	border-radius: 999px;
	background: var(--sgp-haia-soft);
	color: var(--sgp-haia-text);
	font: inherit;
	font-size: 13px;
	line-height: 1.35;
	text-align: left;
	cursor: pointer;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.sgp-haia-widget--conversation .sgp-haia-suggestions__item:hover {
	border-color: var(--sgp-haia-accent);
	background: var(--sgp-haia-powder);
}

.sgp-haia-widget--conversation .sgp-haia-suggestions__item:focus-visible {
	outline: 3px solid var(--sgp-haia-accent);
	outline-offset: 2px;
}

.sgp-haia-widget--conversation .sgp-haia-message--user {
	margin-left: auto;
	border-color: #f5c1c9;
	border-radius: calc(var(--sgp-haia-radius) * 0.75) calc(var(--sgp-haia-radius) * 0.75) 5px calc(var(--sgp-haia-radius) * 0.75);
	background: var(--sgp-haia-primary);
}

.sgp-haia-widget--conversation .sgp-haia-message--user p {
	color: var(--sgp-haia-button-text);
}

.sgp-haia-widget--conversation .sgp-haia-message--assistant {
	max-width: 100%;
	margin-top: 12px;
}

.sgp-haia-widget--conversation .sgp-haia-message--user + .sgp-haia-message--assistant,
.sgp-haia-widget--conversation .sgp-haia-message--assistant + .sgp-haia-message--user {
	margin-top: 12px;
}

.sgp-haia-widget--conversation .sgp-haia-message--thinking {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.sgp-haia-widget--conversation .sgp-haia-thinking__dots {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.sgp-haia-widget--conversation .sgp-haia-thinking__dots span {
	display: block;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--sgp-haia-accent);
	animation: sgp-haia-dot-bounce 1.2s infinite ease-in-out;
}

.sgp-haia-widget--conversation .sgp-haia-thinking__dots span:nth-child(2) {
	animation-delay: 0.15s;
}

.sgp-haia-widget--conversation .sgp-haia-thinking__dots span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes sgp-haia-dot-bounce {
	0%,
	80%,
	100% {
		transform: translateY(0);
		opacity: 0.45;
	}
	40% {
		transform: translateY(-4px);
		opacity: 1;
	}
}

.sgp-haia-widget--conversation .sgp-haia-card {
	margin-top: 14px;
	padding: 14px 16px;
	border: 1px solid var(--sgp-haia-border);
	border-radius: calc(var(--sgp-haia-radius) * 0.65);
	background: var(--sgp-haia-soft);
}

.sgp-haia-widget--conversation .sgp-haia-card__title {
	margin: 0 0 8px;
	color: var(--sgp-haia-primary-dark);
	font-family: Georgia, "Times New Roman", serif;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
}

.sgp-haia-widget--conversation .sgp-haia-card__text {
	margin: 0 0 8px;
	color: var(--sgp-haia-text);
	font-size: 13px;
	line-height: 1.55;
}

.sgp-haia-widget--conversation .sgp-haia-card__text:last-of-type {
	margin-bottom: 0;
}

.sgp-haia-widget--conversation .sgp-haia-card--recommendation {
	background: var(--sgp-haia-powder);
}

.sgp-haia-widget--conversation .sgp-haia-card--commercial {
	border-color: #f0d7b9;
	background: #fff8f0;
}

.sgp-haia-widget--conversation .sgp-haia-card--human {
	border-color: #f5c1c9;
	background: #fff5f7;
}

.sgp-haia-widget--conversation .sgp-haia-card__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	width: 100%;
	margin-top: 12px;
}

.sgp-haia-widget--conversation .sgp-haia-card__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 16px;
	border-radius: 22px;
	background: var(--sgp-haia-primary);
	color: var(--sgp-haia-button-text);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.sgp-haia-widget--conversation .sgp-haia-card__cta:hover {
	background: var(--sgp-haia-primary-dark);
	color: var(--sgp-haia-button-text);
}

.sgp-haia-widget--conversation .sgp-haia-card__cta:focus-visible {
	outline: 3px solid var(--sgp-haia-accent);
	outline-offset: 2px;
}

.sgp-haia-widget--conversation .sgp-haia-composer--active {
	flex-wrap: wrap;
	align-items: flex-end;
}

.sgp-haia-widget--conversation .sgp-haia-composer__input {
	min-height: 44px;
	max-height: 120px;
	resize: vertical;
	color: var(--sgp-haia-text);
}

.sgp-haia-widget--conversation .sgp-haia-composer__send,
.sgp-haia-widget--conversation .sgp-haia-composer__reset {
	min-height: 44px;
	cursor: pointer;
}

.sgp-haia-widget--conversation .sgp-haia-composer__reset {
	flex: 0 0 auto;
	margin: 0;
	padding: 10px 14px;
	border: 1px solid var(--sgp-haia-border);
	border-radius: 22px;
	background: transparent;
	color: var(--sgp-haia-text-soft);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
}

.sgp-haia-widget--conversation .sgp-haia-composer__reset:hover:not(:disabled) {
	border-color: var(--sgp-haia-accent);
	color: var(--sgp-haia-primary-dark);
}

.sgp-haia-widget--conversation .sgp-haia-composer__reset:disabled {
	cursor: not-allowed;
	opacity: 0.52;
}

.sgp-haia-widget--conversation .sgp-haia-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.sgp-haia-widget--conversation .sgp-haia-status {
	flex: 0 0 auto;
	min-height: 0;
	margin: 0;
	padding: 0 14px 4px;
	color: var(--sgp-haia-text-soft);
	font-size: 12px;
	line-height: 1.4;
}

.sgp-haia-widget--conversation .sgp-haia-privacy {
	flex: 0 0 auto;
	margin: 0;
	padding: 0 14px 12px;
	padding-bottom: max(12px, env(safe-area-inset-bottom));
	color: var(--sgp-haia-text-soft);
	font-size: 11px;
	line-height: 1.45;
}

.sgp-haia-widget--conversation .sgp-haia-card__cta {
	max-width: 100%;
	box-sizing: border-box;
}

@media (prefers-reduced-motion: reduce) {
	.sgp-haia-widget--conversation .sgp-haia-thinking__dots span {
		animation: none;
		opacity: 0.75;
	}
}
