/* AECSF Floating Contact — front widget */

:root {
	--aecsf-fc-z: 99990;
	--aecsf-fc-size: 48px;
	--aecsf-fc-gap: 8px;
	--aecsf-fc-offset-y: 0px;
}

/* Double-beat pulse (heartbeat) — pauses on hover/focus */
@keyframes aecsf-fc-heartbeat {
	0%,
	100% {
		transform: scale(1);
	}
	12% {
		transform: scale(1.09);
	}
	24% {
		transform: scale(1);
	}
	36% {
		transform: scale(1.07);
	}
	55% {
		transform: scale(1);
	}
}

.aecsf-fc {
	position: fixed;
	z-index: var(--aecsf-fc-z);
	display: flex;
	flex-direction: row;
	align-items: stretch;
	max-width: calc(100vw - 12px);
	pointer-events: none;
	font-family: system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
}

.aecsf-fc > * {
	pointer-events: auto;
}

/* Vertical alignment */
.aecsf-fc--va-center {
	top: 50%;
	transform: translateY(calc(-50% + var(--aecsf-fc-offset-y, 0px)));
}

.aecsf-fc--va-top {
	top: calc(72px + var(--aecsf-fc-offset-y, 0px));
	transform: none;
}

.aecsf-fc--va-bottom {
	top: auto;
	bottom: calc(72px - var(--aecsf-fc-offset-y, 0px));
	transform: none;
}

/* Horizontal dock */
.aecsf-fc--right {
	right: 0;
	flex-direction: row;
}

.aecsf-fc--left {
	left: 0;
	flex-direction: row-reverse;
}

.aecsf-fc__panel {
	transition: transform 0.28s ease, opacity 0.22s ease, visibility 0.22s ease;
	will-change: transform;
}

.aecsf-fc--right.is-collapsed .aecsf-fc__panel {
	transform: translateX(calc(100% + 4px));
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.aecsf-fc--left.is-collapsed .aecsf-fc__panel {
	transform: translateX(calc(-100% - 4px));
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.aecsf-fc__panel-inner {
	display: flex;
	flex-direction: row;
	align-items: center;
	gap: var(--aecsf-fc-gap);
	padding: 4px 6px;
	background: transparent;
	border-radius: 8px 0 0 8px;
	box-shadow: none;
}

.aecsf-fc--left .aecsf-fc__panel-inner {
	border-radius: 0 8px 8px 0;
}

.aecsf-fc__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: var(--aecsf-fc-gap);
}

.aecsf-fc__item {
	margin: 0;
	padding: 0;
}

.aecsf-fc__cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.45rem 0.65rem;
	background: #111;
	color: #fff !important;
	text-decoration: none !important;
	font-size: 0.78rem;
	font-weight: 600;
	white-space: nowrap;
	border-radius: 4px;
	line-height: 1.2;
	max-width: 42vw;
}

.aecsf-fc__cta:hover,
.aecsf-fc__cta:focus {
	filter: brightness(1.08);
	color: #fff !important;
}

.aecsf-fc__btn {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--aecsf-fc-size);
	height: var(--aecsf-fc-size);
	border-radius: 8px;
	text-decoration: none !important;
	color: #fff !important;
	box-sizing: border-box;
	transform-origin: center center;
	transition: box-shadow 0.12s ease;
	animation: aecsf-fc-heartbeat 2.2s ease-in-out infinite;
	will-change: transform;
}

.aecsf-fc__btn:hover,
.aecsf-fc__btn:focus {
	animation: none;
	transform: scale(1.06);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

.aecsf-fc__btn-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 60%;
	height: 60%;
	font-size: calc(var(--aecsf-fc-size) * 0.45);
}

.aecsf-fc__btn--whatsapp {
	background: #25d366;
}

.aecsf-fc__btn--line {
	background: #06c755;
}

.aecsf-fc__line-mark {
	display: block;
	font-size: 0.62em;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1;
	color: #fff;
}

.aecsf-fc__btn--telegram {
	background: #229ed9;
}

.aecsf-fc__btn--phone {
	background: #37474f;
}

.aecsf-fc__btn--email {
	background: #5c6bc0;
}

.aecsf-fc__btn--url,
.aecsf-fc__btn--custom {
	background: #455a64;
}

.aecsf-fc__badge {
	position: absolute;
	top: -4px;
	right: -4px;
	min-width: 1.1rem;
	height: 1.1rem;
	padding: 0 4px;
	font-size: 10px;
	font-weight: 700;
	line-height: 1.1rem;
	text-align: center;
	color: #fff;
	background: #e53935;
	border-radius: 999px;
	box-shadow: 0 0 0 2px #fff;
}

/* Toggle tab */
.aecsf-fc__tab {
	width: 22px;
	min-height: 56px;
	margin: 0;
	padding: 0;
	border: none;
	background: #111;
	color: #fff;
	cursor: pointer;
	border-radius: 6px 0 0 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
}

.aecsf-fc--left .aecsf-fc__tab {
	border-radius: 0 6px 6px 0;
}

.aecsf-fc__tab:hover,
.aecsf-fc__tab:focus {
	filter: brightness(1.1);
}

.aecsf-fc__tab-icon {
	width: 0;
	height: 0;
	border-top: 5px solid transparent;
	border-bottom: 5px solid transparent;
	border-left: 6px solid #fff;
	transition: transform 0.2s ease;
}

.aecsf-fc--left .aecsf-fc__tab-icon {
	border-left: none;
	border-right: 6px solid #fff;
}

.aecsf-fc.is-collapsed .aecsf-fc__tab-icon {
	transform: rotate(180deg);
}

@media (max-width: 600px) {
	.aecsf-fc__cta {
		font-size: 0.72rem;
		padding: 0.4rem 0.5rem;
		max-width: 36vw;
	}
}

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