/**
 * Nemonoor theming for chatbot-widget.
 *
 * The widget uses Shadow DOM; only CSS custom properties cross the boundary.
 * Host padding lives here so editors need not wrap every mount in a Group.
 * See plugin widget/widget.css.
 */

chatbot-widget,
chatbot-search-wizard {
	--chatbot-color-bg: var(--wp--preset--color--base, #fff);
	--chatbot-color-fg: var(--wp--preset--color--contrast, #06324f);
	--chatbot-color-primary: var(--wp--preset--color--contrast, #06324f);
	--chatbot-color-primary-fg: var(--wp--preset--color--base, #fff);
	--chatbot-color-focus-ring: var(--wp--preset--color--accent-1, #00f6ff);
	--chatbot-color-border: color-mix(in srgb, var(--wp--preset--color--contrast, #06324f) 18%, transparent);
	--chatbot-color-muted-fg: var(--wp--preset--color--accent-6, #707070);
	--chatbot-color-disclosure-bg: color-mix(in srgb, var(--wp--preset--color--accent-2, #0b8e8d) 10%, var(--wp--preset--color--base, #fff));
	--chatbot-color-disclosure-fg: var(--wp--preset--color--contrast, #06324f);
	--chatbot-color-disclosure-border: color-mix(in srgb, var(--wp--preset--color--accent-2, #0b8e8d) 28%, transparent);
	--chatbot-color-user-bubble-bg: color-mix(in srgb, var(--wp--preset--color--accent-2, #0b8e8d) 16%, var(--wp--preset--color--base, #fff));
	--chatbot-color-bot-bubble-bg: color-mix(in srgb, var(--wp--preset--color--contrast, #06324f) 6%, var(--wp--preset--color--base, #fff));
	--chatbot-color-decline-bubble-bg: color-mix(in srgb, var(--wp--preset--color--contrast, #06324f) 6%, var(--wp--preset--color--base, #fff));
	--chatbot-color-decline-border: color-mix(in srgb, var(--wp--preset--color--contrast, #06324f) 16%, transparent);
	--chatbot-color-link: var(--wp--preset--color--accent-2, #0b8e8d);
	--chatbot-color-highlight-bg: color-mix(in srgb, var(--wp--preset--color--accent-1, #00f6ff) 35%, #fff);
	--chatbot-font-family: var(--wp--preset--font-family--body, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif);
	--chatbot-font-size: 15px;
	--chatbot-radius: 0.75rem;

	display: block;
	box-sizing: border-box;
	width: 100%;
	/* Inset without a card frame — breathing room from content edges. */
	padding-inline: clamp(0.75rem, 3vw, 1.75rem);
	padding-block: clamp(0.5rem, 1.5vw, 1rem);
}

chatbot-widget + chatbot-search-wizard,
chatbot-search-wizard + chatbot-widget,
chatbot-widget + chatbot-widget,
chatbot-search-wizard + chatbot-search-wizard {
	margin-top: 1.5rem;
}

/* Inline mounts inside Nemonoor service finder (panel already pads). */
.nemonoor-service-finder__chatbot-panel,
.nemonoor-service-finder__search-wizard-panel {
	margin-top: 1.5rem;
	padding: 1.25rem 1.25rem 1.5rem;
	border-radius: 0.75rem;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--contrast, #06324f) 12%, transparent);
	background: color-mix(in srgb, currentColor 3%, var(--wp--preset--color--base, #fff));
}

.nemonoor-service-finder__chatbot-panel[hidden],
.nemonoor-service-finder__search-wizard-panel[hidden] {
	display: none !important;
}

.nemonoor-service-finder__chatbot-panel chatbot-widget,
.nemonoor-service-finder__search-wizard-panel chatbot-search-wizard {
	padding: 0;
	min-height: 0;
}

.nemonoor-service-finder__chatbot-panel chatbot-widget {
	min-height: 28rem;
}

.nemonoor-service-finder__chatbot-placeholder,
.nemonoor-service-finder__search-wizard-placeholder {
	margin: 0;
	color: var(--wp--preset--color--accent-6, #707070);
}
