/* BlueWave Pill Row — scoped under .bw-pills-row */
.bw-pills-row {
	--bw-pills-fade-color: #023c5a;
	--bw-pills-fade-width: 80px;
	position: relative;
	display: flex;
	align-items: center;
	gap: 28px;
	flex-wrap: wrap;
	width: 100%;
}

.bw-pills-row.bw-pills--title-above {
	display: block;
	width: 100%;
}
.bw-pills-row.bw-pills--title-above .bw-pills__title {
	display: block;
	margin-bottom: 18px;
	text-align: center; /* default: centered when above the pills */
	width: 100%;
}
.bw-pills-row.bw-pills--title-above .bw-pills-wrap {
	width: 100%;
	flex: 1 1 100%;
}

.bw-pills__title {
	flex: 0 0 auto;
	font-size: 16px;
	font-weight: 700;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #f2ebdc;
	line-height: 1.2;
	text-align: center; /* default: centered. Override via Elementor "Title alignment" control. */
}

/* Container that holds the pill row (and acts as the overflow viewport). */
.bw-pills-wrap {
	flex: 1 1 auto;
	min-width: 0;        /* allow shrink in flex parent */
	position: relative;
	overflow: hidden;
}

/* The pill flex row */
.bw-pills {
	display: flex;
	align-items: center;
	gap: 30px;
	flex-wrap: wrap;
	justify-content: center;
	min-width: 0;
}

/* Pill itself */
.bw-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex: 0 0 auto;
	white-space: nowrap;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	color: #023c5a;
	background: #f2ebdc;
	border: 2px solid #f2ebdc;
	padding: 10px 18px;
	border-radius: 999px;
	text-decoration: none;
	transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.bw-pill:hover {
	background: transparent;
	color: #f2ebdc;
	border: 2px solid #f2ebdc;
	transform: translateY(-1px);
}
.bw-pill:hover::before {
	background: #f2ebdc;
}

/* Dot indicator before label (toggle via show_dot control) */
.bw-pills--dot-yes .bw-pill::before {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 999px;
	background: #023c5a;
	flex: 0 0 8px;
}

/* ----------------------------------------------------------------------------
 * MODE: Scroll — single line, horizontal scroll, right-edge fade indicator
 * -------------------------------------------------------------------------- */
.bw-pills--mode-scroll .bw-pills {
	flex-wrap: nowrap;
	justify-content: flex-start;
	overflow-x: auto;
	scroll-behavior: smooth;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none; /* Firefox */
	padding-bottom: 2px;   /* space for momentum scroll on touch */
}
.bw-pills--mode-scroll .bw-pills::-webkit-scrollbar { display: none; }

/* Right-edge fade — fades out the last pill when there is more content
   beyond the visible viewport. JS toggles .bw-pills-wrap--overflow when needed.
   The fade hides itself once the user has scrolled all the way to the end. */
.bw-pills--mode-scroll .bw-pills-wrap::after,
.bw-pills--mode-marquee .bw-pills-wrap::after {
	content: "";
	position: absolute;
	top: 0;
	right: 0;
	width: var(--bw-pills-fade-width, 80px);
	height: 100%;
	background: linear-gradient(to right, rgba(0,0,0,0) 0%, var(--bw-pills-fade-color) 100%);
	pointer-events: none;
	opacity: 0;
	transition: opacity .25s ease;
	z-index: 2;
}
/* Left-edge fade (only when scrolled away from the start) */
.bw-pills--mode-scroll .bw-pills-wrap::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: var(--bw-pills-fade-width, 80px);
	height: 100%;
	background: linear-gradient(to left, rgba(0,0,0,0) 0%, var(--bw-pills-fade-color) 100%);
	pointer-events: none;
	opacity: 0;
	transition: opacity .25s ease;
	z-index: 2;
}

.bw-pills-wrap.bw-pills-wrap--overflow.bw-pills-wrap--not-end::after { opacity: 1; }
.bw-pills-wrap.bw-pills-wrap--overflow.bw-pills-wrap--not-start::before { opacity: 1; }

/* ----------------------------------------------------------------------------
 * MODE: Marquee — single line, auto-scrolling, seamless loop
 * Markup duplicates the pill set; track is twice as wide and animates -50%.
 * -------------------------------------------------------------------------- */
.bw-pills--mode-marquee .bw-pills-wrap { overflow: hidden; }
.bw-pills--mode-marquee .bw-pills__track {
	display: flex;
	flex-wrap: nowrap;
	gap: 30px;
	width: max-content;
	animation: bw-pills-scroll 40s linear infinite;
}
.bw-pills--mode-marquee .bw-pills-wrap:hover .bw-pills__track,
.bw-pills--mode-marquee .bw-pills__track:focus-within {
	animation-play-state: paused;
}
.bw-pills--mode-marquee .bw-pills-wrap.bw-pills-wrap--overflow::after { opacity: 1; }

@keyframes bw-pills-scroll {
	from { transform: translateX(0); }
	to   { transform: translateX(-50%); }
}

/* If the user prefers reduced motion, freeze the marquee. */
@media (prefers-reduced-motion: reduce) {
	.bw-pills--mode-marquee .bw-pills__track { animation: none; }
}

/* ----------------------------------------------------------------------------
 * MODE: Wrap — pills wrap to multiple rows (default)
 * No special CSS needed beyond defaults — .bw-pills already has flex-wrap: wrap.
 * -------------------------------------------------------------------------- */
