/* EZ Chat Form — override these variables in your theme to restyle */
.ezcf-chat {
	--ezcf-bg: #ffffff;
	--ezcf-border: #e5e7eb;
	--ezcf-bot-bubble: #f3f4f6;
	--ezcf-bot-text: #111827;
	--ezcf-user-bubble: #1f2937;
	--ezcf-user-text: #ffffff;
	--ezcf-accent: #1f2937;
	--ezcf-radius: 16px;

	max-width: 420px;
	display: flex;
	flex-direction: column;
	background: var(--ezcf-bg);
	border: 1px solid var(--ezcf-border);
	border-radius: var(--ezcf-radius);
	overflow: hidden;
	font-size: 15px;
	line-height: 1.45;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}

.ezcf-chat__header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid var(--ezcf-border);
}

.ezcf-chat__avatar {
	width: 40px;
	height: 40px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
}

.ezcf-chat__name {
	font-weight: 600;
}

.ezcf-chat__status {
	font-size: 12.5px;
	opacity: 0.65;
}

.ezcf-chat__messages {
	padding: 16px;
	min-height: 220px;
	max-height: 380px;
	flex: 1 1 auto;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.ezcf-chat__bubble {
	max-width: 82%;
	padding: 9px 13px;
	border-radius: 14px;
	animation: ezcfFadeIn 0.25s ease;
	word-wrap: break-word;
}

.ezcf-chat__bubble--bot {
	align-self: flex-start;
	background: var(--ezcf-bot-bubble);
	color: var(--ezcf-bot-text);
	border-bottom-left-radius: 4px;
}

.ezcf-chat__bubble--user {
	align-self: flex-end;
	background: var(--ezcf-user-bubble);
	color: var(--ezcf-user-text);
	border-bottom-right-radius: 4px;
}

.ezcf-chat__typing {
	align-self: flex-start;
	background: var(--ezcf-bot-bubble);
	border-radius: 14px;
	border-bottom-left-radius: 4px;
	padding: 12px 14px;
	display: flex;
	gap: 4px;
}

.ezcf-chat__typing span {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: currentColor;
	opacity: 0.4;
	animation: ezcfBounce 1.2s infinite;
}

.ezcf-chat__typing span:nth-child(2) { animation-delay: 0.15s; }
.ezcf-chat__typing span:nth-child(3) { animation-delay: 0.3s; }

.ezcf-chat__options {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	animation: ezcfFadeIn 0.3s ease;
}

.ezcf-chat__option {
	border: 1px solid var(--ezcf-accent);
	background: transparent;
	color: var(--ezcf-accent);
	border-radius: 999px;
	padding: 7px 14px;
	font-size: 13.5px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.ezcf-chat__option:hover,
.ezcf-chat__option:focus-visible {
	background: var(--ezcf-accent);
	color: #fff;
}

.ezcf-chat__input-area {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-top: 1px solid var(--ezcf-border);
	opacity: 0.55;
	transition: opacity 0.2s ease;
}

.ezcf-chat__input-area--active {
	opacity: 1;
}

.ezcf-chat__input-form {
	flex: 1;
	margin: 0;
}

.ezcf-chat__input {
	width: 100%;
	border: none;
	outline: none;
	background: transparent;
	font: inherit;
	color: inherit;
	padding: 8px 4px;
}

.ezcf-chat__input--error {
	color: #dc2626;
}

.ezcf-chat__input--error::placeholder {
	color: #dc2626;
}

/* Honeypot: visually removed, still in DOM for bots */
.ezcf-chat__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	opacity: 0;
}

.ezcf-chat__send {
	border: none;
	background: var(--ezcf-accent);
	color: #fff;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	cursor: pointer;
	flex-shrink: 0;
	transition: transform 0.15s ease;
}

.ezcf-chat__send:hover {
	transform: scale(1.06);
}

.ezcf-chat__disclaimer {
	font-size: 11.5px;
	opacity: 0.55;
	margin: 0;
	padding: 0 16px 12px;
}

.ezcf-chat__disclaimer a {
	color: inherit;
	text-decoration: underline;
}

@keyframes ezcfFadeIn {
	from { opacity: 0; transform: translateY(6px); }
	to   { opacity: 1; transform: translateY(0); }
}

@keyframes ezcfBounce {
	0%, 60%, 100% { transform: translateY(0); }
	30%           { transform: translateY(-4px); }
}

@media (prefers-reduced-motion: reduce) {
	.ezcf-chat__bubble,
	.ezcf-chat__options,
	.ezcf-chat__typing span {
		animation: none;
	}
}
