.plugg-chatbox {
	position: fixed;
	right: 24px;
	bottom: 24px;
	z-index: 9998;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	font-family: inherit;
}

.plugg-chatbox,
.plugg-chatbox *,
.plugg-chatbox *::before,
.plugg-chatbox *::after {
	box-sizing: border-box;
}

.plugg-chatbox button {
	appearance: none;
	border: 0;
	font: inherit;
}

.plugg-chatbox button {
	text-transform: none;
}

.plugg-chatbox__backdrop {
	position: fixed;
	inset: 0;
	z-index: 0;
	background: rgba(0, 0, 0, 0.45);
}

.plugg-chatbox__launch {
	position: relative !important;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 50px;
	height: 50px;
	padding: 0;
	border-radius: 8px;
	background: var(--plugg-brand);
	color: var(--plugg-white);
	cursor: pointer;
	animation: plugg-chatbox-float 3.6s ease-in-out infinite;
}

.plugg-chatbox__launch:hover,
.plugg-chatbox.is-open .plugg-chatbox__launch {
	background: var(--plugg-black);
	color: var(--plugg-white);
}

.plugg-chatbox__icon {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
}

.plugg-chatbox__icon--close {
	opacity: 0;
}

.plugg-chatbox.is-open .plugg-chatbox__icon--chat {
	opacity: 0;
}

.plugg-chatbox.is-open .plugg-chatbox__icon--close {
	opacity: 1;
}

.plugg-chatbox__icon--close::before,
.plugg-chatbox__icon--close::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 18px;
	height: 2.5px;
	border-radius: 2px;
	background: currentColor;
}

.plugg-chatbox__icon--close::before {
	transform: translate(-50%, -50%) rotate(45deg);
}

.plugg-chatbox__icon--close::after {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.plugg-chatbox__card {
	position: absolute;
	right: 0;
	bottom: 64px;
	z-index: 2;
	display: none;
	width: 385px;
	max-width: calc(100vw - 32px);
	border: 0;
	border-radius: 16px;
	padding: 28px 20px;
	background: var(--plugg-white);
	color: var(--plugg-black);
}

.plugg-chatbox.is-open .plugg-chatbox__card {
	display: grid;
	gap: 10px;
}

.plugg-chatbox__card h2,
.plugg-chatbox__card p {
	margin: 0;
}

.plugg-chatbox__card h2 {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	margin-bottom: -6px;
}

.plugg-chatbox__card p,
.plugg-chatbox__footer {
	color: var(--plugg-black);
	font-size: 13px;
	line-height: 1.35;
}

.plugg-chatbox__intro {
	font-size: 14px !important;
}

.plugg-chatbox__channels {
	display: flex;
	gap: 8px;
	margin-top: 6px;
}

.plugg-chatbox__channels button {
	display: inline-flex;
	flex: 1;
	align-items: center;
	justify-content: center;
	min-width: 0;
	border-radius: 8px;
	padding: 8px;
	background: var(--plugg-muted);
	color: var(--plugg-black);
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}

.plugg-chatbox__channels button.is-active {
	background: var(--plugg-black);
	color: var(--plugg-white);
}

.plugg-chatbox__channels button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.plugg-chatbox__channels button:hover:not(:disabled) {
	background: var(--plugg-black);
	color: var(--plugg-white);
}

.plugg-chatbox__send:hover:not(:disabled) {
	background: var(--plugg-black);
}

.plugg-chatbox__card textarea {
	resize: none;
}

.plugg-chatbox__turnstile,
.plugg-chatbox__turnstile > div,
.plugg-chatbox__turnstile iframe {
	width: 100% !important;
}

.plugg-chatbox__turnstile span {
	display: block;
	margin-top: 6px;
	color: rgba(0, 0, 0, 0.66);
	font-size: 12px;
}

.plugg-chatbox__send {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	border-radius: 8px;
	padding: 10px 16px;
	border: 0;
	background: var(--plugg-brand);
	color: var(--plugg-white);
	font-size: 15px !important;
	font-weight: 600 !important;
	cursor: pointer;
}

.plugg-chatbox__send:disabled {
	opacity: 0.7;
	cursor: wait;
}

@keyframes plugg-chatbox-float {
	0% { transform: translateY(0); }
	50% { transform: translateY(-6px); }
	100% { transform: translateY(0); }
}

@media (max-width: 600px) {
	.plugg-chatbox {
		right: 16px;
		bottom: 16px;
	}
}
