/**
 * Hayat — Vendor Testimonials Slider
 * Tokens from systemdesign.md
 */

.hayat-vendor-testimonials {
	--hvt-brand: #47B369;
	--hvt-brand-hover: #368C51;
	--hvt-brand-soft: #ECF8F0;
	--hvt-success-soft: #47B36929;
	--hvt-warning: #D49E00;
	--hvt-text: #2B2B2B;
	--hvt-text-secondary: #555555;
	--hvt-text-muted: #8C8C8C;
	--hvt-border: #ECECEC;
	--hvt-surface: #FFFFFF;
	--hvt-page: #ECF8F0;
	--hvt-radius-lg: 16px;
	--hvt-radius-xl: 20px;
	--hvt-radius-pill: 999px;
	--hvt-space-2: 8px;
	--hvt-space-3: 12px;
	--hvt-space-4: 16px;
	--hvt-space-5: 20px;
	--hvt-space-6: 24px;
	--hvt-space-8: 32px;
	--hvt-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);

	direction: rtl;
	font-family: peyda, Vazirmatn, sans-serif;
	background: var(--hvt-page);
	padding: var(--hvt-space-8) 0;
	box-sizing: border-box;
	width: 100%;
	overflow: hidden;
}

.hayat-vendor-testimonials *,
.hayat-vendor-testimonials *::before,
.hayat-vendor-testimonials *::after {
	box-sizing: border-box;
}

.hayat-vendor-testimonials__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 var(--hvt-space-4);
	overflow: hidden;
}

.hayat-vendor-testimonials__slider {
	width: 100%;
	overflow: hidden;
	padding: var(--hvt-space-2) 0;
}

.hayat-vendor-testimonials__slider .swiper-wrapper {
	align-items: stretch;
}

.hayat-vendor-testimonials__slider .swiper-slide {
	height: auto;
	display: flex;
}

/* Active frame: dashed brand border + soft tint (only centered/active slide) */
.hayat-vt-frame {
	width: 100%;
	padding: var(--hvt-space-2);
	border-radius: var(--hvt-radius-xl);
	border: 1.5px dashed transparent;
	background: transparent;
	transition: border-color 0.25s ease, background-color 0.25s ease;
}

.hayat-vendor-testimonials__slider .swiper-slide-active .hayat-vt-frame {
	border-color: var(--hvt-brand);
	background-color: var(--hvt-success-soft);
}

.hayat-vendor-testimonials__slider .swiper-slide:not(.swiper-slide-active) .hayat-vt-frame {
	border-color: transparent;
	background-color: transparent;
}

.hayat-vt-card {
	display: flex;
	flex-direction: column;
	gap: var(--hvt-space-4);
	width: 100%;
	height: 100%;
	min-height: 220px;
	padding: var(--hvt-space-6);
	background: var(--hvt-surface);
	border-radius: var(--hvt-radius-lg);
	border: 1px solid var(--hvt-border);
	box-shadow: var(--hvt-shadow);
}

/* Rating — LTR order: ۴.۸ then ★★★★★ (aligned to card start / right in RTL) */
.hayat-vt-card__rating {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: var(--hvt-space-2);
	direction: ltr;
	width: 100%;
}

.hayat-vt-card__score {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.55;
	color: var(--hvt-text);
	font-variant-numeric: tabular-nums;
}

.hayat-vt-card__stars {
	--hvt-star-size: 18px;
	--hvt-star-active: #FFB400;
	--hvt-star-inactive: #D9D9D9;
	display: inline-flex;
	align-items: center;
	flex-direction: row;
	gap: 2px;
	direction: ltr;
}

.hayat-vt-card__star {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: var(--hvt-star-inactive);
	line-height: 0;
}

.hayat-vt-card__star.is-active {
	color: var(--hvt-star-active);
}

.hayat-vt-card__star.is-inactive {
	color: var(--hvt-star-inactive);
}

.hayat-vt-card__stars svg {
	width: var(--hvt-star-size);
	height: var(--hvt-star-size);
	display: block;
	flex-shrink: 0;
}

/* Quote */
.hayat-vt-card__quote {
	flex: 1;
	margin: 0;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.75;
	color: var(--hvt-text);
	text-align: right;
}

/* Footer */
.hayat-vt-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--hvt-space-3);
	margin-top: auto;
	flex-wrap: nowrap;
}

.hayat-vt-card__author {
	display: flex;
	align-items: center;
	gap: var(--hvt-space-3);
	min-width: 0;
}

.hayat-vt-card__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	overflow: hidden;
	flex-shrink: 0;
	border: 2px solid var(--hvt-brand);
	background: var(--hvt-brand-soft);
}

.hayat-vt-card__avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.hayat-vt-card__meta {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
	text-align: right;
}

.hayat-vt-card__name {
	margin: 0;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
	color: var(--hvt-text);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.hayat-vt-card__store {
	margin: 0;
	font-size: 12px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--hvt-text-muted);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Sales badge — LTR order: فروش  +۹۵٪  ↗ */
.hayat-vt-card__badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	flex-shrink: 0;
	padding: 6px 12px;
	border-radius: 8px;
	background: linear-gradient(90deg, var(--hvt-brand) 0%, var(--hvt-brand-hover) 100%);
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.5;
	white-space: nowrap;
	font-variant-numeric: tabular-nums;
	direction: ltr;
}

.hayat-vt-card__badge-label,
.hayat-vt-card__badge-value {
	display: inline-block;
}

.hayat-vt-card__badge-icon,
.hayat-vt-card__badge svg {
	width: 15px;
	height: 15px;
	display: block;
	flex-shrink: 0;
}

/* Navigation — LTR so left=primary/< and right=secondary/> match design */
.hayat-vendor-testimonials__nav {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: var(--hvt-space-3);
	margin-top: var(--hvt-space-6);
	direction: ltr;
}

.hayat-vendor-testimonials__btn {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 1px solid var(--hvt-border);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
	box-shadow: var(--hvt-shadow);
	background: var(--hvt-surface);
	color: var(--hvt-text-secondary);
}

.hayat-vendor-testimonials__btn svg {
	width: 18px;
	height: 18px;
	display: block;
}

.hayat-vendor-testimonials__btn:hover {
	border-color: var(--hvt-brand);
	color: var(--hvt-brand);
}

.hayat-vendor-testimonials__btn:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(71, 179, 105, 0.35);
}

.hayat-vendor-testimonials__btn.is-active {
	background: var(--hvt-brand);
	border-color: var(--hvt-brand);
	color: #fff;
}

.hayat-vendor-testimonials__btn.is-active:hover {
	background: var(--hvt-brand-hover);
	border-color: var(--hvt-brand-hover);
	color: #fff;
}

.hayat-vendor-testimonials__btn.is-inactive {
	background: var(--hvt-surface);
	border-color: var(--hvt-border);
	color: var(--hvt-text-secondary);
}

.hayat-vendor-testimonials__btn:disabled,
.hayat-vendor-testimonials__btn.swiper-button-disabled {
	opacity: 0.4;
	cursor: not-allowed;
	pointer-events: none;
}

/* Empty */
.hayat-vendor-testimonials__empty {
	text-align: center;
	padding: var(--hvt-space-8) var(--hvt-space-4);
	color: var(--hvt-text-secondary);
	font-size: 14px;
	line-height: 1.7;
}

/* Responsive */
@media (max-width: 1023px) {
	.hayat-vt-card {
		min-height: 200px;
		padding: var(--hvt-space-5);
	}

	.hayat-vt-card__quote {
		font-size: 14px;
		line-height: 1.7;
	}
}

@media (max-width: 767px) {
	.hayat-vendor-testimonials {
		padding: var(--hvt-space-6) 0;
	}

	.hayat-vendor-testimonials__inner {
		padding: 0;
		overflow: visible;
	}

	.hayat-vendor-testimonials__slider {
		overflow: hidden;
		padding: var(--hvt-space-2) 0;
	}

	.hayat-vt-frame {
		padding: 6px;
	}

	.hayat-vt-card {
		min-height: 0;
		gap: var(--hvt-space-3);
		padding: 18px 16px;
	}

	.hayat-vt-card__score {
		font-size: 15px;
	}

	.hayat-vt-card__quote {
		font-size: 14px;
		line-height: 1.75;
	}

	.hayat-vt-card__footer {
		gap: var(--hvt-space-2);
		align-items: center;
	}

	.hayat-vt-card__author {
		gap: 10px;
		flex: 1;
		min-width: 0;
	}

	.hayat-vt-card__avatar {
		width: 40px;
		height: 40px;
	}

	/* Mobile: badge shows only percentage + icon */
	.hayat-vt-card__badge {
		padding: 6px 10px;
		gap: 4px;
	}

	.hayat-vt-card__badge-label {
		display: none;
	}

	.hayat-vendor-testimonials__nav {
		margin-top: var(--hvt-space-5);
	}
}
