/* Floating AI assistant — calendar launcher (mockup match) */

.sln-ai-calendar {
	--sln-ai-fab-size: 58px;
	--sln-ai-fab-bottom: 96px; /* clear HelpScout Beacon */
	--sln-ai-fab-right: 24px;
	--sln-ai-cal-blue: #4f5d95;
	--sln-ai-cal-blue-hover: #445184;
	--sln-ai-cal-blue-soft: #6573a8;
	--sln-ai-cal-bubble: #eef0f4;
	--sln-ai-cal-border: #e4e6ec;
	--sln-ai-cal-footer: #f5f6f8;
	position: fixed;
	right: var(--sln-ai-fab-right);
	bottom: var(--sln-ai-fab-bottom);
	z-index: 100100;
	font-family: var(--sln-ai-font, "Inter", system-ui, -apple-system, "Segoe UI", sans-serif);
	pointer-events: none;
}

.sln-ai-calendar__fab,
.sln-ai-calendar__panel {
	pointer-events: auto;
}

/* FAB — solid blue circle + white calendar icon */
.sln-ai-calendar__fab {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--sln-ai-fab-size);
	height: var(--sln-ai-fab-size);
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 999px;
	background: var(--sln-ai-cal-blue);
	color: #fff;
	box-shadow: 0 10px 28px rgba(79, 93, 149, 0.38);
	cursor: pointer;
	transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.sln-ai-calendar__fab:hover,
.sln-ai-calendar__fab:focus {
	background: var(--sln-ai-cal-blue-hover);
	outline: none;
	transform: translateY(-1px);
	box-shadow: 0 12px 32px rgba(79, 93, 149, 0.45);
}

.sln-ai-calendar__fab:focus-visible {
	box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--sln-ai-cal-blue);
}

.sln-ai-calendar__fab-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	line-height: 0;
}

.sln-ai-calendar__fab-icon img {
	display: block;
	width: 28px;
	height: 28px;
	object-fit: contain;
	filter: brightness(0) invert(1);
}

/* Panel */
.sln-ai-calendar__panel {
	position: absolute;
	right: 0;
	bottom: calc(var(--sln-ai-fab-size) + 14px);
	display: flex;
	flex-direction: column;
	width: min(380px, calc(100vw - 48px));
	height: min(520px, 68vh);
	background: #fff;
	border: none;
	border-radius: 16px;
	box-shadow: 0 18px 48px rgba(30, 40, 70, 0.22);
	overflow: hidden;
}

.sln-ai-calendar__panel[hidden] {
	display: none !important;
}

/* Blue header */
.sln-ai-calendar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 14px 14px 14px 16px;
	border-bottom: none;
	background: var(--sln-ai-cal-blue);
	flex: 0 0 auto;
}

.sln-ai-calendar__header-main {
	display: flex;
	align-items: center;
	gap: 10px;
	min-width: 0;
}

.sln-ai-calendar__header-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--sln-ai-cal-blue-soft);
	flex-shrink: 0;
}

.sln-ai-calendar__header-icon img {
	display: block;
	width: 20px;
	height: 20px;
	object-fit: contain;
	filter: brightness(0) invert(1);
}

.sln-ai-calendar__title {
	font-size: 16px;
	font-weight: 700;
	color: #fff;
	line-height: 1.3;
}

.sln-ai-calendar__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	margin: 0;
	padding: 0;
	border: none;
	border-radius: 8px;
	background: transparent;
	color: #fff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	opacity: 0.92;
}

.sln-ai-calendar__close:hover,
.sln-ai-calendar__close:focus {
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	outline: none;
	opacity: 1;
}

.sln-ai-calendar__body {
	display: flex;
	flex-direction: column;
	flex: 1 1 auto;
	min-height: 0;
	background: #fff;
}

.sln-ai-calendar .sln-ai-setup__chat-welcome {
	display: none !important;
}

.sln-ai-calendar__backend {
	display: none !important;
}

.sln-ai-calendar .sln-ai-setup__messages {
	flex: 1 1 auto;
	min-height: 120px;
	max-height: none;
	padding: 16px 14px 8px;
	background: #fff;
}

.sln-ai-calendar .sln-ai-setup__messages:empty {
	display: block;
	min-height: 120px;
}

.sln-ai-calendar .sln-ai-setup__msg {
	max-width: 88%;
	font-size: 13.5px;
	line-height: 1.45;
	padding: 10px 12px;
	margin-bottom: 10px;
}

.sln-ai-calendar .sln-ai-setup__msg--assistant {
	background: var(--sln-ai-cal-bubble) !important;
	color: #2a2f3a !important;
	border-radius: 12px 12px 12px 4px;
}

.sln-ai-calendar .sln-ai-setup__msg--user {
	background: var(--sln-ai-cal-blue) !important;
	color: #fff !important;
	border-radius: 12px 12px 4px 12px;
}

.sln-ai-calendar .sln-ai-setup__msg--system {
	background: transparent !important;
	color: #8a91a3 !important;
	font-size: 12px;
}

.sln-ai-calendar .sln-ai-setup__msg--thinking {
	padding: 0 !important;
	background: transparent !important;
}

.sln-ai-calendar .sln-ai-setup__thinking-icon {
	width: 22px;
	height: 22px;
	padding: 5px;
	border-radius: 9px;
	background: var(--sln-ai-cal-bubble);
	border-color: color-mix(in srgb, var(--sln-ai-cal-blue) 16%, #e6e9f0);
}

.sln-ai-calendar .sln-ai-setup__thinking-label {
	font-size: 12.5px;
	color: #5c6478;
}

.sln-ai-calendar .sln-ai-setup__msg--error {
	border-radius: 12px;
}

.sln-ai-calendar .sln-ai-setup__preview {
	margin: 0 12px 8px;
	padding: 12px;
	border-radius: 12px;
	border-color: color-mix(in srgb, var(--sln-ai-cal-blue) 35%, #fff);
	background: color-mix(in srgb, var(--sln-ai-cal-blue) 8%, #fff);
}

.sln-ai-calendar .sln-ai-setup__preview-actions .button-primary,
.sln-ai-calendar .sln-ai-setup__composer .button-primary {
	background: var(--sln-ai-cal-blue) !important;
	border-color: var(--sln-ai-cal-blue) !important;
}

.sln-ai-calendar .sln-ai-setup__preview-actions .button-primary:hover,
.sln-ai-calendar .sln-ai-setup__preview-actions .button-primary:focus,
.sln-ai-calendar .sln-ai-setup__composer .button-primary:hover,
.sln-ai-calendar .sln-ai-setup__composer .button-primary:focus {
	background: var(--sln-ai-cal-blue-hover) !important;
	border-color: var(--sln-ai-cal-blue-hover) !important;
}

.sln-ai-calendar .sln-ai-setup__suggestions {
	display: none !important;
}

/* Composer footer */
.sln-ai-calendar__composer.sln-ai-setup__composer {
	margin: 0;
	padding: 12px 12px 10px;
	border-top: 1px solid var(--sln-ai-cal-border);
	background: var(--sln-ai-cal-footer);
	gap: 8px;
	align-items: center;
}

.sln-ai-calendar .sln-ai-setup__composer textarea {
	min-height: 42px;
	max-height: 96px;
	resize: none;
	font-size: 13px !important;
	border-radius: 10px !important;
	border-color: var(--sln-ai-cal-border) !important;
	background: #fff !important;
	padding: 10px 12px !important;
}

.sln-ai-calendar .sln-ai-setup__composer textarea:focus {
	border-color: var(--sln-ai-cal-blue) !important;
	box-shadow: 0 0 0 2px rgba(79, 93, 149, 0.18) !important;
}

.sln-ai-calendar .sln-ai-setup__composer .button-primary {
	padding: 10px 16px !important;
	font-size: 13px !important;
	border-radius: 10px !important;
	min-width: 72px;
}

.sln-ai-calendar .sln-ai-setup__composer .sln-ai-setup__mic {
	min-width: 40px;
	width: 40px;
	height: 40px;
	border-radius: 10px !important;
	color: var(--sln-ai-cal-blue);
}

.sln-ai-calendar .sln-ai-setup__composer .sln-ai-setup__mic[aria-pressed="true"],
.sln-ai-calendar .sln-ai-setup__composer.is-listening .sln-ai-setup__mic {
	background: var(--sln-ai-cal-blue) !important;
	border-color: var(--sln-ai-cal-blue) !important;
	color: #fff;
}

.sln-ai-calendar__footer-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
	padding: 0 12px 12px;
	background: var(--sln-ai-cal-footer);
}

.sln-ai-calendar__full-link {
	font-size: 11.5px;
	font-weight: 500;
	color: var(--sln-ai-cal-blue) !important;
	text-decoration: none !important;
	box-shadow: none !important;
	margin-left: auto;
}

.sln-ai-calendar__full-link:hover {
	text-decoration: underline !important;
}

.sln-ai-calendar.is-busy .sln-ai-setup__composer .button-primary,
.sln-ai-calendar.is-busy .sln-ai-setup__composer .sln-ai-setup__mic,
.sln-ai-calendar.is-busy .sln-ai-setup__undo {
	opacity: 0.65;
	pointer-events: none;
}

@media (max-width: 782px) {
	.sln-ai-calendar {
		--sln-ai-fab-bottom: 88px;
		--sln-ai-fab-right: 16px;
	}

	.sln-ai-calendar__panel {
		width: calc(100vw - 32px);
		height: min(72vh, 540px);
	}
}
