/**
 * Chatter — floating contact button.
 */

.mg203-chatter {
	--mg203-chatter-color: #4CAF50;
	--mg203-chatter-size: 64px;
	position: fixed;
	bottom: 24px;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	gap: 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.mg203-chatter--right {
	right: 24px;
	align-items: flex-end;
}

.mg203-chatter--left {
	left: 24px;
	align-items: flex-start;
}

/* Trigger row: idle label + main toggle button, anchored at the bottom */
.mg203-chatter__trigger {
	order: 2;
	display: flex;
	align-items: center;
	gap: 10px;
}

.mg203-chatter--right .mg203-chatter__trigger {
	flex-direction: row;
}

.mg203-chatter--left .mg203-chatter__trigger {
	flex-direction: row-reverse;
}

.mg203-chatter__idle-label {
	background: #fff;
	color: #1d2327;
	font-size: 14px;
	font-weight: 500;
	white-space: nowrap;
	padding: 12px 20px;
	border-radius: 999px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.mg203-chatter.is-open .mg203-chatter__idle-label {
	opacity: 0;
	transform: scale(0.9);
	pointer-events: none;
	position: absolute;
}

/* Toggle button */
.mg203-chatter__toggle {
	width: var(--mg203-chatter-size);
	height: var(--mg203-chatter-size);
	flex-shrink: 0;
	border-radius: 50%;
	border: none;
	background: var(--mg203-chatter-color);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
	position: relative;
	transition: transform 0.2s ease;
}

.mg203-chatter__toggle:hover {
	transform: scale(1.05);
}

.mg203-chatter__toggle:active {
	transform: scale(0.92);
}

.mg203-chatter__toggle-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.mg203-chatter__toggle-icon svg {
	width: 28px;
	height: 28px;
}

.mg203-chatter__toggle-icon--close {
	opacity: 0;
	transform: rotate(-180deg) scale(0.4);
}

.mg203-chatter.is-open .mg203-chatter__toggle-icon--open {
	opacity: 0;
	transform: rotate(180deg) scale(0.4);
}

.mg203-chatter.is-open .mg203-chatter__toggle-icon--close {
	opacity: 1;
	transform: rotate(0) scale(1);
}

/* Panel: vertical stack of icon-only channel buttons */
.mg203-chatter__panel {
	order: 1;
	display: flex;
	flex-direction: column;
	pointer-events: none;
}

.mg203-chatter.is-open .mg203-chatter__panel {
	pointer-events: auto;
}

.mg203-chatter__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

/* Each item cascades in, starting from the one nearest the toggle */
.mg203-chatter__item {
	opacity: 0;
	transform: translateY(16px) scale(0.4);
	transition: opacity 0.25s ease, transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
	transition-delay: calc(var(--mg203-chatter-item-index, 0) * 45ms);
}

.mg203-chatter.is-open .mg203-chatter__item {
	opacity: 1;
	transform: translateY(0) scale(1);
}

.mg203-chatter--right .mg203-chatter__list {
	align-items: flex-end;
}

.mg203-chatter--left .mg203-chatter__list {
	align-items: flex-start;
}

.mg203-chatter__icon-btn {
	--mg203-chatter-item-color: #4CAF50;
	position: relative;
	width: var(--mg203-chatter-size);
	height: var(--mg203-chatter-size);
	border-radius: 50%;
	background: var(--mg203-chatter-item-color);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
	transition: transform 0.15s ease;
}

.mg203-chatter__icon-btn:hover {
	transform: scale(1.06);
	color: #fff;
}

.mg203-chatter__icon-btn--instagram {
	background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285aeb 90%);
}

.mg203-chatter__icon-btn svg {
	width: 26px;
	height: 26px;
}

/* Hover tooltip, appears toward the inside of the viewport */
.mg203-chatter__tooltip {
	position: absolute;
	top: 50%;
	transform: translateY(-50%) translateX(4px);
	background: #fff;
	color: #1d2327;
	font-size: 13px;
	font-weight: 500;
	white-space: nowrap;
	padding: 7px 14px;
	border-radius: 999px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.15s ease, transform 0.15s ease;
}

.mg203-chatter--right .mg203-chatter__tooltip {
	right: calc(100% + 12px);
	transform: translateY(-50%) translateX(-4px);
}

.mg203-chatter--left .mg203-chatter__tooltip {
	left: calc(100% + 12px);
}

.mg203-chatter__icon-btn:hover .mg203-chatter__tooltip,
.mg203-chatter__icon-btn:focus-visible .mg203-chatter__tooltip {
	opacity: 1;
	transform: translateY(-50%) translateX(0);
}

@media (max-width: 480px) {
	.mg203-chatter {
		bottom: 16px;
	}

	.mg203-chatter--right {
		right: 16px;
	}

	.mg203-chatter--left {
		left: 16px;
	}

	.mg203-chatter__tooltip {
		display: none;
	}
}
