#bjwf-root {
	--bjwf-color: #25D366;
	--bjwf-dark: color-mix(in srgb, var(--bjwf-color) 45%, #04302b);
	position: fixed;
	bottom: 20px;
	z-index: 99999;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	color: #111b21;
}
#bjwf-root.bjwf-pos-right { right: 20px; }
#bjwf-root.bjwf-pos-left { left: 20px; }
#bjwf-root *, #bjwf-root *::before, #bjwf-root *::after { box-sizing: border-box; }
#bjwf-root [hidden] { display: none !important; }

#bjwf-root .bjwf-sr,
#bjwf-root .bjwf-hp {
	position: absolute !important;
	width: 1px; height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Launcher */
#bjwf-root .bjwf-launcher {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 14px;
	border: 0;
	border-radius: 999px;
	background: var(--bjwf-color);
	color: #fff;
	font: inherit;
	font-weight: 600;
	font-size: 15px;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .25);
	transition: transform .2s ease, box-shadow .2s ease;
}
#bjwf-root .bjwf-launcher:has(.bjwf-launcher-label) { padding: 12px 20px 12px 14px; }
#bjwf-root .bjwf-launcher:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
#bjwf-root .bjwf-launcher:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 6px var(--bjwf-color); }
#bjwf-root.bjwf-pos-left .bjwf-launcher { margin-right: auto; }
#bjwf-root.bjwf-pos-right .bjwf-launcher { margin-left: auto; }
#bjwf-root .bjwf-launcher svg { flex: none; }

/* Panel */
#bjwf-root .bjwf-panel {
	position: absolute;
	bottom: calc(100% + 14px);
	width: 360px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 120px);
	display: flex;
	flex-direction: column;
	border-radius: 16px;
	overflow: hidden;
	background: #efeae2;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
	animation: bjwf-in .22s ease-out;
}
#bjwf-root.bjwf-pos-right .bjwf-panel { right: 0; transform-origin: bottom right; }
#bjwf-root.bjwf-pos-left .bjwf-panel { left: 0; transform-origin: bottom left; }
@keyframes bjwf-in {
	from { opacity: 0; transform: translateY(12px) scale(.96); }
	to { opacity: 1; transform: none; }
}

#bjwf-root .bjwf-header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	background: var(--bjwf-dark);
	color: #fff;
}
#bjwf-root .bjwf-avatar {
	flex: none;
	width: 42px; height: 42px;
	border-radius: 50%;
	overflow: hidden;
	display: flex; align-items: center; justify-content: center;
	background: var(--bjwf-color);
	color: #fff;
}
#bjwf-root .bjwf-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
#bjwf-root .bjwf-head-text { flex: 1; min-width: 0; }
#bjwf-root .bjwf-title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
#bjwf-root .bjwf-subtitle { font-size: 12px; opacity: .85; }
#bjwf-root .bjwf-close {
	flex: none;
	margin: 0;
	padding: 0;
	width: 32px; height: 32px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #fff;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
#bjwf-root .bjwf-close:hover { background: rgba(255, 255, 255, .15); }

#bjwf-root .bjwf-body {
	padding: 16px;
	overflow-y: auto;
	overscroll-behavior: contain;
	background-color: #efeae2;
	background-image: radial-gradient(rgba(0, 0, 0, .04) 1px, transparent 1px);
	background-size: 14px 14px;
}

#bjwf-root .bjwf-bubble {
	position: relative;
	max-width: 90%;
	margin: 0 0 14px 8px;
	padding: 8px 12px;
	background: #fff;
	border-radius: 0 10px 10px 10px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
}
#bjwf-root .bjwf-bubble::before {
	content: "";
	position: absolute;
	top: 0; left: -8px;
	border-top: 10px solid #fff;
	border-left: 8px solid transparent;
}

#bjwf-root .bjwf-form {
	margin: 0;
	padding: 14px;
	background: #fff;
	border-radius: 10px;
	box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
}
#bjwf-root .bjwf-field { margin: 0 0 12px; }
#bjwf-root .bjwf-field fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
#bjwf-root .bjwf-label {
	display: block;
	margin: 0 0 4px;
	padding: 0;
	font-size: 13px;
	font-weight: 600;
	color: #111b21;
}
#bjwf-root .bjwf-req { color: #d93025; }
#bjwf-root .bjwf-field input:not([type=radio]):not([type=checkbox]),
#bjwf-root .bjwf-field textarea,
#bjwf-root .bjwf-field select {
	display: block;
	width: 100%;
	margin: 0;
	padding: 9px 11px;
	border: 1px solid #d1d7db;
	border-radius: 8px;
	background: #fff;
	color: #111b21;
	font: inherit;
	font-size: 16px; /* >=16px stops iOS zooming on focus */
	line-height: 1.3;
	box-shadow: none;
	height: auto;
	min-height: 0;
}
#bjwf-root .bjwf-field textarea { resize: vertical; min-height: 70px; }
#bjwf-root .bjwf-field input:focus,
#bjwf-root .bjwf-field textarea:focus,
#bjwf-root .bjwf-field select:focus {
	outline: none;
	border-color: var(--bjwf-color);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--bjwf-color) 25%, transparent);
}
#bjwf-root .bjwf-choice {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 4px;
	font-weight: 400;
	cursor: pointer;
}
#bjwf-root .bjwf-choice input { margin: 0; accent-color: var(--bjwf-color); width: 16px; height: 16px; }

#bjwf-root .bjwf-field.bjwf-invalid input:not([type=radio]):not([type=checkbox]),
#bjwf-root .bjwf-field.bjwf-invalid textarea,
#bjwf-root .bjwf-field.bjwf-invalid select { border-color: #d93025; }
#bjwf-root .bjwf-error,
#bjwf-root .bjwf-form-error { color: #d93025; font-size: 12px; }
#bjwf-root .bjwf-error:empty,
#bjwf-root .bjwf-form-error:empty { display: none; }
#bjwf-root .bjwf-error { margin-top: 4px; }
#bjwf-root .bjwf-form-error { margin: 0 0 10px; }

#bjwf-root .bjwf-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	margin: 4px 0 0;
	padding: 12px 16px;
	border: 0;
	border-radius: 999px;
	background: var(--bjwf-color);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 700;
	line-height: 1;
	text-transform: none;
	letter-spacing: normal;
	cursor: pointer;
	transition: filter .15s ease;
}
#bjwf-root .bjwf-submit svg { width: 20px; height: 20px; }
#bjwf-root .bjwf-submit:hover { filter: brightness(.93); }
#bjwf-root .bjwf-submit[disabled] { opacity: .7; cursor: wait; }

@media (max-width: 480px) {
	/* Centered launcher: span the width and center with flex. Not left:50% + translate, because a
	   transform on the root would become the containing block for the position:fixed panel. */
	#bjwf-root,
	#bjwf-root.bjwf-pos-right,
	#bjwf-root.bjwf-pos-left { left: 0; right: 0; bottom: 16px; display: flex; justify-content: center; pointer-events: none; }
	#bjwf-root > * { pointer-events: auto; }
	#bjwf-root.bjwf-pos-right .bjwf-launcher,
	#bjwf-root.bjwf-pos-left .bjwf-launcher { margin: 0; }
	#bjwf-root .bjwf-panel { position: fixed; left: 16px; right: 16px; bottom: 84px; width: auto; max-width: none; max-height: calc(100vh - 110px); max-height: calc(100dvh - 110px); transform-origin: bottom center; }
}

@media (prefers-reduced-motion: reduce) {
	#bjwf-root .bjwf-panel { animation: none; }
	#bjwf-root .bjwf-launcher { transition: none; }
}
