/* Easy Social Chat — frontend */

.easysc {
	--easysc-size: 56px;
	--easysc-side: 20px;
	--easysc-bottom: 20px;
	--easysc-main: #e63946;
	--easysc-gap: 12px;

	position: fixed;
	bottom: var(--easysc-bottom);
	z-index: 99999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: var(--easysc-gap);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1;
}

.easysc--right { right: var(--easysc-side); align-items: flex-end; }
.easysc--left  { left: var(--easysc-side);  align-items: flex-start; }

.easysc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--easysc-gap);
	align-items: inherit;
}

.easysc__item {
	opacity: 0;
	visibility: hidden;
	transform: translateY(12px) scale(.8);
	transition: opacity .2s ease, transform .25s cubic-bezier(.2, .8, .3, 1.2), visibility .2s;
	transition-delay: 0s;
}

.easysc.is-open .easysc__item {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
	transition-delay: calc(var(--easysc-i, 0) * .05s);
}

/* Always-visible mode: no toggle, icons sit there from page load. */
.easysc.easysc--always .easysc__item {
	opacity: 0;
	visibility: visible;
	transform: translateY(14px) scale(.85);
	animation: easysc-in .4s cubic-bezier(.2, .8, .3, 1.2) both;
	animation-delay: calc(.15s + var(--easysc-i, 0) * .08s);
	transition: none;
}

@keyframes easysc-in {
	to { opacity: 1; transform: translateY(0) scale(1); }
}

/* Labels would crowd the corner when everything is always on screen,
   so in this mode they slide out on hover instead. */
.easysc--always.easysc--labels .easysc__text {
	opacity: 0;
	transform: translateX(8px) scale(.9);
	pointer-events: none;
	transition: opacity .18s ease, transform .2s ease;
}

.easysc--always.easysc--left.easysc--labels .easysc__text { transform: translateX(-8px) scale(.9); }

.easysc--always.easysc--labels .easysc__link:hover .easysc__text,
.easysc--always.easysc--labels .easysc__link:focus-visible .easysc__text {
	opacity: 1;
	transform: translateX(0) scale(1);
}

.easysc__link {
	display: flex;
	align-items: center;
	gap: 10px;
	text-decoration: none !important;
	color: #fff !important;
	box-shadow: none !important;
}

.easysc__icon {
	width: var(--easysc-size);
	height: var(--easysc-size);
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--easysc-main);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .22);
	transition: transform .15s ease, box-shadow .15s ease;
}

.easysc--brand .easysc__icon { background: var(--easysc-brand, var(--easysc-main)); }
.easysc--brand .easysc__item--instagram .easysc__icon {
	background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 70%, #285aeb 100%);
}

.easysc__icon svg {
	width: 58%;
	height: 58%;
	display: block;
}

.easysc__link:hover .easysc__icon,
.easysc__link:focus-visible .easysc__icon {
	transform: scale(1.06);
	box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
}

.easysc__text {
	display: none;
	background: #fff;
	color: #1c1c1e;
	font-size: 14px;
	font-weight: 600;
	padding: 9px 14px;
	border-radius: 999px;
	white-space: nowrap;
	box-shadow: 0 3px 12px rgba(0, 0, 0, .16);
}

.easysc--labels .easysc__text { display: block; }
.easysc--labels.easysc--right .easysc__link { flex-direction: row-reverse; }

/* Toggle button */
.easysc__toggle {
	width: var(--easysc-size);
	height: var(--easysc-size);
	border: 0;
	padding: 0;
	margin: 0;
	border-radius: 50%;
	background: var(--easysc-main);
	color: #fff;
	cursor: pointer;
	position: relative;
	box-shadow: 0 6px 18px rgba(0, 0, 0, .26);
	transition: transform .2s ease;
	-webkit-appearance: none;
	appearance: none;
}

.easysc__toggle:hover { transform: scale(1.06); }
.easysc__toggle:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

.easysc__toggle-icon {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity .18s ease, transform .25s ease;
}

.easysc__toggle-icon svg { width: 52%; height: 52%; display: block; }

.easysc__toggle-icon--close { opacity: 0; transform: rotate(-90deg) scale(.6); }
.easysc.is-open .easysc__toggle-icon--open { opacity: 0; transform: rotate(90deg) scale(.6); }
.easysc.is-open .easysc__toggle-icon--close { opacity: 1; transform: rotate(0) scale(1); }

/* Visibility */
@media (max-width: 782px) {
	.easysc--hide-mobile { display: none; }
	.easysc--labels .easysc__text { font-size: 13px; padding: 8px 12px; }
}

@media (min-width: 783px) {
	.easysc--hide-desktop { display: none; }
}

@media (prefers-reduced-motion: reduce) {
	.easysc *,
	.easysc__item { transition-duration: .01ms !important; }

	.easysc.easysc--always .easysc__item {
		animation: none;
		opacity: 1;
		transform: none;
	}
}

/* Inline shortcode buttons */
.easysc-inline {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 16px 0;
}

.easysc-inline__btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 10px 18px 10px 10px;
	border-radius: 999px;
	background: var(--easysc-brand, #333);
	color: #fff !important;
	text-decoration: none !important;
	font-weight: 600;
	font-size: 15px;
	line-height: 1;
}

.easysc-inline__btn .easysc__icon {
	width: 28px;
	height: 28px;
	background: rgba(255, 255, 255, .2);
	box-shadow: none;
}

.easysc-inline__btn:hover { filter: brightness(1.06); }
