/* Help chatbot (VRD_Chatbot, assets/js/chatbot.js). Colours of the redesign (wavy-child/assets/css/redesign.css). */

.vrd_chatbot {
	--chat-berry: #B31E6F;
	--chat-berry-dark: #8E1858;
	--chat-plum: #320131;
	--chat-cream: #FBF7F3;
	--chat-pink: #F9E9EE;
	--chat-border: #EEE2DC;
	--chat-text: #4A3A46;
	--chat-muted: #74636F;
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 9998;
	font-family: "League Spartan", "Helvetica Neue", Arial, sans-serif;
	font-size: 15px;
	line-height: 1.45;
	color: var(--chat-text);
}

.vrd_chatbot[hidden],
.vrd_chatbot_panel[hidden] { display: none; }

.vrd_chatbot button { font-family: inherit; }

.vrd_chatbot_launcher {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-left: auto;
	padding: 12px 18px 12px 14px;
	border: 0;
	border-radius: 999px;
	background: var(--chat-berry);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	box-shadow: 0 10px 28px -10px rgba(50, 1, 49, .55);
	cursor: pointer;
	transition: background .15s, transform .15s;
}

.vrd_chatbot_launcher:hover { background: var(--chat-berry-dark); transform: translateY(-1px); }
.vrd_chatbot_launcher:focus-visible { outline: 3px solid var(--chat-plum); outline-offset: 2px; }
.vrd_chatbot.is-open .vrd_chatbot_launcher { display: none; }

.vrd_chatbot_panel {
	display: flex;
	flex-direction: column;
	width: 370px;
	height: min(560px, calc(100vh - 40px));
	overflow: hidden;
	border: 1px solid var(--chat-border);
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 24px 60px -24px rgba(50, 1, 49, .5);
}

.vrd_chatbot_head {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 12px 14px 16px;
	background: var(--chat-plum);
	color: #fff;
}

.vrd_chatbot_avatar {
	display: grid;
	flex: none;
	place-items: center;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .14);
	font-size: 19px;
}

.vrd_chatbot_title { flex: 1; min-width: 0; }
.vrd_chatbot_title strong { display: block; font-size: 16px; }
.vrd_chatbot_title small { display: block; opacity: .75; font-size: 12.5px; }

.vrd_chatbot_head button {
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	cursor: pointer;
}

.vrd_chatbot_head button:hover { background: rgba(255, 255, 255, .14); }

.vrd_chatbot_admin_note {
	margin: 0;
	padding: 6px 14px;
	background: #FFF4D6;
	font-size: 12.5px;
}

.vrd_chatbot_messages {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 10px;
	padding: 16px 14px;
	overflow-y: auto;
	background: var(--chat-cream);
	overscroll-behavior: contain;
}

.vrd_chatbot_msg { display: flex; flex-direction: column; align-items: flex-start; max-width: 86%; }
.vrd_chatbot_msg_user { align-self: flex-end; align-items: flex-end; }

.vrd_chatbot_bubble {
	padding: 9px 13px;
	border-radius: 16px 16px 16px 4px;
	background: #fff;
	box-shadow: 0 1px 2px rgba(50, 1, 49, .08);
	overflow-wrap: anywhere;
}

.vrd_chatbot_msg_user .vrd_chatbot_bubble {
	border-radius: 16px 16px 4px 16px;
	background: var(--chat-berry);
	color: #fff;
}

.vrd_chatbot_bubble a { color: var(--chat-berry); text-decoration: underline; }
.vrd_chatbot_msg_user .vrd_chatbot_bubble a { color: #fff; }

.vrd_chatbot_mail {
	margin-top: 6px;
	padding: 7px 14px;
	border-radius: 999px;
	background: var(--chat-berry);
	color: #fff !important;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none !important;
}

.vrd_chatbot_mail:hover { background: var(--chat-berry-dark); }

.vrd_chatbot_chips { display: flex; flex-wrap: wrap; gap: 6px; }

.vrd_chatbot_chips button {
	padding: 6px 12px;
	border: 1px solid var(--chat-berry);
	border-radius: 999px;
	background: #fff;
	color: var(--chat-berry);
	font-size: 13.5px;
	line-height: 1.3;
	text-align: left;
	cursor: pointer;
}

.vrd_chatbot_chips button:hover { background: var(--chat-pink); }

.vrd_chatbot_typing .vrd_chatbot_bubble { display: flex; gap: 4px; padding: 13px 14px; }

.vrd_chatbot_typing span {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--chat-muted);
	animation: vrd_chatbot_dot 1.2s infinite ease-in-out;
}

.vrd_chatbot_typing span:nth-child(2) { animation-delay: .15s; }
.vrd_chatbot_typing span:nth-child(3) { animation-delay: .3s; }

@keyframes vrd_chatbot_dot {
	0%, 60%, 100% { opacity: .3; transform: translateY(0); }
	30% { opacity: 1; transform: translateY(-3px); }
}

.vrd_chatbot_form {
	display: flex;
	align-items: flex-end;
	gap: 8px;
	margin: 0;
	padding: 10px 10px 10px 14px;
	border-top: 1px solid var(--chat-border);
	background: #fff;
}

.vrd_chatbot .vrd_chatbot_form textarea { /* the theme gives every textarea a large height */
	flex: 1;
	height: 40px;
	min-height: 40px;
	max-height: 120px;
	margin: 0;
	padding: 9px 12px;
	border: 1px solid var(--chat-border);
	border-radius: 12px;
	background: #fff;
	color: var(--chat-text);
	font: inherit;
	resize: none;
	box-shadow: none;
}

.vrd_chatbot_form textarea:focus { border-color: var(--chat-berry); outline: none; }

.vrd_chatbot_form button {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--chat-berry);
	color: #fff;
	cursor: pointer;
}

.vrd_chatbot_form button:disabled { opacity: .5; cursor: default; }

.vrd_chatbot_note {
	margin: 0;
	padding: 0 14px 10px;
	background: #fff;
	color: var(--chat-muted);
	font-size: 11.5px;
	text-align: center;
}

@media (max-width: 520px) {
	.vrd_chatbot { right: 12px; bottom: 12px; }
	.vrd_chatbot_launcher_label { display: none; }
	.vrd_chatbot_launcher { padding: 14px; }
	.vrd_chatbot.is-open { inset: 0; }
	.vrd_chatbot_panel { width: 100%; height: 100%; border: 0; border-radius: 0; }
	.vrd_chatbot_form textarea { font-size: 16px; } /* no zoom on iOS */
}

@media (prefers-reduced-motion: reduce) {
	.vrd_chatbot_typing span { animation: none; }
}
