/**
 * WP Social Bar — frontend
 */

.fsb-bar {
	position: fixed;
	top: 50%;
	z-index: var(--fsb-z, 9999);
	transform: translateY(calc(-50% + var(--fsb-offset-y, 0px)));
	pointer-events: none;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.fsb-bar--right {
	right: var(--fsb-offset-x, 18px);
	left: auto;
}

.fsb-bar--left {
	left: var(--fsb-offset-x, 18px);
	right: auto;
}

.fsb-bar__list {
	list-style: none;
	margin: 0;
	padding: 0;
	padding-inline: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: flex-end;
	gap: var(--fsb-gap, 14px);
	/* Keep list the same width as the FAB so expand mode stays centered */
	width: var(--fsb-size, 48px);
	max-width: var(--fsb-size, 48px);
	box-sizing: border-box;
	align-self: center;
}

/* Beat theme rules like `.entry-content ul { padding-left: … !important }` */
nav.fsb-bar > ul.fsb-bar__list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	padding-inline: 0 !important;
	width: var(--fsb-size, 48px);
	max-width: var(--fsb-size, 48px);
}

.fsb-bar__item {
	margin: 0;
	padding: 0;
	list-style: none;
	pointer-events: auto;
	width: 100%;
	display: flex;
	justify-content: center;
	align-items: center;
	box-sizing: border-box;
}

nav.fsb-bar > ul.fsb-bar__list > li.fsb-bar__item {
	margin: 0 !important;
	padding: 0 !important;
	list-style: none !important;
	width: 100%;
}

.fsb-bar__link,
.fsb-bar__toggle {
	--fsb-color: #555;
	position: relative;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: var(--fsb-size, 48px) !important;
	height: var(--fsb-size, 48px) !important;
	min-width: var(--fsb-size, 48px) !important;
	min-height: var(--fsb-size, 48px) !important;
	max-width: var(--fsb-size, 48px) !important;
	max-height: var(--fsb-size, 48px) !important;
	border-radius: 50% !important;
	background: var(--fsb-color);
	color: #fff !important;
	text-decoration: none !important;
	text-transform: none !important;
	letter-spacing: normal !important;
	font-size: inherit !important;
	font-weight: normal !important;
	line-height: 0 !important;
	border: none !important;
	margin: 0 !important;
	padding: 0 !important;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.18);
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	isolation: isolate;
	-webkit-tap-highlight-color: transparent;
	box-sizing: border-box !important;
	vertical-align: middle;
	appearance: none;
	-webkit-appearance: none;
}

/* Flatsome / many themes style all `button` with margin-right/bottom: 1em */
nav.fsb-bar > .fsb-bar__toggle,
nav.fsb-bar button.fsb-bar__toggle {
	margin: 0 !important;
	padding: 0 !important;
	line-height: 0 !important;
	min-height: var(--fsb-size, 48px) !important;
}

.fsb-bar__link:hover,
.fsb-bar__link:focus-visible,
.fsb-bar__toggle:hover,
.fsb-bar__toggle:focus-visible {
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.24);
	outline: none;
}

/* Scale hover chỉ khi không chạy breathe/float (tránh đè keyframes) */
.fsb-bar:not(.fsb-bar--breathing):not(.fsb-bar--float) .fsb-bar__link:hover,
.fsb-bar:not(.fsb-bar--breathing):not(.fsb-bar--float) .fsb-bar__link:focus-visible,
.fsb-bar:not(.fsb-bar--breathing):not(.fsb-bar--float) .fsb-bar__toggle:hover,
.fsb-bar:not(.fsb-bar--breathing):not(.fsb-bar--float) .fsb-bar__toggle:focus-visible {
	transform: scale(1.08);
}

.fsb-bar__icon,
.fsb-bar__toggle-icon {
	position: relative;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 58%;
	height: 58%;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 0 !important;
	color: #fff;
	flex-shrink: 0;
}

.fsb-bar__icon svg,
.fsb-bar__toggle-icon svg {
	width: 100% !important;
	height: 100% !important;
	max-width: 100% !important;
	max-height: 100% !important;
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
	fill: currentColor;
	vertical-align: top;
}

/* Desktop list: toggle FAB hidden — full list always visible */
.fsb-bar__toggle {
	display: none;
	align-self: center;
	flex-shrink: 0;
	box-sizing: border-box;
}

/* Desktop expand: FAB góc dưới như mobile */
@media (min-width: 768px) {
	.fsb-bar--desktop-expand {
		top: auto;
		bottom: max(20px, env(safe-area-inset-bottom, 0px));
		transform: none;
		pointer-events: auto;
		background: transparent;
		isolation: auto;
	}

	.fsb-bar--desktop-expand .fsb-bar__toggle {
		display: flex;
		pointer-events: auto;
		flex-shrink: 0;
		position: relative;
		z-index: 2;
	}

	.fsb-bar--desktop-expand .fsb-bar__list {
		/* Extra space between last/first icon and expand FAB */
		margin: 0 0 22px !important;
		margin-inline: 0 !important;
		overflow: hidden;
		max-height: 0;
		opacity: 0;
		gap: 0;
		pointer-events: none;
		background: transparent;
		box-shadow: none;
		border: none;
		transition: max-height 0.28s ease, opacity 0.2s ease, gap 0.2s ease, margin 0.2s ease;
	}

	.fsb-bar--desktop-expand.is-open .fsb-bar__list {
		max-height: none;
		opacity: 1;
		gap: var(--fsb-gap, 14px);
		pointer-events: auto;
		overflow: visible;
		padding-block: 10px 8px !important;
		padding-inline: 0 !important;
		background: transparent;
	}

	.fsb-bar--desktop-expand .fsb-bar__item {
		transform: scale(0.6) translateY(10px);
		opacity: 0;
		transition: transform 0.22s ease, opacity 0.22s ease;
	}

	.fsb-bar--desktop-expand.is-open .fsb-bar__item {
		transform: none;
		opacity: 1;
	}

	.fsb-bar--desktop-expand.is-open .fsb-bar__item:nth-last-child(1) { transition-delay: 0.02s; }
	.fsb-bar--desktop-expand.is-open .fsb-bar__item:nth-last-child(2) { transition-delay: 0.05s; }
	.fsb-bar--desktop-expand.is-open .fsb-bar__item:nth-last-child(3) { transition-delay: 0.08s; }
	.fsb-bar--desktop-expand.is-open .fsb-bar__item:nth-last-child(4) { transition-delay: 0.11s; }
	.fsb-bar--desktop-expand.is-open .fsb-bar__item:nth-last-child(5) { transition-delay: 0.14s; }
	.fsb-bar--desktop-expand.is-open .fsb-bar__item:nth-last-child(6) { transition-delay: 0.17s; }
	.fsb-bar--desktop-expand.is-open .fsb-bar__item:nth-last-child(7) { transition-delay: 0.2s; }
	.fsb-bar--desktop-expand.is-open .fsb-bar__item:nth-last-child(8) { transition-delay: 0.23s; }
	.fsb-bar--desktop-expand.is-open .fsb-bar__item:nth-last-child(9) { transition-delay: 0.26s; }
	.fsb-bar--desktop-expand.is-open .fsb-bar__item:nth-last-child(n+10) { transition-delay: 0.28s; }

	.fsb-bar--desktop-expand.is-open.fsb-bar--pulse .fsb-bar__item .fsb-bar__ripple {
		animation: none;
	}
}

/* Instagram-like warm gradient (basic style) */
.fsb-bar--style-basic .fsb-bar__item--instagram .fsb-bar__link {
	background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
}

/* Messenger gradient (basic style) */
.fsb-bar--style-basic .fsb-bar__item--messenger .fsb-bar__link {
	background: linear-gradient(135deg, #00c6ff 0%, #a033ff 55%, #ff3b96 100%);
}

/* —— Glass / Frosted —— */
.fsb-bar--style-glass .fsb-bar__link,
.fsb-bar--style-glass .fsb-bar__toggle {
	background: color-mix(in srgb, var(--fsb-color) 22%, rgba(255, 255, 255, 0.72));
	backdrop-filter: blur(14px) saturate(1.35);
	-webkit-backdrop-filter: blur(14px) saturate(1.35);
	border: 1px solid rgba(255, 255, 255, 0.62);
	color: var(--fsb-color);
	box-shadow:
		0 4px 16px rgba(0, 0, 0, 0.1),
		inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.fsb-bar--style-glass .fsb-bar__icon,
.fsb-bar--style-glass .fsb-bar__toggle-icon {
	color: var(--fsb-color);
}

.fsb-bar--style-glass .fsb-bar__link:hover,
.fsb-bar--style-glass .fsb-bar__link:focus-visible,
.fsb-bar--style-glass .fsb-bar__toggle:hover,
.fsb-bar--style-glass .fsb-bar__toggle:focus-visible {
	background: color-mix(in srgb, var(--fsb-color) 32%, rgba(255, 255, 255, 0.78));
	box-shadow:
		0 6px 20px rgba(0, 0, 0, 0.14),
		inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.fsb-bar--style-glass .fsb-bar__ripple {
	background: var(--fsb-color);
	opacity: 0;
}

.fsb-bar--style-glass.fsb-bar--glow .fsb-bar__link,
.fsb-bar--style-glass.fsb-bar--glow .fsb-bar__toggle {
	box-shadow:
		0 4px 16px rgba(0, 0, 0, 0.1),
		inset 0 1px 0 rgba(255, 255, 255, 0.7),
		0 0 14px color-mix(in srgb, var(--fsb-color) 32%, transparent),
		0 0 28px color-mix(in srgb, var(--fsb-color) 14%, transparent);
}

@supports not (backdrop-filter: blur(1px)) {
	.fsb-bar--style-glass .fsb-bar__link,
	.fsb-bar--style-glass .fsb-bar__toggle {
		background: color-mix(in srgb, var(--fsb-color) 18%, #f5f7fa);
	}
}

/* —— Trắng Đen (BW) —— */
.fsb-bar--style-bw .fsb-bar__link,
.fsb-bar--style-bw .fsb-bar__toggle {
	--fsb-color: #111111;
	background: #111111;
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.12);
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
}

.fsb-bar--style-bw .fsb-bar__icon,
.fsb-bar--style-bw .fsb-bar__toggle-icon {
	color: #ffffff;
}

.fsb-bar--style-bw .fsb-bar__link:hover,
.fsb-bar--style-bw .fsb-bar__link:focus-visible,
.fsb-bar--style-bw .fsb-bar__toggle:hover,
.fsb-bar--style-bw .fsb-bar__toggle:focus-visible {
	background: #000000;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.36);
}

.fsb-bar--style-bw .fsb-bar__ripple {
	background: #111111;
}

.fsb-bar--style-bw.fsb-bar--glow .fsb-bar__link,
.fsb-bar--style-bw.fsb-bar--glow .fsb-bar__toggle {
	box-shadow:
		0 4px 14px rgba(0, 0, 0, 0.28),
		0 0 14px rgba(0, 0, 0, 0.35),
		0 0 28px rgba(0, 0, 0, 0.18);
}

.fsb-bar--style-bw.fsb-bar--glow .fsb-bar__link:hover,
.fsb-bar--style-bw.fsb-bar--glow .fsb-bar__link:focus-visible,
.fsb-bar--style-bw.fsb-bar--glow .fsb-bar__toggle:hover,
.fsb-bar--style-bw.fsb-bar--glow .fsb-bar__toggle:focus-visible {
	box-shadow:
		0 6px 18px rgba(0, 0, 0, 0.36),
		0 0 18px rgba(0, 0, 0, 0.4),
		0 0 32px rgba(0, 0, 0, 0.22);
}

/* —— Phong cách Pixel —— */
.fsb-bar--style-pixel .fsb-bar__link,
.fsb-bar--style-pixel .fsb-bar__toggle {
	border-radius: 0;
	border: 2px solid rgba(0, 0, 0, 0.2);
	box-shadow:
		3px 3px 0 rgba(0, 0, 0, 0.35),
		inset -2px -2px 0 rgba(0, 0, 0, 0.12),
		inset 2px 2px 0 rgba(255, 255, 255, 0.18);
	image-rendering: pixelated;
	image-rendering: crisp-edges;
}

.fsb-bar--style-pixel .fsb-bar__icon,
.fsb-bar--style-pixel .fsb-bar__toggle-icon {
	width: 52%;
	height: 52%;
	image-rendering: pixelated;
	image-rendering: crisp-edges;
}

.fsb-bar--style-pixel .fsb-bar__icon svg,
.fsb-bar--style-pixel .fsb-bar__toggle-icon svg {
	shape-rendering: crispEdges;
}

.fsb-bar--style-pixel .fsb-bar__ripple {
	border-radius: 0;
}

.fsb-bar--style-pixel .fsb-bar__link:hover,
.fsb-bar--style-pixel .fsb-bar__link:focus-visible,
.fsb-bar--style-pixel .fsb-bar__toggle:hover,
.fsb-bar--style-pixel .fsb-bar__toggle:focus-visible {
	box-shadow:
		4px 4px 0 rgba(0, 0, 0, 0.4),
		inset -2px -2px 0 rgba(0, 0, 0, 0.14),
		inset 2px 2px 0 rgba(255, 255, 255, 0.22);
}

.fsb-bar--style-pixel:not(.fsb-bar--breathing):not(.fsb-bar--float) .fsb-bar__link:hover,
.fsb-bar--style-pixel:not(.fsb-bar--breathing):not(.fsb-bar--float) .fsb-bar__link:focus-visible,
.fsb-bar--style-pixel:not(.fsb-bar--breathing):not(.fsb-bar--float) .fsb-bar__toggle:hover,
.fsb-bar--style-pixel:not(.fsb-bar--breathing):not(.fsb-bar--float) .fsb-bar__toggle:focus-visible {
	transform: translate(-1px, -1px);
}

.fsb-bar--style-pixel.fsb-bar--glow .fsb-bar__link,
.fsb-bar--style-pixel.fsb-bar--glow .fsb-bar__toggle {
	box-shadow:
		3px 3px 0 rgba(0, 0, 0, 0.35),
		inset -2px -2px 0 rgba(0, 0, 0, 0.12),
		inset 2px 2px 0 rgba(255, 255, 255, 0.18),
		0 0 0 2px color-mix(in srgb, var(--fsb-color) 55%, transparent),
		0 0 12px color-mix(in srgb, var(--fsb-color) 35%, transparent);
}

/* Pixel + Instagram / Messenger vẫn dùng nền brand đơn (không gradient mềm) */
.fsb-bar--style-pixel .fsb-bar__item--instagram .fsb-bar__link {
	background: #e1306c;
}

.fsb-bar--style-pixel .fsb-bar__item--messenger .fsb-bar__link {
	background: #0084ff;
}

.fsb-bar--style-pixel .fsb-bar__toggle {
	background: var(--fsb-color);
	color: #fff;
}

/* —— Gradient Mesh —— */
.fsb-bar--style-mesh .fsb-bar__link,
.fsb-bar--style-mesh .fsb-bar__toggle {
	background:
		radial-gradient(circle at 28% 22%, color-mix(in srgb, var(--fsb-color) 35%, #ffffff) 0%, transparent 42%),
		radial-gradient(circle at 78% 72%, color-mix(in srgb, var(--fsb-color) 55%, #ff8a65) 0%, transparent 48%),
		radial-gradient(circle at 55% 45%, var(--fsb-color) 0%, color-mix(in srgb, var(--fsb-color) 72%, #1a1423) 100%);
	color: #fff;
	border: 1px solid color-mix(in srgb, var(--fsb-color) 40%, rgba(255, 255, 255, 0.35));
	box-shadow:
		0 4px 16px color-mix(in srgb, var(--fsb-color) 35%, transparent),
		inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.fsb-bar--style-mesh .fsb-bar__icon,
.fsb-bar--style-mesh .fsb-bar__toggle-icon {
	color: #fff;
	filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.fsb-bar--style-mesh .fsb-bar__link:hover,
.fsb-bar--style-mesh .fsb-bar__link:focus-visible,
.fsb-bar--style-mesh .fsb-bar__toggle:hover,
.fsb-bar--style-mesh .fsb-bar__toggle:focus-visible {
	background:
		radial-gradient(circle at 32% 18%, color-mix(in srgb, var(--fsb-color) 45%, #ffffff) 0%, transparent 45%),
		radial-gradient(circle at 80% 75%, color-mix(in srgb, var(--fsb-color) 60%, #ff8a65) 0%, transparent 52%),
		radial-gradient(circle at 50% 50%, var(--fsb-color) 0%, color-mix(in srgb, var(--fsb-color) 65%, #120f18) 100%);
	box-shadow:
		0 6px 22px color-mix(in srgb, var(--fsb-color) 45%, transparent),
		inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.fsb-bar--style-mesh.fsb-bar--glow .fsb-bar__link,
.fsb-bar--style-mesh.fsb-bar--glow .fsb-bar__toggle {
	box-shadow:
		0 4px 16px color-mix(in srgb, var(--fsb-color) 35%, transparent),
		inset 0 1px 0 rgba(255, 255, 255, 0.28),
		0 0 16px color-mix(in srgb, var(--fsb-color) 40%, transparent),
		0 0 32px color-mix(in srgb, var(--fsb-color) 18%, transparent);
}

.fsb-bar--style-mesh .fsb-bar__item--instagram .fsb-bar__link {
	background:
		radial-gradient(circle at 20% 20%, #feda75 0%, transparent 40%),
		radial-gradient(circle at 80% 30%, #fa7e1e 0%, transparent 42%),
		radial-gradient(circle at 70% 80%, #d62976 0%, transparent 45%),
		radial-gradient(circle at 30% 75%, #962fbf 0%, transparent 40%),
		linear-gradient(135deg, #f09433, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888);
}

.fsb-bar--style-mesh .fsb-bar__item--messenger .fsb-bar__link {
	background:
		radial-gradient(circle at 25% 25%, #00c6ff 0%, transparent 45%),
		radial-gradient(circle at 80% 70%, #ff3b96 0%, transparent 48%),
		linear-gradient(135deg, #00c6ff, #a033ff 55%, #ff3b96);
}

@supports not (background: color-mix(in srgb, red 50%, white)) {
	.fsb-bar--style-mesh .fsb-bar__link,
	.fsb-bar--style-mesh .fsb-bar__toggle {
		background: radial-gradient(circle at 30% 25%, rgba(255, 255, 255, 0.35), transparent 45%), var(--fsb-color);
	}
}

/* —— Neo-Minimalism (2026) —— */
.fsb-bar--style-neo .fsb-bar__link,
.fsb-bar--style-neo .fsb-bar__toggle {
	background: color-mix(in srgb, var(--fsb-color) 7%, #f8f9fb);
	color: var(--fsb-color);
	border: 1.5px solid color-mix(in srgb, var(--fsb-color) 36%, #e2e5ea);
	box-shadow:
		0 1px 2px rgba(16, 24, 40, 0.04),
		0 4px 14px rgba(16, 24, 40, 0.05);
}

.fsb-bar--style-neo .fsb-bar__icon,
.fsb-bar--style-neo .fsb-bar__toggle-icon {
	color: var(--fsb-color);
	width: 46%;
	height: 46%;
}

.fsb-bar--style-neo .fsb-bar__link:hover,
.fsb-bar--style-neo .fsb-bar__link:focus-visible,
.fsb-bar--style-neo .fsb-bar__toggle:hover,
.fsb-bar--style-neo .fsb-bar__toggle:focus-visible {
	background: color-mix(in srgb, var(--fsb-color) 11%, #ffffff);
	border-color: color-mix(in srgb, var(--fsb-color) 50%, #d0d5dd);
	box-shadow:
		0 2px 4px rgba(16, 24, 40, 0.06),
		0 8px 22px rgba(16, 24, 40, 0.07);
}

.fsb-bar--style-neo .fsb-bar__ripple {
	background: var(--fsb-color);
	opacity: 0;
}

.fsb-bar--style-neo.fsb-bar--glow .fsb-bar__link,
.fsb-bar--style-neo.fsb-bar--glow .fsb-bar__toggle {
	box-shadow:
		0 1px 2px rgba(16, 24, 40, 0.04),
		0 4px 14px rgba(16, 24, 40, 0.05),
		0 0 0 1px color-mix(in srgb, var(--fsb-color) 20%, transparent),
		0 0 18px color-mix(in srgb, var(--fsb-color) 16%, transparent);
}

.fsb-bar--style-neo.fsb-bar--glow .fsb-bar__link:hover,
.fsb-bar--style-neo.fsb-bar--glow .fsb-bar__link:focus-visible,
.fsb-bar--style-neo.fsb-bar--glow .fsb-bar__toggle:hover,
.fsb-bar--style-neo.fsb-bar--glow .fsb-bar__toggle:focus-visible {
	box-shadow:
		0 2px 4px rgba(16, 24, 40, 0.06),
		0 8px 22px rgba(16, 24, 40, 0.07),
		0 0 0 1px color-mix(in srgb, var(--fsb-color) 26%, transparent),
		0 0 24px color-mix(in srgb, var(--fsb-color) 22%, transparent);
}

.fsb-bar--style-neo .fsb-bar__item--instagram .fsb-bar__link {
	--fsb-color: #e1306c;
	background: color-mix(in srgb, #e1306c 8%, #fafbfc);
	border-color: color-mix(in srgb, #e1306c 34%, #e8eaed);
	color: #e1306c;
}

.fsb-bar--style-neo .fsb-bar__item--messenger .fsb-bar__link {
	--fsb-color: #0084ff;
	background: color-mix(in srgb, #0084ff 8%, #fafbfc);
	border-color: color-mix(in srgb, #0084ff 34%, #e8eaed);
	color: #0084ff;
}

.fsb-bar--style-neo .fsb-bar__toggle {
	background: color-mix(in srgb, var(--fsb-color) 9%, #f8f9fb);
	color: var(--fsb-color);
}

@supports not (background: color-mix(in srgb, red 50%, white)) {
	.fsb-bar--style-neo .fsb-bar__link,
	.fsb-bar--style-neo .fsb-bar__toggle {
		background: #f8f9fb;
		border: 1.5px solid #e2e5ea;
		color: var(--fsb-color);
	}
}

/* —— Labels under icons —— */
.fsb-bar__label {
	display: none;
}

.fsb-bar--labels .fsb-bar__list,
nav.fsb-bar.fsb-bar--labels > ul.fsb-bar__list {
	width: max(var(--fsb-size, 48px), 4.8em);
	max-width: none;
	gap: calc(var(--fsb-gap, 14px) + 16px);
}

.fsb-bar--labels .fsb-bar__item {
	position: relative;
}

.fsb-bar--labels .fsb-bar__link {
	overflow: visible;
}

.fsb-bar--labels .fsb-bar__label {
	display: block;
	position: absolute;
	top: calc(100% + 5px);
	left: 50%;
	transform: translateX(-50%);
	z-index: 3;
	max-width: 4.8em;
	padding: 0 2px;
	font-size: clamp(10px, calc(var(--fsb-size, 48px) * 0.22), 12px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: 0.01em;
	text-align: center;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	color: #2c3338;
	text-shadow: 0 1px 0 rgba(255, 255, 255, 0.7);
	pointer-events: none;
}

/* Pulse / ripple rings */
.fsb-bar__ripple {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--fsb-color);
	z-index: 0;
	opacity: 0;
	pointer-events: none;
}

.fsb-bar--pulse .fsb-bar__ripple {
	animation: fsb-pulse 2s ease-out infinite;
}

.fsb-bar--pulse .fsb-bar__ripple--delay {
	animation-delay: 1s;
}

/* Gợn sóng — vòng trong lan từ viền icon ra ngoài */
.fsb-bar--halo .fsb-bar__item {
	overflow: visible;
}

.fsb-bar--halo .fsb-bar__link::before,
.fsb-bar--halo .fsb-bar__toggle::before,
.fsb-bar--halo .fsb-bar__link::after,
.fsb-bar--halo .fsb-bar__toggle::after {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: inherit;
	z-index: 0;
	pointer-events: none;
	background: transparent;
	border: 1.5px solid color-mix(in srgb, var(--fsb-color) 42%, transparent);
	box-shadow:
		0 0 6px color-mix(in srgb, var(--fsb-color) 28%, transparent),
		0 0 12px color-mix(in srgb, var(--fsb-color) 14%, transparent);
	animation: fsb-halo 3.2s ease-out infinite;
}

.fsb-bar--halo .fsb-bar__link::after,
.fsb-bar--halo .fsb-bar__toggle::after {
	animation-delay: 1.6s;
}

.fsb-bar--halo .fsb-bar__icon,
.fsb-bar--halo .fsb-bar__toggle-icon {
	z-index: 2;
}

@keyframes fsb-halo {
	0% {
		transform: scale(1);
		opacity: 0.72;
	}
	70% {
		opacity: 0.22;
	}
	100% {
		transform: scale(1.72);
		opacity: 0;
	}
}

@supports not (background: color-mix(in srgb, red 50%, transparent)) {
	.fsb-bar--halo .fsb-bar__link::before,
	.fsb-bar--halo .fsb-bar__toggle::before,
	.fsb-bar--halo .fsb-bar__link::after,
	.fsb-bar--halo .fsb-bar__toggle::after {
		border-color: rgba(255, 255, 255, 0.4);
		box-shadow: 0 0 6px rgba(255, 255, 255, 0.28), 0 0 12px rgba(255, 255, 255, 0.12);
	}
}

/* Soft glow — brand-tinted halo, not neon */
.fsb-bar--glow .fsb-bar__link,
.fsb-bar--glow .fsb-bar__toggle {
	box-shadow:
		0 3px 10px rgba(0, 0, 0, 0.14),
		0 0 12px color-mix(in srgb, var(--fsb-color) 38%, transparent),
		0 0 26px color-mix(in srgb, var(--fsb-color) 16%, transparent);
}

.fsb-bar--glow .fsb-bar__link:hover,
.fsb-bar--glow .fsb-bar__link:focus-visible,
.fsb-bar--glow .fsb-bar__toggle:hover,
.fsb-bar--glow .fsb-bar__toggle:focus-visible {
	box-shadow:
		0 5px 16px rgba(0, 0, 0, 0.2),
		0 0 16px color-mix(in srgb, var(--fsb-color) 48%, transparent),
		0 0 32px color-mix(in srgb, var(--fsb-color) 22%, transparent);
}

@supports not (background: color-mix(in srgb, red 50%, transparent)) {
	.fsb-bar--glow .fsb-bar__link,
	.fsb-bar--glow .fsb-bar__toggle {
		box-shadow: 0 3px 10px rgba(0, 0, 0, 0.14), 0 0 14px rgba(0, 0, 0, 0.12);
	}
}

/* Chớp sáng — flash brightness + burst on icon (không đụng transform của breathing/float) */
.fsb-bar--flash .fsb-bar__icon,
.fsb-bar--flash .fsb-bar__toggle-icon {
	animation: fsb-flash 2.4s ease-in-out infinite;
}

@keyframes fsb-flash {
	0%,
	38%,
	100% {
		filter: brightness(1) saturate(1);
	}
	48%,
	55% {
		filter:
			brightness(1.8) saturate(1.35)
			drop-shadow(0 0 6px #fff)
			drop-shadow(0 0 14px var(--fsb-color))
			drop-shadow(0 0 28px color-mix(in srgb, var(--fsb-color) 80%, transparent));
	}
	62% {
		filter:
			brightness(1.3) saturate(1.15)
			drop-shadow(0 0 8px color-mix(in srgb, var(--fsb-color) 70%, transparent));
	}
}

/*
 * Motion effects (breathe / float)
 * - Bỏ transition:transform khi animate (tránh nuốt keyframes)
 * - Không pause animation bằng :hover sticky trên touch
 */
.fsb-bar--breathing .fsb-bar__link,
.fsb-bar--breathing .fsb-bar__toggle,
.fsb-bar--float .fsb-bar__link,
.fsb-bar--float .fsb-bar__toggle {
	transition: box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
	will-change: transform;
}

/* Breathing only */
.fsb-bar--breathing:not(.fsb-bar--float) .fsb-bar__link,
.fsb-bar--breathing:not(.fsb-bar--float) .fsb-bar__toggle {
	animation: fsb-breathe 2.8s ease-in-out infinite;
}

/* Float / bob only */
.fsb-bar--float:not(.fsb-bar--breathing) .fsb-bar__link,
.fsb-bar--float:not(.fsb-bar--breathing) .fsb-bar__toggle {
	animation: fsb-float 2.6s ease-in-out infinite;
}

/* Both: combined keyframes */
.fsb-bar--breathing.fsb-bar--float .fsb-bar__link,
.fsb-bar--breathing.fsb-bar--float .fsb-bar__toggle {
	animation: fsb-breathe-float 2.8s ease-in-out infinite;
}

/* Float: lệch nhịp nhẹ. Breathing: cùng 1 nhịp (delay = 0). */
.fsb-bar--float:not(.fsb-bar--breathing) .fsb-bar__item:nth-child(2n) .fsb-bar__link {
	animation-delay: 0.35s;
}

.fsb-bar--float:not(.fsb-bar--breathing) .fsb-bar__item:nth-child(3n) .fsb-bar__link {
	animation-delay: 0.7s;
}

.fsb-bar--float:not(.fsb-bar--breathing) .fsb-bar__item:nth-child(4n) .fsb-bar__link {
	animation-delay: 1.05s;
}

.fsb-bar--float:not(.fsb-bar--breathing) .fsb-bar__item:nth-child(5n) .fsb-bar__link {
	animation-delay: 1.4s;
}

.fsb-bar--breathing .fsb-bar__link,
.fsb-bar--breathing .fsb-bar__toggle {
	animation-delay: 0s;
}

/* Hover pause chỉ trên chuột thật — tránh touch giữ :hover làm đứng animation */
@media (hover: hover) and (pointer: fine) {
	.fsb-bar--breathing .fsb-bar__link:hover,
	.fsb-bar--breathing .fsb-bar__link:focus-visible,
	.fsb-bar--breathing .fsb-bar__toggle:hover,
	.fsb-bar--breathing .fsb-bar__toggle:focus-visible,
	.fsb-bar--float .fsb-bar__link:hover,
	.fsb-bar--float .fsb-bar__link:focus-visible,
	.fsb-bar--float .fsb-bar__toggle:hover,
	.fsb-bar--float .fsb-bar__toggle:focus-visible {
		animation-play-state: paused;
		transform: scale(1.08);
	}
}

.fsb-bar__item--instagram .fsb-bar__ripple {
	background: #e1306c;
}

.fsb-bar__item--messenger .fsb-bar__ripple {
	background: #a033ff;
}

.fsb-bar__toggle {
	--fsb-color: #e53935;
}

.fsb-bar--style-basic .fsb-bar__toggle {
	background: var(--fsb-color);
	color: #fff;
}

.fsb-bar__toggle .fsb-bar__ripple {
	background: var(--fsb-color);
}

.fsb-bar__toggle-icon--close {
	display: none !important;
}

.fsb-bar.is-open .fsb-bar__toggle-icon--open {
	display: none !important;
}

.fsb-bar.is-open .fsb-bar__toggle-icon--close {
	display: flex !important;
}

.fsb-bar:not(.is-open) .fsb-bar__toggle-icon--open {
	display: flex !important;
}

@keyframes fsb-pulse {
	0% {
		transform: scale(1);
		opacity: 0.55;
	}
	70% {
		transform: scale(1.75);
		opacity: 0;
	}
	100% {
		transform: scale(1.75);
		opacity: 0;
	}
}

@keyframes fsb-breathe {
	0%,
	100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.15);
	}
}

@keyframes fsb-float {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-8px);
	}
}

@keyframes fsb-breathe-float {
	0%,
	100% {
		transform: translateY(0) scale(1);
	}
	50% {
		transform: translateY(-8px) scale(1.15);
	}
}

@keyframes fsb-halo-soft {
	0% {
		transform: scale(1);
		opacity: 0.45;
	}
	100% {
		transform: scale(1.55);
		opacity: 0;
	}
}

@keyframes fsb-breathe-soft {
	0%,
	100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.07);
	}
}

@keyframes fsb-float-soft {
	0%,
	100% {
		transform: translateY(0);
	}
	50% {
		transform: translateY(-4px);
	}
}

@keyframes fsb-breathe-float-soft {
	0%,
	100% {
		transform: translateY(0) scale(1);
	}
	50% {
		transform: translateY(-4px) scale(1.07);
	}
}

/*
 * prefers-reduced-motion:
 * - Tắt pulse (mạnh)
 * - Breathing / Float vẫn chạy nhưng biên độ nhỏ hơn (opt-in từ admin)
 * Trước đây animation:none !important khiến 2 hiệu ứng “chết” khi macOS bật Reduce motion.
 */
@media (prefers-reduced-motion: reduce) {
	.fsb-bar--pulse .fsb-bar__ripple {
		animation: none !important;
	}

	.fsb-bar--halo .fsb-bar__link::before,
	.fsb-bar--halo .fsb-bar__toggle::before,
	.fsb-bar--halo .fsb-bar__link::after,
	.fsb-bar--halo .fsb-bar__toggle::after {
		animation: fsb-halo-soft 3.8s ease-out infinite;
	}

	.fsb-bar--halo .fsb-bar__link::after,
	.fsb-bar--halo .fsb-bar__toggle::after {
		animation-delay: 1.9s;
	}

	.fsb-bar--flash .fsb-bar__icon,
	.fsb-bar--flash .fsb-bar__toggle-icon {
		animation-duration: 3.6s;
	}

	.fsb-bar--breathing:not(.fsb-bar--float) .fsb-bar__link,
	.fsb-bar--breathing:not(.fsb-bar--float) .fsb-bar__toggle {
		animation-name: fsb-breathe-soft;
		animation-duration: 3.4s;
	}

	.fsb-bar--float:not(.fsb-bar--breathing) .fsb-bar__link,
	.fsb-bar--float:not(.fsb-bar--breathing) .fsb-bar__toggle {
		animation-name: fsb-float-soft;
		animation-duration: 3.2s;
	}

	.fsb-bar--breathing.fsb-bar--float .fsb-bar__link,
	.fsb-bar--breathing.fsb-bar--float .fsb-bar__toggle {
		animation-name: fsb-breathe-float-soft;
		animation-duration: 3.4s;
	}
}

/* —— Mobile: 1 FAB góc dưới, tap để sổ list lên —— */
@media (max-width: 767px) {
	.fsb-bar--hide-mobile {
		display: none;
	}

	.fsb-bar {
		top: auto;
		bottom: max(16px, env(safe-area-inset-bottom, 0px));
		transform: none;
		--fsb-size: 52px;
		--fsb-gap: 12px;
		--fsb-offset-x: 14px;
		/* Cho phép nhận touch trên vùng FAB; list đóng vẫn pointer-events: none */
		pointer-events: auto;
		background: transparent;
		/* Không tạo stacking layer xám quanh cột icon */
		isolation: auto;
	}

	.fsb-bar__toggle {
		display: flex;
		pointer-events: auto;
		flex-shrink: 0;
		position: relative;
		z-index: 2;
		touch-action: manipulation;
	}

	.fsb-bar__list {
		/* Extra space between first icon and expand FAB */
		margin: 0 0 22px !important;
		margin-inline: 0 !important;
		overflow: hidden;
		max-height: 0;
		opacity: 0;
		gap: 0;
		pointer-events: none;
		background: transparent;
		box-shadow: none;
		border: none;
		transition: max-height 0.28s ease, opacity 0.2s ease, gap 0.2s ease, margin 0.2s ease;
	}

	.fsb-bar.is-open .fsb-bar__list {
		/* Avoid overflow:auto — clips shadow/glow into a gray frame */
		max-height: none;
		opacity: 1;
		gap: var(--fsb-gap, 12px);
		pointer-events: auto;
		overflow: visible;
		padding-block: 10px 8px !important;
		padding-inline: 0 !important;
		background: transparent;
		-webkit-overflow-scrolling: auto;
	}

	/* Glass trên mobile: bỏ backdrop-blur (dễ tạo lớp xám sau cột icon) */
	.fsb-bar--style-glass .fsb-bar__link,
	.fsb-bar--style-glass .fsb-bar__toggle {
		backdrop-filter: none;
		-webkit-backdrop-filter: none;
		background: color-mix(in srgb, var(--fsb-color) 20%, #ffffff);
	}

	.fsb-bar--style-glass .fsb-bar__link:hover,
	.fsb-bar--style-glass .fsb-bar__link:focus-visible,
	.fsb-bar--style-glass .fsb-bar__toggle:hover,
	.fsb-bar--style-glass .fsb-bar__toggle:focus-visible {
		background: color-mix(in srgb, var(--fsb-color) 28%, #ffffff);
	}

	.fsb-bar__item {
		transform: scale(0.6) translateY(10px);
		opacity: 0;
		transition: transform 0.22s ease, opacity 0.22s ease;
	}

	.fsb-bar.is-open .fsb-bar__item {
		/* Không giữ transform tĩnh — để breathe/float trên .fsb-bar__link chạy được */
		transform: none;
		opacity: 1;
	}

	/* Stagger open */
	.fsb-bar.is-open .fsb-bar__item:nth-last-child(1) { transition-delay: 0.02s; }
	.fsb-bar.is-open .fsb-bar__item:nth-last-child(2) { transition-delay: 0.05s; }
	.fsb-bar.is-open .fsb-bar__item:nth-last-child(3) { transition-delay: 0.08s; }
	.fsb-bar.is-open .fsb-bar__item:nth-last-child(4) { transition-delay: 0.11s; }
	.fsb-bar.is-open .fsb-bar__item:nth-last-child(5) { transition-delay: 0.14s; }
	.fsb-bar.is-open .fsb-bar__item:nth-last-child(6) { transition-delay: 0.17s; }
	.fsb-bar.is-open .fsb-bar__item:nth-last-child(7) { transition-delay: 0.2s; }
	.fsb-bar.is-open .fsb-bar__item:nth-last-child(8) { transition-delay: 0.23s; }
	.fsb-bar.is-open .fsb-bar__item:nth-last-child(9) { transition-delay: 0.26s; }
	.fsb-bar.is-open .fsb-bar__item:nth-last-child(n+10) { transition-delay: 0.28s; }

	/* Khi mở: tắt pulse/halo list để đỡ rối */
	.fsb-bar.is-open.fsb-bar--pulse .fsb-bar__item .fsb-bar__ripple {
		animation: none;
	}

	.fsb-bar.is-open.fsb-bar--halo .fsb-bar__item .fsb-bar__link::before,
	.fsb-bar.is-open.fsb-bar--halo .fsb-bar__item .fsb-bar__link::after {
		animation: none;
	}
}
