/**
 * AIM Chat widget styles. Brand: navy #172A42, light #EEF2F8.
 * @author Fudo
 * @date 2026-08-21
 */
:root {
	--aimc-navy: #172A42;
	--aimc-navy-soft: #2A3B55;
	--aimc-light: #EEF2F8;
	--aimc-border: #D6DEEA;
	--aimc-muted: #8895A8;
}

#aim-chat-root {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 99999;
	font-family: inherit;
}

.aimc-bubble {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--aimc-navy);
	border: 0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 10px 28px rgba(23, 42, 66, 0.4);
}

.aimc-panel {
	position: absolute;
	right: 0;
	bottom: 78px;
	width: 380px;
	max-width: calc(100vw - 32px);
	height: 500px;
	max-height: calc(100vh - 130px);
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 28px 70px rgba(13, 24, 40, 0.45);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.aimc-head {
	background: var(--aimc-navy);
	color: #fff;
	padding: 18px 18px 20px;
	display: flex;
	align-items: center;
	gap: 14px;
}

.aimc-avatar {
	width: 46px;
	height: 46px;
	border-radius: 50%;
	background: var(--aimc-light);
	color: var(--aimc-navy);
	font-family: 'Playfair Display', Georgia, serif;
	font-style: italic;
	font-size: 22px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.aimc-headtxt {
	display: flex;
	flex-direction: column;
	gap: 3px;
	flex: 1;
	min-width: 0;
}

.aimc-title {
	font-family: 'Playfair Display', Georgia, serif;
	font-style: italic;
	font-weight: 600;
	font-size: 19px;
	line-height: 1.2;
	color: #fff;
}

.aimc-status {
	display: flex;
	align-items: center;
	gap: 7px;
	font-size: 13px;
	color: #C7D0DE;
}

.aimc-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #5BBF7F;
	flex-shrink: 0;
}

.aimc-close {
	background: var(--aimc-navy-soft);
	border: 0;
	border-radius: 12px;
	width: 40px;
	height: 40px;
	color: #fff;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.aimc-gate {
	padding: 30px 24px 24px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.aimc-gate p {
	margin: 0;
	font-size: 17px;
	line-height: 1.55;
	color: #3E4E64;
}

.aimc-gate small {
	font-size: 13px;
	color: var(--aimc-muted);
	text-align: center;
}

.aimc-email {
	border: 2px solid var(--aimc-navy);
	border-radius: 10px;
	padding: 15px 16px;
	font-size: 16px;
	width: 100%;
	box-sizing: border-box;
	color: var(--aimc-navy);
	background: #fff;
}

.aimc-email::placeholder {
	color: var(--aimc-muted);
}

.aimc-email:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(23, 42, 66, 0.15);
}

.aimc-start {
	background: var(--aimc-navy);
	color: #fff;
	border: 0;
	border-radius: 14px;
	padding: 16px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 3px;
	text-transform: uppercase;
	cursor: pointer;
}

.aimc-err {
	color: #8E3B50;
	font-size: 12px;
	min-height: 14px;
	text-align: center;
}

.aimc-chat {
	display: flex;
	flex-direction: column;
	flex: 1;
	min-height: 0;
}

.aimc-msgs {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: var(--aimc-light);
}

.aimc-msg {
	max-width: 85%;
	padding: 11px 14px;
	font-size: 14px;
	line-height: 1.5;
	word-wrap: break-word;
	border-radius: 14px;
}

.aimc-user {
	align-self: flex-end;
	background: var(--aimc-navy);
	color: #fff;
	border-bottom-right-radius: 4px;
}

.aimc-assistant {
	align-self: flex-start;
	background: #fff;
	border: 1px solid var(--aimc-border);
	color: #22344C;
	border-bottom-left-radius: 4px;
}

.aimc-assistant a {
	color: #8E3B50;
	word-break: break-all;
}

.aimc-typing {
	color: var(--aimc-muted);
}

.aimc-form {
	display: flex;
	border-top: 1px solid var(--aimc-border);
	background: #fff;
}

.aimc-form .aimc-input {
	border: 0;
	flex: 1;
	padding: 15px 16px;
	font-size: 15px;
	color: var(--aimc-navy);
	background: #fff;
}

.aimc-form .aimc-input:focus {
	outline: none;
}

.aimc-send {
	background: none;
	border: 0;
	padding: 0 16px;
	cursor: pointer;
	display: flex;
	align-items: center;
}

@media (max-width: 480px) {
	.aimc-panel {
		width: calc(100vw - 32px);
		height: 72vh;
	}
}

/* Theme override hardening */
#aim-chat-root button { all: unset; box-sizing: border-box; cursor: pointer; }
#aim-chat-root .aimc-bubble { width: 60px !important; height: 60px !important; border-radius: 50% !important; background: #172A42 !important; display: flex !important; align-items: center; justify-content: center; box-shadow: 0 10px 28px rgba(23,42,66,.4); }
#aim-chat-root .aimc-bubble svg { display: block; }
#aim-chat-root .aimc-close { width: 40px !important; height: 40px !important; border-radius: 12px !important; background: #2A3B55 !important; color: #fff !important; display: flex !important; align-items: center; justify-content: center; font-size: 20px; line-height: 1; }
#aim-chat-root .aimc-start { display: block; width: 100%; background: #172A42 !important; color: #fff !important; border-radius: 14px !important; padding: 16px !important; text-align: center; font-weight: 700; letter-spacing: 3px; text-transform: uppercase; font-size: 14px; }
#aim-chat-root .aimc-send { display: flex !important; align-items: center; padding: 0 16px !important; background: none !important; }
#aim-chat-root .aimc-title { white-space: nowrap; font-size: 17px; }
#aim-chat-root .aimc-panel { width: 408px; }
#aim-chat-root .aimc-title { font-size: 15.5px; }
#aim-chat-root .aimc-head { gap: 12px; }
