/**
 * Wallex Feature Benefits Slider – CSS
 * Compatible with light/dark theme variables from token-style.css
 */

:root {
	--wallex-fbs-gap: 16px;
	--wallex-fbs-duration: 25s;
}

.wallex-fbs {
	width: 100%;
	position: relative;
	overflow: hidden;
	box-sizing: border-box;
	direction: rtl;
}

.wallex-fbs * {
	box-sizing: border-box;
}

/* Viewport, Tracks & Groups */
.wallex-fbs__viewport {
	width: 100%;
	overflow: hidden;
	position: relative;
	direction: ltr;
	/* Keeps keyframe coordinates consistent in all browsers */
	mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
	-webkit-mask-image: linear-gradient(to right, transparent 0%, #000 4%, #000 96%, transparent 100%);
}

.wallex-fbs__track {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	width: max-content;
	will-change: transform;
	padding-bottom: 15px;
}

.wallex-fbs__group {
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	gap: var(--wallex-fbs-gap, 16px);
	padding-inline-end: var(--wallex-fbs-gap, 16px);
	flex-shrink: 0;
}

/* Base Card Style */
.wallex-fbs__card {
	background-color: var(--color-bg-2, #fbfbfc);
	border: 1px solid var(--color-stroke-2, rgba(0, 0, 0, 0.05));
	border-radius: var(--cornerRadiusXL, 16px);
	text-decoration: none !important;
	color: inherit;
	transition: border-color 0.25s ease, box-shadow 0.25s ease, transform 0.25s ease;
	flex-shrink: 0;
	cursor: pointer;
	direction: rtl;
}

.wallex-fbs__card:hover {
	box-shadow: 0 1px 8px 0 var(--color-Hover), 0 3px 16px 0 var(--color-Hover);
}

/* Image Wrappers */
.wallex-fbs__image-wrap {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.wallex-fbs__image {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
}

.wallex-fbs__image-placeholder {
	width: 48px;
	height: 48px;
}

/* Text Content */
.wallex-fbs__title {
	color: var(--color-text-1, #252525);
	font-family: inherit;
	margin: 0;
}

.wallex-fbs__desc {
	color: var(--color-text-2, rgba(0, 0, 0, 0.6));
	font-family: inherit;
	margin: 0;
}

/* -------------------------------------------------------------------------- */
/* Keyframe Animations                                                        */
/* -------------------------------------------------------------------------- */

@keyframes wallex-fbs-scroll-left {
	0% {
		transform: translate3d(0, 0, 0);
	}

	100% {
		transform: translate3d(-50%, 0, 0);
	}
}

@keyframes wallex-fbs-scroll-right {
	0% {
		transform: translate3d(-50%, 0, 0);
	}

	100% {
		transform: translate3d(0, 0, 0);
	}
}

/* Pause on Hover */
.wallex-fbs--pause-hover:hover .wallex-fbs__track,
.wallex-fbs__track.is-paused {
	animation-play-state: paused !important;
}

/* Animation Binding: Desktop Track & Mobile Tracks */
.wallex-fbs--dir-rtl .wallex-fbs__track--primary,
.wallex-fbs--dir-rtl .wallex-fbs__track--row1 {
	animation: wallex-fbs-scroll-left var(--wallex-fbs-duration, 25s) linear infinite;
}

.wallex-fbs--dir-rtl .wallex-fbs__track--row2 {
	animation: wallex-fbs-scroll-right var(--wallex-fbs-duration, 25s) linear infinite;
}

.wallex-fbs--dir-ltr .wallex-fbs__track--primary,
.wallex-fbs--dir-ltr .wallex-fbs__track--row1 {
	animation: wallex-fbs-scroll-right var(--wallex-fbs-duration, 25s) linear infinite;
}

.wallex-fbs--dir-ltr .wallex-fbs__track--row2 {
	animation: wallex-fbs-scroll-left var(--wallex-fbs-duration, 25s) linear infinite;
}


/* -------------------------------------------------------------------------- */
/* Desktop View (screens >= 768px)                                           */
/* -------------------------------------------------------------------------- */

@media (min-width: 768px) {
	.wallex-fbs__mobile-view {
		display: none !important;
	}

	.wallex-fbs__desktop-view {
		display: block;
	}

	.wallex-fbs__card--desktop {
		width: 240px;
		height: 240px;
		padding: 20px 16px;
		display: flex;
		flex-direction: column;
		justify-content: space-between;
		text-align: right;
	}

	.wallex-fbs__card--desktop .wallex-fbs__image-wrap {
		width: 105px;
		height: 105px;
		margin-bottom: 12px;
		object-fit: cover;
	}

	.wallex-fbs__card--desktop .wallex-fbs__content {
		display: flex;
		flex-direction: column;
		gap: 4px;
	}

	.wallex-fbs__card--desktop .wallex-fbs__title {
		font-size: var(--body-large-size, 16px);
		line-height: var(--body-large-line-height, 28px);
		font-weight: var(--body-large-strong-weight, 700);
	}

	.wallex-fbs__card--desktop .wallex-fbs__desc {
		font-size: var(--caption-size, 12px);
		line-height: var(--caption-line-height, 20px);
		font-weight: var(--caption-regular-weight, 400);
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
}


/* -------------------------------------------------------------------------- */
/* Mobile View (screens < 768px)                                              */
/* -------------------------------------------------------------------------- */

@media (max-width: 767px) {
	.wallex-fbs__desktop-view {
		display: none !important;
	}

	.wallex-fbs__mobile-view {
		display: flex;
		flex-direction: column;
		gap: var(--wallex-fbs-gap, 16px);
	}

	.wallex-fbs__card--mobile {
		width: 324px;
		height: 92px;
		padding: 12px 16px;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		text-align: right;
	}

	.wallex-fbs__card--mobile .wallex-fbs__image-wrap {
		width: 64px;
		height: 64px;
		flex-shrink: 0;
	}

	.wallex-fbs__card--mobile .wallex-fbs__content {
		flex: 1;
		display: flex;
		flex-direction: column;
		justify-content: center;
		gap: 4px;
		overflow: hidden;
	}

	.wallex-fbs__card--mobile .wallex-fbs__title {
		font-size: var(--body-size, 14px);
		line-height: var(--body-line-height, 24px);
		font-weight: var(--body-strong-weight, 700);
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.wallex-fbs__card--mobile .wallex-fbs__desc {
		font-size: var(--caption-size, 12px);
		line-height: var(--caption-line-height, 20px);
		font-weight: var(--caption-regular-weight, 400);
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
		overflow: hidden;
	}
}