/* ArmorX AI Assistant — widget styles
   Nautical, restrained. Accent driven by --armorx-accent (set inline from settings). */

#armorx-ai-root {
	--armorx-accent: #0a3d62;
	--armorx-accent-ink: #ffffff;
	--armorx-surface: #ffffff;
	--armorx-ink: #16242e;
	--armorx-muted: #6b7c88;
	--armorx-line: #e4e9ed;
	--armorx-bot-bg: #f3f6f8;
	--armorx-radius: 16px;
	--armorx-shadow: 0 18px 48px rgba(10, 61, 98, 0.22);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Launcher */
.armorx-launcher {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999998;
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 13px 20px 13px 16px;
	border: none;
	border-radius: 999px;
	background: var(--armorx-accent);
	color: var(--armorx-accent-ink);
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.2px;
	cursor: pointer;
	box-shadow: var(--armorx-shadow);
	transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.armorx-launcher:hover {
	transform: translateY(-2px);
	box-shadow: 0 22px 54px rgba(10, 61, 98, 0.3);
}
.armorx-launcher svg { display: block; }
.armorx-launcher.armorx-hidden { display: none; }

/* Panel */
.armorx-panel {
	position: fixed;
	bottom: 24px;
	right: 24px;
	z-index: 999999;
	width: 384px;
	max-width: calc(100vw - 32px);
	height: 620px;
	max-height: calc(100vh - 48px);
	display: flex;
	flex-direction: column;
	background: var(--armorx-surface);
	border-radius: var(--armorx-radius);
	box-shadow: var(--armorx-shadow);
	overflow: hidden;
	opacity: 0;
	transform: translateY(12px) scale(0.98);
	pointer-events: none;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.armorx-panel.armorx-open {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
}

/* Header with a thin "waterline" signature */
.armorx-header {
	position: relative;
	background: var(--armorx-accent);
	color: var(--armorx-accent-ink);
	padding: 18px 18px 22px;
}
.armorx-header h3 { margin: 0; font-size: 17px; font-weight: 700; }
.armorx-header p { margin: 3px 0 0; font-size: 12.5px; opacity: 0.8; }
.armorx-waterline {
	position: absolute;
	left: 0; right: 0; bottom: -1px;
	height: 8px;
	display: block;
}
.armorx-close {
	position: absolute;
	top: 14px; right: 14px;
	width: 30px; height: 30px;
	border: none; border-radius: 50%;
	background: rgba(255,255,255,0.15);
	color: #fff; font-size: 18px; line-height: 1;
	cursor: pointer;
}
.armorx-close:hover { background: rgba(255,255,255,0.28); }

/* Messages */
.armorx-messages {
	flex: 1;
	overflow-y: auto;
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 12px;
	background: #fafcfd;
}
.armorx-msg {
	max-width: 86%;
	padding: 11px 14px;
	border-radius: 14px;
	font-size: 14.5px;
	line-height: 1.5;
	color: var(--armorx-ink);
	word-wrap: break-word;
}
.armorx-msg.user {
	align-self: flex-end;
	background: var(--armorx-accent);
	color: var(--armorx-accent-ink);
	border-bottom-right-radius: 4px;
}
.armorx-msg.bot {
	align-self: flex-start;
	background: var(--armorx-bot-bg);
	border-bottom-left-radius: 4px;
}
.armorx-msg.bot a { color: var(--armorx-accent); font-weight: 600; }
.armorx-msg p { margin: 0 0 8px; }
.armorx-msg p:last-child { margin-bottom: 0; }
.armorx-msg ul { margin: 6px 0; padding-left: 18px; }

/* Product cards */
.armorx-cards { display: flex; flex-direction: column; gap: 8px; margin-top: 4px; align-self: flex-start; max-width: 86%; }
.armorx-card {
	display: flex; justify-content: space-between; align-items: center; gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--armorx-line);
	border-radius: 12px;
	background: #fff;
	text-decoration: none;
	transition: border-color 0.15s ease, transform 0.15s ease;
}
.armorx-card:hover { border-color: var(--armorx-accent); transform: translateX(2px); }
.armorx-card .t { font-size: 13.5px; font-weight: 600; color: var(--armorx-ink); }
.armorx-card .p { font-size: 13px; color: var(--armorx-accent); font-weight: 700; white-space: nowrap; }

/* Typing dots */
.armorx-typing { align-self: flex-start; display: flex; gap: 4px; padding: 12px 14px; background: var(--armorx-bot-bg); border-radius: 14px; }
.armorx-typing span { width: 7px; height: 7px; border-radius: 50%; background: var(--armorx-muted); animation: armorx-bounce 1.2s infinite; }
.armorx-typing span:nth-child(2) { animation-delay: 0.15s; }
.armorx-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes armorx-bounce { 0%, 60%, 100% { transform: translateY(0); opacity: 0.4; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Composer */
.armorx-composer {
	display: flex; gap: 8px; padding: 12px;
	border-top: 1px solid var(--armorx-line);
	background: #fff;
}
.armorx-composer textarea {
	flex: 1; resize: none; border: 1px solid var(--armorx-line);
	border-radius: 12px; padding: 10px 12px; font-size: 14px;
	font-family: inherit; line-height: 1.4; max-height: 96px; outline: none;
	color: var(--armorx-ink);
}
.armorx-composer textarea:focus { border-color: var(--armorx-accent); }
.armorx-send {
	border: none; border-radius: 12px; width: 44px;
	background: var(--armorx-accent); color: #fff; cursor: pointer;
	display: flex; align-items: center; justify-content: center;
}
.armorx-send:disabled { opacity: 0.5; cursor: default; }
.armorx-footnote { text-align: center; font-size: 10.5px; color: var(--armorx-muted); padding: 0 0 8px; background: #fff; }

@media (prefers-reduced-motion: reduce) {
	.armorx-panel, .armorx-launcher, .armorx-card { transition: none; }
	.armorx-typing span { animation: none; }
}
