/* AI Chat Widget — elastikagarefalos.gr */
:root {
	--agent-accent: #de770f;
	--agent-accent-dark: #b85f0c;
	--agent-bg: #ffffff;
	--agent-text: #222222;
	--agent-bubble-bg: #f2f2f2;
}

@keyframes agent-pulse-ring {
	0% {
		box-shadow: 0 0 0 0 rgba(222, 119, 15, 0.55);
	}
	70% {
		box-shadow: 0 0 0 16px rgba(222, 119, 15, 0);
	}
	100% {
		box-shadow: 0 0 0 0 rgba(222, 119, 15, 0);
	}
}
#agent-chat-launcher.agent-pulse {
	animation: agent-pulse-ring 2.2s infinite;
}

#agent-chat-launcher {
	position: fixed;
	bottom: 20px;
	right: 20px;
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: var(--agent-accent);
	color: #fff;
	border: none;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	z-index: 99998;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 26px;
	transition: transform 0.15s ease;
}
#agent-chat-launcher:hover {
	transform: scale(1.06);
	background: var(--agent-accent-dark);
}

#agent-chat-window {
	position: fixed;
	bottom: 92px;
	right: 20px;
	width: 340px;
	max-width: calc(100vw - 32px);
	height: 460px;
	max-height: calc(100vh - 120px);
	background: var(--agent-bg);
	border-radius: 14px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
	display: none;
	flex-direction: column;
	overflow: hidden;
	z-index: 99999;
	font-family: inherit;
}
#agent-chat-window.agent-open {
	display: flex;
}

#agent-chat-header {
	background: var(--agent-accent);
	color: #fff;
	padding: 14px 16px;
	font-weight: 600;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
#agent-chat-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 20px;
	cursor: pointer;
	line-height: 1;
	padding: 0 4px;
}

#agent-chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 14px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fafafa;
}

.agent-msg {
	max-width: 85%;
	padding: 9px 12px;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.4;
	white-space: pre-wrap;
	word-wrap: break-word;
}
.agent-msg-user {
	align-self: flex-end;
	background: var(--agent-accent);
	color: #fff;
	border-bottom-right-radius: 3px;
}
.agent-msg-assistant {
	align-self: flex-start;
	background: var(--agent-bubble-bg);
	color: var(--agent-text);
	border-bottom-left-radius: 3px;
}
.agent-msg-system {
	align-self: center;
	color: #888;
	font-size: 12px;
	text-align: center;
}

#agent-chat-inputrow {
	display: flex;
	border-top: 1px solid #e5e5e5;
	padding: 8px;
	gap: 8px;
}
#agent-chat-input {
	flex: 1;
	border: 1px solid #ddd;
	border-radius: 20px;
	padding: 9px 14px;
	font-size: 14px;
	outline: none;
	resize: none;
	font-family: inherit;
}
#agent-chat-input:focus {
	border-color: var(--agent-accent);
}
#agent-chat-send {
	background: var(--agent-accent);
	color: #fff;
	border: none;
	border-radius: 50%;
	width: 38px;
	height: 38px;
	cursor: pointer;
	flex-shrink: 0;
	font-size: 16px;
}
#agent-chat-send:disabled {
	opacity: 0.5;
	cursor: default;
}

@media (max-width: 480px) {
	#agent-chat-window {
		right: 12px;
		bottom: 84px;
		width: calc(100vw - 24px);
	}
	#agent-chat-launcher {
		right: 12px;
		bottom: 12px;
	}
}

/* Clickable links inside chat bubbles (tel:, mailto:, urls) */
.agent-msg a {
	color: var(--agent-accent);
	font-weight: 600;
	text-decoration: underline;
	overflow-wrap: anywhere;
}
.agent-msg-user a {
	color: #fff;
}
