.star-ask-ai-launcher {
	display: grid;
	gap: 0.75rem;
	margin: 1.5rem 0;
}

.star-ask-ai-launcher--floating {
	position: fixed;
	right: 1rem;
	bottom: 5.5rem;
	z-index: 9998;
	max-width: 18rem;
}

.star-ask-ai-open {
	appearance: none;
	border: 0;
	border-radius: 999px;
	background: #0b5cab;
	color: #fff;
	font: inherit;
	font-weight: 600;
	padding: 0.85rem 1.25rem;
	cursor: pointer;
	box-shadow: 0 10px 24px rgba(11, 92, 171, 0.25);
}

.star-ask-ai-open:hover,
.star-ask-ai-open:focus-visible {
	background: #094a8d;
	outline: 2px solid #fff;
	outline-offset: 2px;
}

.star-ask-ai-fallbacks {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.star-ask-ai-fallback {
	color: #0b5cab;
	text-decoration: underline;
	font-size: 0.95rem;
}

.star-ask-ai-modal[hidden],
.star-ask-ai-modal [hidden] {
	display: none !important;
}

.star-ask-ai-modal {
	position: fixed;
	inset: 0;
	z-index: 9999;
}

.star-ask-ai-modal__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 18, 32, 0.62);
}

.star-ask-ai-modal__panel {
	position: relative;
	display: grid;
	grid-template-rows: auto auto 1fr auto;
	width: min(960px, calc(100vw - 2rem));
	height: min(84vh, 760px);
	margin: 4vh auto 0;
	background: #fff;
	border-radius: 16px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(8, 18, 32, 0.28);
}

.star-ask-ai-modal__header,
.star-ask-ai-modal__footer,
.star-ask-ai-disclaimer,
.star-ask-ai-consent,
.star-ask-ai-unavailable {
	padding: 0.85rem 1rem;
}

.star-ask-ai-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	border-bottom: 1px solid #e7edf5;
}

.star-ask-ai-modal__header h2 {
	margin: 0;
	font-size: 1.1rem;
}

.star-ask-ai-modal__close {
	border: 0;
	background: transparent;
	font-size: 1.5rem;
	line-height: 1;
	cursor: pointer;
}

.star-ask-ai-disclaimer {
	margin: 0;
	background: #fff7e6;
	color: #6b4e00;
	font-size: 0.92rem;
}

.star-ask-ai-frame-wrap,
.star-ask-ai-unavailable,
.star-ask-ai-consent {
	min-height: 0;
}

.star-ask-ai-frame-wrap iframe {
	width: 100%;
	height: 100%;
	border: 0;
	min-height: 420px;
}

.star-ask-ai-consent {
	display: grid;
	gap: 0.75rem;
}

.star-ask-ai-consent label {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	font-size: 0.9rem;
	line-height: 1.5;
}

/*
 * Konsal styles form checkboxes away and swaps in its own control, which left
 * the consent box unclickable inside the modal. The gate must never depend on
 * theme markup, so the native control is restored here.
 */
.star-ask-ai-consent input[type="checkbox"] {
	display: inline-block !important;
	visibility: visible !important;
	position: static !important;
	opacity: 1 !important;
	appearance: auto !important;
	-webkit-appearance: checkbox !important;
	width: 20px !important;
	height: 20px !important;
	min-width: 20px;
	margin: 0.2rem 0 0 !important;
	padding: 0 !important;
	clip: auto !important;
}

.star-ask-ai-consent input[type="checkbox"] + span,
.star-ask-ai-consent label > input[type="checkbox"] ~ * {
	flex: 1 1 auto;
}

.star-ask-ai-consent__continue {
	min-height: 44px;
	justify-self: start;
	border: 0;
	border-radius: 999px;
	background: #0b5cab;
	color: #fff;
	padding: 0.65rem 1rem;
	cursor: pointer;
}

.star-ask-ai-consent__continue:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.star-ask-ai-modal__footer {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	border-top: 1px solid #e7edf5;
}

@media (max-width: 640px) {
	.star-ask-ai-modal__panel {
		width: 100vw;
		height: 100vh;
		margin: 0;
		border-radius: 0;
	}

	.star-ask-ai-launcher--floating {
		right: 0.75rem;
		left: 0.75rem;
		max-width: none;
	}
}
