/* ============================================================
 * Floating Banner — sticky bottom, 2 rotating slides
 * Self-contained styles. No external dependencies.
 * ============================================================ */

.fb-root {
	position: fixed;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%) translateY(0);
	width: min(860px, calc(100% - 20px));
	z-index: 9998;
	font-family: inherit;
	pointer-events: none; /* children opt back in */
	transition: transform .35s cubic-bezier(.4,0,.2,1), opacity .35s ease;
	opacity: 1;
}

/* When collapsed: slide the whole root fully off-screen. The .fb-toggle
 * tab sits at top:-32px relative to the root, so it stays visible in
 * the bottom 32px of the viewport while the body disappears. */
.fb-root.fb-collapsed {
	transform: translateX(-50%) translateY(100%);
}

/* toggle tab */
.fb-toggle {
	pointer-events: auto;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	position: absolute;
	top: -32px;
	left: 16px;
	height: 32px;
	padding: 0 14px;
	border: none;
	border-radius: 10px 10px 0 0;
	background: linear-gradient(135deg, #ff006e, #8b5cf6 50%, #00f2ff);
	color: #fff;
	font-weight: 700;
	font-size: 13px;
	letter-spacing: .3px;
	cursor: pointer;
	box-shadow: 0 -3px 14px rgba(255, 0, 110, .45);
	animation: fbPulse 2.4s ease-in-out infinite;
}

.fb-toggle:hover { filter: brightness(1.1); }
.fb-toggle .fb-toggle-icon { display: inline-block; transition: transform .25s ease; }
.fb-root.fb-collapsed .fb-toggle .fb-toggle-icon { transform: rotate(180deg); }

@keyframes fbPulse {
	0%, 100% { box-shadow: 0 -3px 14px rgba(255, 0, 110, .45); }
	50%      { box-shadow: 0 -3px 22px rgba(139, 92, 246, .65); }
}

/* body = viewport with horizontal slider */
.fb-body {
	pointer-events: auto;
	position: relative;
	background: rgba(0, 0, 0, .95);
	border: 1px solid rgba(255, 255, 255, .08);
	border-bottom: none;
	border-radius: 14px 14px 0 0;
	box-shadow: 0 -8px 30px rgba(0, 0, 0, .55);
	overflow: hidden;
	backdrop-filter: blur(8px);
}

.fb-track {
	display: flex;
	transition: transform .5s cubic-bezier(.4, 0, .2, 1);
	will-change: transform;
}

.fb-slide {
	flex: 0 0 100%;
	min-width: 0;
	display: block;
}

.fb-slide a {
	display: block;
	line-height: 0; /* kill inline gap under img */
}

.fb-slide img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 180px;
	object-fit: contain;
	background: #000;
}

/* pagination dots */
.fb-dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 6px;
	display: flex;
	justify-content: center;
	gap: 6px;
	pointer-events: none;
}

.fb-dot {
	pointer-events: auto;
	width: 8px;
	height: 8px;
	padding: 0;
	border: none;
	border-radius: 50%;
	background: rgba(255, 255, 255, .35);
	cursor: pointer;
	transition: background .2s ease, transform .2s ease;
}
.fb-dot:hover { background: rgba(255, 255, 255, .6); }
.fb-dot[aria-current="true"] { background: #ff006e; transform: scale(1.25); }

/* reduce motion */
@media (prefers-reduced-motion: reduce) {
	.fb-root, .fb-track, .fb-toggle { transition: none !important; animation: none !important; }
}

/* mobile tweaks */
@media (max-width: 600px) {
	.fb-root { width: calc(100% - 12px); }
	.fb-slide img { max-height: 130px; }
	.fb-toggle { font-size: 12px; padding: 0 10px; }
}

/* ------------------------------------------------------------
 * Conflict avoidance with the sticky mobile Table of Contents
 * (.mobile-toc-bar, also fixed to the viewport bottom).
 * On mobile, if the page contains that bar, lift the banner
 * above it so the toggle tab stays tappable.
 * ------------------------------------------------------------ */
@media (max-width: 991px) {
	body:has(.mobile-toc-bar) .fb-root {
		bottom: 64px;
	}
}
