/* IonFlow Chat widget — Elimstat brand styles */

#ionflow-chat-root {
	--if-primary-blue: #184187;
	--if-light-blue: #e6f5ff;
	--if-medium-blue: #4da6ff;
	--if-bright-blue: #0170bc;
	--if-google-blue: #4285f4;
	--if-button-blue: #3899ff;
	--if-hover-blue: #3a7bce;
	--if-font: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Arial, sans-serif;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 99999;
	font-family: var(--if-font);
	font-size: 15px;
	line-height: 1.45;
}

/* Launcher bubble */
.ionflow-launcher {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58px;
	height: 58px;
	margin-left: auto;
	border: 0;
	border-radius: 50%;
	background: var(--if-primary-blue);
	color: #fff;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(10, 48, 140, 0.35);
	transition: background-color 0.15s ease, transform 0.15s ease;
}

.ionflow-launcher:hover {
	background: var(--if-hover-blue);
	transform: scale(1.05);
}

.ionflow-launcher.is-open {
	background: var(--if-bright-blue);
}

/* Panel */
.ionflow-panel {
	display: flex;
	flex-direction: column;
	width: 370px;
	max-width: calc(100vw - 32px);
	height: 540px;
	max-height: calc(100vh - 120px);
	margin-bottom: 12px;
	overflow: hidden;
	border-radius: 14px;
	background: #fff;
	box-shadow: 0 10px 40px rgba(10, 48, 140, 0.28);
}

.ionflow-panel[hidden] {
	display: none;
}

/* Header */
.ionflow-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 14px;
	background: var(--if-primary-blue);
	color: #fff;
}

.ionflow-header-title {
	font-weight: 700;
	font-size: 16px;
}

.ionflow-header-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.ionflow-header-btn {
	padding: 4px 10px;
	border: 1px solid rgba(255, 255, 255, 0.5);
	border-radius: 6px;
	background: transparent;
	color: #fff;
	font-size: 12px;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.ionflow-header-btn:hover {
	background: rgba(255, 255, 255, 0.15);
}

.ionflow-header-close {
	border: 0;
	font-size: 20px;
	line-height: 1;
	padding: 2px 8px;
}

/* Mode selector */
.ionflow-mode-select {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 22px 18px;
	flex: 1;
	background: var(--if-light-blue);
}

.ionflow-mode-heading {
	margin: 0 0 4px;
	color: var(--if-primary-blue);
	font-size: 17px;
	font-weight: 700;
	text-align: center;
}

.ionflow-mode-card {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px;
	border: 2px solid transparent;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	text-align: left;
	font-family: inherit;
	box-shadow: 0 2px 8px rgba(10, 48, 140, 0.1);
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.ionflow-mode-card:hover {
	border-color: var(--if-medium-blue);
	transform: translateY(-1px);
}

.ionflow-mode-icon {
	font-size: 26px;
}

.ionflow-mode-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.ionflow-mode-title {
	color: var(--if-primary-blue);
	font-size: 15px;
	font-weight: 700;
}

.ionflow-mode-desc {
	color: #444;
	font-size: 13px;
}

/* Thread */
.ionflow-thread {
	flex: 1;
	padding: 14px;
	overflow-y: auto;
	background: #fff;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.ionflow-msg {
	max-width: 85%;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: 14px;
	word-wrap: break-word;
	overflow-wrap: break-word;
}

.ionflow-msg-assistant {
	align-self: flex-start;
	background: var(--if-light-blue);
	color: #1a1a1a;
	border-bottom-left-radius: 4px;
}

.ionflow-msg-user {
	align-self: flex-end;
	background: var(--if-primary-blue);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.ionflow-msg a {
	color: var(--if-bright-blue);
	text-decoration: underline;
}

.ionflow-msg-user a {
	color: #cfe6ff;
}

.ionflow-msg-enter {
	animation: ionflow-fade-in 0.18s ease-out;
}

@keyframes ionflow-fade-in {
	from {
		opacity: 0;
		transform: translateY(4px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Typing indicator */
.ionflow-typing {
	display: inline-flex;
	gap: 4px;
	padding: 12px 14px;
}

.ionflow-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--if-medium-blue);
	animation: ionflow-bounce 1s infinite ease-in-out;
}

.ionflow-typing span:nth-child(2) {
	animation-delay: 0.15s;
}

.ionflow-typing span:nth-child(3) {
	animation-delay: 0.3s;
}

@keyframes ionflow-bounce {

	0%,
	60%,
	100% {
		transform: translateY(0);
		opacity: 0.5;
	}

	30% {
		transform: translateY(-4px);
		opacity: 1;
	}
}

/* Input row */
.ionflow-input-row {
	display: flex;
	gap: 8px;
	padding: 10px;
	border-top: 1px solid #dbe7f5;
	background: #fff;
}

.ionflow-input {
	flex: 1;
	resize: none;
	padding: 9px 11px;
	border: 1px solid #c3d4ec;
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	color: #1a1a1a;
	background: #fff;
}

.ionflow-input:focus {
	outline: 2px solid var(--if-google-blue);
	outline-offset: 1px;
	border-color: var(--if-google-blue);
}

.ionflow-send {
	align-self: flex-end;
	padding: 9px 16px;
	border: 0;
	border-radius: 8px;
	background: var(--if-button-blue);
	color: #fff;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.ionflow-send:hover {
	background: var(--if-hover-blue);
}

.ionflow-send:disabled {
	opacity: 0.6;
	cursor: default;
}

/* Mobile */
@media (max-width: 768px) {
	#ionflow-chat-root {
		right: 12px;
		bottom: 12px;
	}

	.ionflow-panel {
		width: calc(100vw - 24px);
		height: 70vh;
	}
}

/* Privacy notice */
.ionflow-privacy {
	padding: 6px 14px;
	font-size: 11px;
	line-height: 1.4;
	color: #5a6a80;
	text-align: center;
	background: #fff;
}

.ionflow-mode-select .ionflow-privacy {
	background: transparent;
	margin-top: auto;
}

.ionflow-privacy a {
	color: var(--if-bright-blue);
	text-decoration: underline;
}
