/* AI Sales Chatbot Widget */

#aichat-widget-root {
	--aichat-primary: #6366f1;
	--aichat-primary-dark: #4f46e5;
	--aichat-accent: #a855f7;
	--aichat-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #a855f7 100%);
	--aichat-bg: #ffffff;
	--aichat-text: #0f172a;
	--aichat-muted: #64748b;
	--aichat-border: #e2e8f0;
	--aichat-user-bg: linear-gradient(135deg, #6366f1, #8b5cf6);
	--aichat-user-text: #ffffff;
	--aichat-assistant-bg: #f8fafc;
	--aichat-shadow: 0 12px 40px rgba(79, 70, 229, 0.22);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, sans-serif;
}

.aichat-widget {
	position: fixed;
	bottom: 24px;
	z-index: 999999;
}

.aichat-widget--right {
	right: 24px;
	left: auto;
}

.aichat-widget--left {
	left: 24px;
	right: auto;
}

.aichat-toggle {
	position: relative;
	width: auto;
	min-width: 64px;
	height: 64px;
	padding: 0 16px 0 14px;
	border-radius: 999px;
	border: none;
	background: var(--aichat-gradient);
	color: #fff;
	cursor: pointer;
	box-shadow: var(--aichat-shadow);
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: center;
	gap: 10px;
	transition: transform 0.2s, box-shadow 0.2s;
}

.aichat-toggle-ring {
	position: absolute;
	inset: -4px;
	border-radius: 999px;
	border: 2px solid rgba(99, 102, 241, 0.45);
	animation: aichat-pulse 2s ease-out infinite;
	pointer-events: none;
}

@keyframes aichat-pulse {
	0% { transform: scale(0.95); opacity: 1; }
	70% { transform: scale(1.08); opacity: 0; }
	100% { transform: scale(1.08); opacity: 0; }
}

.aichat-toggle-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
	flex-shrink: 0;
}

.aichat-toggle-icon,
.aichat-avatar,
.aichat-msg-avatar,
.aichat-proactive-avatar {
	color: #fff;
}

.aichat-ai-icon {
	width: 26px;
	height: 26px;
	display: block;
	flex-shrink: 0;
}

.aichat-toggle-label {
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1.15;
	text-align: left;
	white-space: nowrap;
}

.aichat-toggle-notify {
	position: absolute;
	top: 2px;
	right: 2px;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: #22c55e;
	border: 2px solid #fff;
	box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.6);
	animation: aichat-notify-ping 1.6s ease-out infinite;
	pointer-events: none;
}

.aichat-toggle-notify[hidden] {
	display: none;
}

@keyframes aichat-notify-ping {
	0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.55); }
	70% { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
	100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.aichat-toggle--attention {
	animation: aichat-wiggle 0.55s ease-in-out 4;
}

@keyframes aichat-wiggle {
	0%, 100% { transform: rotate(0) scale(1); }
	20% { transform: rotate(-6deg) scale(1.08); }
	40% { transform: rotate(6deg) scale(1.08); }
	60% { transform: rotate(-4deg) scale(1.05); }
	80% { transform: rotate(4deg) scale(1.05); }
}

.aichat-toggle:hover {
	transform: scale(1.06);
	box-shadow: 0 16px 48px rgba(79, 70, 229, 0.32);
}

.aichat-proactive {
	position: absolute;
	bottom: 8px;
	width: 300px;
	max-width: calc(100vw - 100px);
	padding: 0;
	background: linear-gradient(180deg, #ffffff 0%, #f8f7ff 100%);
	border: 1px solid rgba(99, 102, 241, 0.28);
	border-radius: 20px;
	box-shadow:
		0 22px 50px rgba(79, 70, 229, 0.22),
		0 8px 20px rgba(15, 23, 42, 0.08);
	opacity: 0;
	transform: translateY(16px) scale(0.92);
	transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
	pointer-events: none;
	z-index: 2;
	overflow: hidden;
	cursor: pointer;
}

.aichat-proactive-glow {
	position: absolute;
	inset: -1px;
	border-radius: inherit;
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.35), rgba(168, 85, 247, 0.25), rgba(99, 102, 241, 0.35));
	background-size: 200% 200%;
	animation: aichat-proactive-shimmer 3s linear infinite;
	opacity: 0.45;
	pointer-events: none;
	z-index: 0;
}

@keyframes aichat-proactive-shimmer {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

.aichat-proactive--visible {
	opacity: 1;
	transform: translateY(0) scale(1);
	pointer-events: auto;
	animation: aichat-proactive-float 4s ease-in-out infinite;
}

@keyframes aichat-proactive-float {
	0%, 100% { transform: translateY(0) scale(1); }
	50% { transform: translateY(-4px) scale(1); }
}

.aichat-widget--right .aichat-proactive {
	right: 100%;
	margin-right: 14px;
	left: auto;
}

.aichat-widget--left .aichat-proactive {
	left: 100%;
	margin-left: 14px;
	right: auto;
}

.aichat-widget--right .aichat-proactive::after {
	content: "";
	position: absolute;
	right: -7px;
	bottom: 28px;
	width: 14px;
	height: 14px;
	background: #f8f7ff;
	border-right: 1px solid rgba(99, 102, 241, 0.28);
	border-bottom: 1px solid rgba(99, 102, 241, 0.28);
	transform: rotate(-45deg);
	z-index: 1;
}

.aichat-widget--left .aichat-proactive::after {
	content: "";
	position: absolute;
	left: -7px;
	bottom: 28px;
	width: 14px;
	height: 14px;
	background: #f8f7ff;
	border-left: 1px solid rgba(99, 102, 241, 0.28);
	border-bottom: 1px solid rgba(99, 102, 241, 0.28);
	transform: rotate(45deg);
	z-index: 1;
}

.aichat-proactive-close {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 28px;
	height: 28px;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.85);
	color: #64748b;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	z-index: 3;
	transition: background 0.2s, color 0.2s, transform 0.2s;
}

.aichat-proactive-close:hover {
	background: #fff;
	color: #0f172a;
	transform: scale(1.08);
}

.aichat-proactive-header {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px 44px 10px 16px;
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.08) 100%);
	border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

.aichat-proactive-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--aichat-gradient);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.aichat-proactive-avatar .aichat-ai-icon {
	width: 24px;
	height: 24px;
}

.aichat-proactive-meta {
	min-width: 0;
}

.aichat-proactive-name {
	font-size: 15px;
	font-weight: 800;
	color: #0f172a;
	line-height: 1.2;
	margin-bottom: 4px;
}

.aichat-proactive-status {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #16a34a;
}

.aichat-proactive-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
	animation: aichat-notify-ping 1.6s ease-out infinite;
	flex-shrink: 0;
}

.aichat-proactive-body {
	position: relative;
	z-index: 1;
	padding: 14px 16px 10px;
	min-height: 52px;
}

.aichat-proactive-typing {
	display: flex;
	align-items: center;
	gap: 5px;
	padding: 10px 14px;
	background: #fff;
	border: 1px solid rgba(99, 102, 241, 0.12);
	border-radius: 14px 14px 14px 4px;
	width: fit-content;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.aichat-proactive-typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #8b5cf6;
	animation: aichat-proactive-dot-bounce 1.2s ease-in-out infinite;
}

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

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

@keyframes aichat-proactive-dot-bounce {
	0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
	30% { transform: translateY(-5px); opacity: 1; }
}

.aichat-proactive-text {
	margin: 0;
	font-size: 14px;
	line-height: 1.55;
	font-weight: 500;
	color: #1e293b;
	padding: 10px 14px;
	background: #fff;
	border: 1px solid rgba(99, 102, 241, 0.12);
	border-radius: 14px 14px 14px 4px;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.aichat-proactive-text--visible {
	opacity: 1;
	transform: translateY(0);
}

.aichat-proactive-perks {
	position: relative;
	z-index: 1;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0 16px 12px;
}

.aichat-proactive-perk {
	font-size: 11px;
	font-weight: 700;
	color: #6366f1;
	background: rgba(99, 102, 241, 0.1);
	border: 1px solid rgba(99, 102, 241, 0.15);
	padding: 4px 10px;
	border-radius: 999px;
}

.aichat-proactive-suggestions {
	position: relative;
	z-index: 1;
	padding: 0 16px 12px;
}

.aichat-proactive-suggestions .aichat-suggestions-panel {
	padding: 10px;
}

.aichat-proactive-suggestions .aichat-suggestions-grid {
	gap: 6px;
}

.aichat-proactive-suggestions .aichat-suggestion-card {
	min-height: 64px;
	padding: 8px 6px;
}

.aichat-proactive-suggestions .aichat-suggestion-card-icon {
	width: 28px;
	height: 28px;
}

.aichat-proactive-suggestions .aichat-suggestion-card-icon svg {
	width: 16px;
	height: 16px;
}

.aichat-proactive-suggestions .aichat-suggestion-card-label {
	font-size: 10px;
}

.aichat-proactive-cta {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: calc(100% - 32px);
	margin: 0 16px 16px;
	border: none;
	border-radius: 12px;
	padding: 13px 16px;
	background: var(--aichat-gradient);
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(99, 102, 241, 0.35);
	transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
	animation: aichat-cta-pulse 2.2s ease-in-out infinite;
}

@keyframes aichat-cta-pulse {
	0%, 100% { box-shadow: 0 8px 22px rgba(99, 102, 241, 0.35); }
	50% { box-shadow: 0 10px 28px rgba(99, 102, 241, 0.5); }
}

.aichat-proactive-cta:hover {
	filter: brightness(1.06);
	transform: translateY(-1px);
}

.aichat-proactive-cta svg {
	flex-shrink: 0;
	transition: transform 0.2s;
}

.aichat-proactive-cta:hover svg {
	transform: translateX(3px);
}

.aichat-proactive:hover .aichat-proactive-cta {
	filter: brightness(1.06);
}

.aichat-toggle--active {
	transform: scale(0.94);
	box-shadow: 0 8px 24px rgba(79, 70, 229, 0.2);
}

.aichat-panel {
	position: absolute;
	bottom: 80px;
	width: 400px;
	max-width: calc(100vw - 32px);
	max-height: 580px;
	background: linear-gradient(180deg, #ffffff 0%, #f8f7ff 100%);
	border-radius: 22px;
	box-shadow:
		0 24px 60px rgba(79, 70, 229, 0.24),
		0 10px 24px rgba(15, 23, 42, 0.08);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid rgba(99, 102, 241, 0.28);
	opacity: 0;
	transform: translateY(20px) scale(0.94);
	transition: opacity 0.35s ease, transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.aichat-panel-glow {
	position: absolute;
	inset: -1px;
	border-radius: inherit;
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.3), rgba(168, 85, 247, 0.2), rgba(99, 102, 241, 0.3));
	background-size: 200% 200%;
	animation: aichat-proactive-shimmer 4s linear infinite;
	opacity: 0.35;
	pointer-events: none;
	z-index: 0;
}

.aichat-panel--open {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.aichat-widget--right .aichat-panel {
	right: 0;
	left: auto;
}

.aichat-widget--left .aichat-panel {
	left: 0;
	right: auto;
}

.aichat-header {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 16px 16px 14px;
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.12) 0%, rgba(168, 85, 247, 0.08) 100%);
	border-bottom: 1px solid rgba(99, 102, 241, 0.1);
	color: var(--aichat-text);
}

.aichat-header-brand {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
}

.aichat-avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: var(--aichat-gradient);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 6px 16px rgba(99, 102, 241, 0.35);
}

.aichat-avatar .aichat-ai-icon {
	width: 24px;
	height: 24px;
}

.aichat-header-text {
	min-width: 0;
}

.aichat-header-title {
	font-weight: 800;
	font-size: 15px;
	line-height: 1.2;
	color: #0f172a;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.aichat-header-status {
	display: flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #16a34a;
	margin-top: 4px;
}

.aichat-status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #22c55e;
	box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5);
	animation: aichat-notify-ping 1.6s ease-out infinite;
	flex-shrink: 0;
}

.aichat-close {
	background: rgba(255, 255, 255, 0.9);
	border: none;
	color: #64748b;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	flex-shrink: 0;
	transition: background 0.2s, color 0.2s, transform 0.2s;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.aichat-close:hover {
	background: #fff;
	color: #0f172a;
	transform: scale(1.08);
}

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

.aichat-text-size {
	min-width: 38px;
	height: 38px;
	padding: 0 10px;
	border: 1px solid rgba(99, 102, 241, 0.2);
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.95);
	color: #4f46e5;
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	transition: background 0.2s, transform 0.2s, border-color 0.2s;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.aichat-text-size:hover {
	background: #fff;
	border-color: rgba(99, 102, 241, 0.45);
	transform: scale(1.06);
}

.aichat-chat-body {
	position: relative;
	z-index: 1;
	flex: 1;
	display: flex;
	flex-direction: column;
	min-height: 0;
	max-height: 420px;
	overflow-y: auto;
	background: linear-gradient(180deg, #fafaff 0%, #ffffff 55%, #fdfcff 100%);
	scroll-behavior: smooth;
}

.aichat-chat-body::-webkit-scrollbar {
	width: 6px;
}

.aichat-chat-body::-webkit-scrollbar-thumb {
	background: rgba(99, 102, 241, 0.25);
	border-radius: 999px;
}

.aichat-messages {
	flex: 1;
	overflow: visible;
	padding: 18px 16px 8px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-height: 200px;
}

.aichat-messages::-webkit-scrollbar {
	display: none;
}

.aichat-message {
	display: flex;
	gap: 10px;
	max-width: 100%;
}

.aichat-message--enter {
	animation: aichat-msg-in 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes aichat-msg-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.aichat-message--user {
	align-self: flex-end;
	max-width: 88%;
}

.aichat-message--assistant {
	align-self: flex-start;
	max-width: 94%;
}

.aichat-msg-avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--aichat-gradient);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	margin-top: 2px;
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.28);
}

.aichat-msg-avatar .aichat-ai-icon {
	width: 18px;
	height: 18px;
}

.aichat-msg-body {
	min-width: 0;
	flex: 1;
}

.aichat-msg-body--user {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
}

.aichat-message-text {
	padding: 11px 14px;
	border-radius: 16px;
	font-size: 14px;
	line-height: 1.55;
	font-weight: 500;
	word-wrap: break-word;
}

.aichat-message--user .aichat-message-text {
	background: var(--aichat-user-bg);
	color: var(--aichat-user-text);
	border-bottom-right-radius: 4px;
	box-shadow: 0 6px 18px rgba(99, 102, 241, 0.28);
}

.aichat-message--assistant .aichat-message-text {
	background: #fff;
	color: #1e293b;
	border: 1px solid rgba(99, 102, 241, 0.12);
	border-bottom-left-radius: 4px;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.aichat-products {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-top: 10px;
}

.aichat-product-card {
	display: flex;
	align-items: center;
	gap: 12px;
	width: 100%;
	padding: 10px;
	background: #fff;
	border: 1px solid rgba(99, 102, 241, 0.14);
	border-radius: 14px;
	color: var(--aichat-text);
	cursor: pointer;
	text-align: left;
	font: inherit;
	transition: border-color 0.2s, background 0.2s, box-shadow 0.2s, transform 0.2s;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
}

.aichat-product-card:hover:not(:disabled) {
	border-color: rgba(99, 102, 241, 0.45);
	box-shadow: 0 8px 20px rgba(99, 102, 241, 0.12);
	transform: translateY(-1px);
}

.aichat-product-card--selected {
	border-color: #6366f1;
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.08) 0%, rgba(168, 85, 247, 0.06) 100%);
	box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.aichat-product-card:disabled {
	cursor: default;
	opacity: 0.92;
}

.aichat-product-thumb {
	width: 56px;
	height: 56px;
	border-radius: 10px;
	overflow: hidden;
	flex-shrink: 0;
	background: #f1f5f9;
	border: 1px solid rgba(99, 102, 241, 0.1);
}

.aichat-product-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.aichat-product-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	font-size: 13px;
	flex: 1;
	min-width: 0;
}

.aichat-product-name {
	font-size: 13px;
	font-weight: 700;
	color: #0f172a;
	line-height: 1.3;
}

.aichat-product-desc {
	color: var(--aichat-muted);
	font-size: 12px;
	line-height: 1.4;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.aichat-product-hint {
	color: #6366f1;
	font-size: 11px;
	font-weight: 700;
	margin-top: 2px;
}

.aichat-product-arrow {
	color: #6366f1;
	flex-shrink: 0;
	opacity: 0.7;
	transition: transform 0.2s, opacity 0.2s;
}

.aichat-product-card:hover:not(:disabled) .aichat-product-arrow {
	opacity: 1;
	transform: translateX(2px);
}

.aichat-gallery-title {
	font-size: 12px;
	font-weight: 700;
	color: #6366f1;
	margin-top: 12px;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.aichat-gallery {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 10px;
	margin-top: 4px;
}

.aichat-gallery-item {
	position: relative;
	display: block;
	width: 100%;
	padding: 0;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(99, 102, 241, 0.14);
	aspect-ratio: 1;
	background: #fff;
	cursor: pointer;
	font: inherit;
	transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.aichat-gallery-item img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	pointer-events: none;
	transition: transform 0.25s ease;
}

.aichat-gallery-zoom {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(79, 70, 229, 0.45);
	color: #fff;
	opacity: 0;
	transition: opacity 0.2s;
}

.aichat-gallery-item:hover {
	border-color: #6366f1;
	box-shadow: 0 8px 20px rgba(99, 102, 241, 0.18);
	transform: scale(1.02);
}

.aichat-gallery-item:hover img {
	transform: scale(1.05);
}

.aichat-gallery-item:hover .aichat-gallery-zoom {
	opacity: 1;
}

.aichat-lightbox {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.aichat-lightbox[hidden] {
	display: none !important;
}

.aichat-lightbox-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.88);
	backdrop-filter: blur(4px);
}

.aichat-lightbox-dialog {
	position: relative;
	z-index: 1;
	width: min(92vw, 720px);
	max-height: 90vh;
	display: flex;
	align-items: center;
	justify-content: center;
}

.aichat-lightbox-figure {
	margin: 0;
	width: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 10px;
}

.aichat-lightbox-image {
	max-width: 100%;
	max-height: calc(90vh - 80px);
	width: auto;
	height: auto;
	border-radius: 16px;
	box-shadow:
		0 20px 50px rgba(0, 0, 0, 0.4),
		0 0 0 1px rgba(255, 255, 255, 0.1);
	background: #fff;
}

.aichat-lightbox-caption {
	color: #f8fafc;
	font-size: 13px;
	text-align: center;
	max-width: 100%;
}

.aichat-lightbox-close,
.aichat-lightbox-nav {
	position: absolute;
	border: none;
	background: rgba(255, 255, 255, 0.14);
	color: #fff;
	cursor: pointer;
	border-radius: 999px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s;
}

.aichat-lightbox-close:hover,
.aichat-lightbox-nav:hover {
	background: rgba(255, 255, 255, 0.24);
}

.aichat-lightbox-close {
	top: -8px;
	right: -8px;
	width: 40px;
	height: 40px;
	font-size: 28px;
	line-height: 1;
}

.aichat-lightbox-nav {
	top: 50%;
	transform: translateY(-50%);
	width: 44px;
	height: 44px;
	font-size: 28px;
}

.aichat-lightbox-prev {
	left: -56px;
}

.aichat-lightbox-next {
	right: -56px;
}

body.aichat-lightbox-open {
	overflow: hidden;
}

@media (max-width: 640px) {
	.aichat-lightbox-prev {
		left: 8px;
	}

	.aichat-lightbox-next {
		right: 8px;
	}

	.aichat-lightbox-close {
		top: 8px;
		right: 8px;
	}
}

.aichat-typing {
	padding: 0 16px 12px;
}

.aichat-typing-row {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	animation: aichat-msg-in 0.35s ease;
}

.aichat-typing-bubble {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 12px 14px;
	background: #fff;
	border: 1px solid rgba(99, 102, 241, 0.12);
	border-radius: 16px 16px 16px 4px;
	box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.aichat-typing-dots {
	display: inline-flex;
	gap: 5px;
	align-items: center;
}

.aichat-typing-dots span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #8b5cf6;
	animation: aichat-proactive-dot-bounce 1.2s ease-in-out infinite;
}

.aichat-typing-dots span:nth-child(2) { animation-delay: 0.15s; }
.aichat-typing-dots span:nth-child(3) { animation-delay: 0.3s; }

.aichat-typing-text {
	font-size: 12px;
	font-weight: 600;
	color: #6366f1;
}

.aichat-turnstile {
	padding: 0 16px 8px;
	background: #fff;
}

.aichat-form-wrap {
	position: relative;
	z-index: 1;
	padding: 12px 16px 14px;
	background: #fff;
	border-top: 1px solid rgba(99, 102, 241, 0.1);
}

.aichat-suggestions {
	margin-bottom: 12px;
}

.aichat-suggestions-panel {
	padding: 12px;
	border-radius: 16px;
	border: 1px solid rgba(99, 102, 241, 0.14);
	background: linear-gradient(160deg, rgba(99, 102, 241, 0.07) 0%, rgba(255, 255, 255, 0.98) 42%, rgba(168, 85, 247, 0.05) 100%);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
}

.aichat-suggestions-panel--compact {
	padding: 10px;
}

.aichat-suggestions-head {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 10px;
}

.aichat-suggestions-head--compact {
	margin-bottom: 8px;
}

.aichat-suggestions-head-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: var(--aichat-gradient);
	color: #fff;
	box-shadow: 0 6px 16px rgba(99, 102, 241, 0.28);
	flex-shrink: 0;
}

.aichat-suggestions-head-icon svg {
	width: 18px;
	height: 18px;
}

.aichat-suggestions-head-text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.aichat-suggestions-label {
	display: block;
	font-size: 12px;
	font-weight: 800;
	color: #312e81;
	line-height: 1.2;
}

.aichat-suggestions-hint {
	display: block;
	font-size: 11px;
	font-weight: 600;
	color: #64748b;
	line-height: 1.3;
}

.aichat-suggestions-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 8px;
}

.aichat-suggestion-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 78px;
	padding: 10px 8px;
	border: 1px solid rgba(99, 102, 241, 0.16);
	border-radius: 14px;
	background: rgba(255, 255, 255, 0.92);
	color: #312e81;
	cursor: pointer;
	transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease, background 0.16s ease;
	text-align: center;
}

.aichat-suggestion-card:hover {
	transform: translateY(-2px);
	border-color: rgba(99, 102, 241, 0.38);
	background: #fff;
	box-shadow: 0 8px 20px rgba(99, 102, 241, 0.14);
}

.aichat-suggestion-card:active {
	transform: translateY(0);
}

.aichat-suggestion-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 11px;
	background: rgba(99, 102, 241, 0.1);
	color: #4f46e5;
}

.aichat-suggestion-card-icon--cup { color: #4f46e5; background: rgba(99, 102, 241, 0.12); }
.aichat-suggestion-card-icon--bag { color: #0d9488; background: rgba(13, 148, 136, 0.12); }
.aichat-suggestion-card-icon--bowl { color: #db2777; background: rgba(219, 39, 119, 0.12); }
.aichat-suggestion-card-icon--box { color: #d97706; background: rgba(217, 119, 6, 0.12); }
.aichat-suggestion-card-icon--quote { color: #7c3aed; background: rgba(124, 58, 237, 0.12); }

.aichat-suggestion-card-icon svg {
	width: 20px;
	height: 20px;
}

.aichat-suggestion-card-label {
	font-size: 11px;
	font-weight: 800;
	line-height: 1.25;
	padding: 0 2px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.aichat-suggestions-row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.aichat-suggestion-chip {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	max-width: 100%;
	border: 1px solid rgba(99, 102, 241, 0.18);
	border-radius: 999px;
	padding: 8px 14px 8px 10px;
	background: rgba(255, 255, 255, 0.95);
	color: #4338ca;
	font-size: 12px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: transform 0.15s, border-color 0.15s, background 0.15s, box-shadow 0.15s;
	white-space: nowrap;
}

.aichat-suggestion-chip-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 999px;
	background: rgba(99, 102, 241, 0.1);
	color: #4f46e5;
	flex-shrink: 0;
}

.aichat-suggestion-chip-icon svg {
	width: 13px;
	height: 13px;
}

.aichat-suggestion-chip-label {
	min-width: 0;
}

.aichat-suggestion-chip:hover {
	transform: translateY(-1px);
	border-color: rgba(99, 102, 241, 0.45);
	background: #fff;
	box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.aichat-suggestion-chip:active {
	transform: translateY(0);
}

.aichat-disclaimer {
	margin: 10px 0 0;
	padding: 0 2px;
	font-size: 11px;
	line-height: 1.45;
	color: #94a3b8;
	text-align: center;
}

.aichat-logo-upload {
	margin-top: 12px;
	padding: 14px;
	border-radius: 14px;
	border: 1px dashed rgba(99, 102, 241, 0.35);
	background: linear-gradient(135deg, rgba(99, 102, 241, 0.06) 0%, rgba(168, 85, 247, 0.04) 100%);
}

.aichat-logo-upload--done {
	border-style: solid;
	border-color: rgba(34, 197, 94, 0.35);
	background: rgba(34, 197, 94, 0.06);
}

.aichat-logo-upload-label {
	margin: 0 0 4px;
	font-size: 13px;
	font-weight: 700;
	color: #4f46e5;
}

.aichat-logo-upload-hint {
	margin: 0 0 12px;
	font-size: 11px;
	color: #64748b;
}

.aichat-logo-file {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
}

.aichat-logo-upload--uploading {
	border-color: rgba(99, 102, 241, 0.45);
}

.aichat-logo-upload-preview {
	margin: 0 0 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 72px;
	padding: 8px;
	border-radius: 10px;
	background: rgba(255, 255, 255, 0.85);
	border: 1px solid rgba(99, 102, 241, 0.15);
}

.aichat-logo-upload-preview-img {
	display: block;
	max-width: 100%;
	max-height: 120px;
	border-radius: 8px;
	object-fit: contain;
}

.aichat-logo-upload-preview-pdf {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 56px;
	min-height: 56px;
	padding: 0 12px;
	border-radius: 10px;
	background: rgba(239, 68, 68, 0.12);
	color: #dc2626;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.04em;
}

.aichat-logo-upload-cancel {
	display: block;
	width: 100%;
	margin-top: 8px;
	border: 1px solid rgba(148, 163, 184, 0.45);
	border-radius: 10px;
	padding: 9px 14px;
	background: #fff;
	color: #64748b;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.aichat-logo-upload-cancel:hover:not(:disabled) {
	border-color: rgba(239, 68, 68, 0.35);
	color: #dc2626;
	background: rgba(239, 68, 68, 0.04);
}

.aichat-logo-upload-cancel:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.aichat-logo-upload-status--muted {
	color: #64748b;
}

.aichat-logo-file-label {
	display: inline-block;
	margin-bottom: 10px;
	padding: 9px 14px;
	border-radius: 10px;
	border: 1px solid rgba(99, 102, 241, 0.25);
	background: #fff;
	color: #4f46e5;
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
}

.aichat-logo-upload-btn {
	display: block;
	width: 100%;
	border: none;
	border-radius: 12px;
	padding: 12px 14px;
	background: var(--aichat-gradient);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 6px 18px rgba(99, 102, 241, 0.28);
}

.aichat-logo-upload-btn:hover:not(:disabled) {
	filter: brightness(1.05);
}

.aichat-logo-upload-btn:disabled {
	opacity: 0.65;
	cursor: not-allowed;
}

.aichat-logo-upload-status--uploading {
	color: #6366f1;
}

.aichat-logo-upload-status--success {
	color: #16a34a;
}

.aichat-logo-upload-status--success::before {
	content: "✓ ";
}

.aichat-logo-upload-status--error {
	color: #dc2626;
}

.aichat-logo-upload-filename {
	margin: 0 0 8px;
	font-size: 12px;
	font-weight: 600;
	color: #475569;
	word-break: break-all;
}

.aichat-logo-upload-filename--done {
	color: #16a34a;
	font-size: 13px;
}

.aichat-logo-upload-status {
	margin: 10px 0 0;
	font-size: 12px;
	font-weight: 600;
}

.aichat-form {
	display: flex;
	gap: 10px;
	align-items: center;
}

.aichat-input-wrap {
	flex: 1;
	position: relative;
}

.aichat-input {
	width: 100%;
	padding: 13px 16px;
	border: 1px solid rgba(99, 102, 241, 0.18);
	border-radius: 14px;
	font-size: 14px;
	outline: none;
	background: #f8f7ff;
	transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.aichat-input:focus {
	border-color: #6366f1;
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
	background: #fff;
}

.aichat-send {
	width: 46px;
	height: 46px;
	padding: 0;
	background: var(--aichat-gradient);
	color: #fff;
	border: none;
	border-radius: 14px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
	transition: transform 0.2s, filter 0.2s, box-shadow 0.2s;
}

.aichat-send:hover:not(:disabled) {
	filter: brightness(1.06);
	transform: translateY(-1px);
	box-shadow: 0 8px 22px rgba(99, 102, 241, 0.45);
}

.aichat-send:disabled {
	opacity: 0.55;
	cursor: not-allowed;
	box-shadow: none;
}

@media (max-width: 480px) {
	.aichat-widget--right {
		right: 16px;
	}

	.aichat-widget--left {
		left: 16px;
	}

	.aichat-panel {
		width: calc(100vw - 32px);
		bottom: 76px;
	}

	.aichat-proactive {
		width: calc(100vw - 88px);
		max-width: 320px;
		bottom: 76px;
	}

	.aichat-widget--right .aichat-proactive {
		right: 0;
	}

	.aichat-widget--left .aichat-proactive {
		left: 0;
	}

	.aichat-widget--right .aichat-proactive::after,
	.aichat-widget--left .aichat-proactive::after {
		display: none;
	}
}

.aichat-honeypot {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}

/* Easy-read mode — larger window, text, and tap targets for seniors */
.aichat-widget--easyread .aichat-toggle {
	height: 72px;
	padding: 0 18px 0 16px;
	gap: 12px;
}

.aichat-widget--easyread .aichat-ai-icon {
	width: 30px;
	height: 30px;
}

.aichat-widget--easyread .aichat-toggle-label {
	font-size: 13px;
}

.aichat-widget--easyread .aichat-panel {
	width: 460px;
	max-height: 660px;
	bottom: 88px;
}

.aichat-widget--easyread .aichat-chat-body {
	max-height: 480px;
}

.aichat-widget--easyread .aichat-header {
	padding: 18px 16px 16px;
}

.aichat-widget--easyread .aichat-avatar {
	width: 50px;
	height: 50px;
}

.aichat-widget--easyread .aichat-avatar .aichat-ai-icon {
	width: 26px;
	height: 26px;
}

.aichat-widget--easyread .aichat-header-title {
	font-size: 17px;
}

.aichat-widget--easyread .aichat-header-status {
	font-size: 13px;
}

.aichat-widget--easyread .aichat-text-size,
.aichat-widget--easyread .aichat-close {
	min-width: 42px;
	height: 42px;
	font-size: 16px;
}

.aichat-widget--easyread .aichat-message-text {
	font-size: 16px;
	line-height: 1.65;
	padding: 13px 16px;
}

.aichat-widget--easyread .aichat-msg-avatar {
	width: 38px;
	height: 38px;
}

.aichat-widget--easyread .aichat-msg-avatar .aichat-ai-icon {
	width: 20px;
	height: 20px;
}

.aichat-widget--easyread .aichat-messages {
	gap: 18px;
	padding: 20px 18px 10px;
}

.aichat-widget--easyread .aichat-product-name {
	font-size: 15px;
}

.aichat-widget--easyread .aichat-product-desc {
	font-size: 14px;
	-webkit-line-clamp: 3;
}

.aichat-widget--easyread .aichat-product-hint {
	font-size: 12px;
}

.aichat-widget--easyread .aichat-product-thumb {
	width: 68px;
	height: 68px;
}

.aichat-widget--easyread .aichat-product-card {
	padding: 12px;
	border-radius: 16px;
}

.aichat-widget--easyread .aichat-gallery-title {
	font-size: 13px;
}

.aichat-widget--easyread .aichat-typing-text {
	font-size: 14px;
}

.aichat-widget--easyread .aichat-typing-bubble {
	padding: 14px 16px;
}

.aichat-widget--easyread .aichat-input {
	font-size: 16px;
	padding: 15px 18px;
}

.aichat-widget--easyread .aichat-send {
	width: 52px;
	height: 52px;
	border-radius: 16px;
}

.aichat-widget--easyread .aichat-suggestions-label {
	font-size: 14px;
}

.aichat-widget--easyread .aichat-suggestions-hint {
	font-size: 12px;
}

.aichat-widget--easyread .aichat-suggestion-card {
	min-height: 88px;
}

.aichat-widget--easyread .aichat-suggestion-card-label {
	font-size: 13px;
}

.aichat-widget--easyread .aichat-suggestion-chip {
	font-size: 14px;
	padding: 10px 16px 10px 12px;
}

.aichat-widget--easyread .aichat-disclaimer {
	font-size: 12px;
	color: #64748b;
	line-height: 1.5;
}

.aichat-widget--easyread .aichat-proactive {
	width: 340px;
}

.aichat-widget--easyread .aichat-proactive-name {
	font-size: 16px;
}

.aichat-widget--easyread .aichat-proactive-text {
	font-size: 15px;
	line-height: 1.6;
	padding: 12px 16px;
}

.aichat-widget--easyread .aichat-proactive-cta {
	font-size: 15px;
	padding: 14px 16px;
}

.aichat-widget--easyread .aichat-proactive-perk {
	font-size: 12px;
	padding: 5px 12px;
}

/* Extra-large text — user taps A+ again */
.aichat-widget--easyread-xl .aichat-panel {
	width: 520px;
	max-height: 720px;
}

.aichat-widget--easyread-xl .aichat-chat-body {
	max-height: 540px;
}

.aichat-widget--easyread-xl .aichat-header-title {
	font-size: 19px;
}

.aichat-widget--easyread-xl .aichat-header-status {
	font-size: 14px;
}

.aichat-widget--easyread-xl .aichat-message-text {
	font-size: 18px;
	line-height: 1.7;
	padding: 14px 18px;
}

.aichat-widget--easyread-xl .aichat-input {
	font-size: 18px;
	padding: 16px 20px;
}

.aichat-widget--easyread-xl .aichat-send {
	width: 56px;
	height: 56px;
}

.aichat-widget--easyread-xl .aichat-product-name {
	font-size: 16px;
}

.aichat-widget--easyread-xl .aichat-product-desc {
	font-size: 15px;
}

.aichat-widget--easyread-xl .aichat-disclaimer {
	font-size: 13px;
}

.aichat-widget--easyread-xl .aichat-text-size,
.aichat-widget--easyread-xl .aichat-close {
	min-width: 46px;
	height: 46px;
	font-size: 18px;
}

@media (max-width: 480px) {
	.aichat-widget--easyread .aichat-panel,
	.aichat-widget--easyread-xl .aichat-panel {
		width: calc(100vw - 16px);
		max-height: calc(100dvh - 96px);
		bottom: 82px;
	}

	.aichat-widget--easyread .aichat-chat-body,
	.aichat-widget--easyread-xl .aichat-chat-body {
		max-height: calc(100dvh - 280px);
	}

	.aichat-widget--easyread .aichat-proactive,
	.aichat-widget--easyread-xl .aichat-proactive {
		width: calc(100vw - 16px);
		max-width: none;
	}
}
