/**
 * MayPhat - Customer Testimonials Widget Styles
 * Matches exact mockup design with 3 cards layout, star rating & attached products.
 */

/* Wrapper & Header */
.mp-testimonials-wrapper {
	--mp-testi-star-color: #f59e0b;
	--mp-testi-card-bg: #ffffff;
	--mp-testi-card-border: #e5e7eb;
	--mp-testi-card-radius: 12px;
	--mp-testi-text-color: #374151;
	--mp-testi-name-color: #1f2937;
	--mp-testi-product-bg: #f9fafb;

	width: 100%;
	margin-bottom: 24px;
	padding: 0 18px;
}

.mp-testimonials-header {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	margin-bottom: 16px;
	width: 100%;
	gap: 16px;
}

.mp-testimonials-header__title {
	font-size: 17px;
	font-weight: 700;
	text-transform: uppercase;
	color: #111827;
	margin: 0;
	padding: 0;
	line-height: 1.3;
	letter-spacing: 0.02em;
	display: flex;
	align-items: center;
}

.mp-testimonials-header__readmore {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: flex-end;
	gap: 6px;
	font-size: 13.5px;
	font-weight: 600;
	color: #d97706;
	text-decoration: none;
	margin-left: auto !important;
	white-space: nowrap !important;
	flex-shrink: 0;
	transition: color 0.2s ease, transform 0.2s ease;
}

.mp-testimonials-header__readmore:hover {
	color: #b45309;
	text-decoration: none;
}

.mp-testimonials-header__readmore svg {
	width: 16px;
	height: 16px;
	transition: transform 0.2s ease;
}

.mp-testimonials-header__readmore:hover svg {
	transform: translateX(3px);
}

/* Grid Layout */
.mp-testimonials-grid {
	display: grid;
	grid-template-columns: repeat(var(--mp-cols-desktop, 3), minmax(0, 1fr));
	gap: 16px;
}

/* Testimonial Card */
.mp-testimonial-card {
	background-color: var(--mp-testi-card-bg);
	border: 1px solid var(--mp-testi-card-border);
	border-radius: var(--mp-testi-card-radius);
	padding: 16px 18px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-width: 0;
	width: 100%;
	box-sizing: border-box;
	transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.mp-testimonial-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
	border-color: #d1d5db;
}

/* Card Header: Profile + Rating */
.mp-testimonial-card__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 12px;
	gap: 10px;
}

.mp-testimonial-card__profile {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 1;
}

.mp-testimonial-card__avatar {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	object-fit: cover;
	flex-shrink: 0;
	background-color: #f3f4f6;
	border: 1px solid #f3f4f6;
}

.mp-testimonial-card__avatar-placeholder {
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background-color: #e5e7eb;
	color: #4b5563;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 16px;
	flex-shrink: 0;
}

.mp-testimonial-card__name {
	font-size: 14px;
	font-weight: 700;
	color: var(--mp-testi-name-color);
	line-height: 1.35;
	margin: 0;
	white-space: normal;
	word-break: break-word;
	overflow-wrap: break-word;
}

.mp-testimonial-card__rating {
	display: flex;
	align-items: center;
	gap: 2px;
	color: var(--mp-testi-star-color);
	flex-shrink: 0;
}

.mp-testimonial-card__star {
	width: 15px;
	height: 15px;
	fill: currentColor;
}

.mp-testimonial-card__star--empty {
	color: #e5e7eb;
	fill: currentColor;
}

/* Card Body: Comment Text */
.mp-testimonial-card__body {
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--mp-testi-text-color);
	margin-bottom: 14px;
	flex-grow: 1;
}

.mp-testimonial-card__text {
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Card Footer: Attached Product Badge */
.mp-testimonial-card__product {
	display: flex;
	align-items: center;
	gap: 12px;
	background-color: var(--mp-testi-product-bg);
	border-radius: 8px;
	padding: 8px 12px;
	text-decoration: none;
	transition: background-color 0.2s ease;
	border: 1px solid #f3f4f6;
}

a.mp-testimonial-card__product:hover {
	background-color: #f3f4f6;
	text-decoration: none;
}

.mp-testimonial-card__product-img {
	width: 44px;
	height: 44px;
	border-radius: 6px;
	object-fit: cover;
	flex-shrink: 0;
	background-color: #ffffff;
	border: 1px solid #eaede9;
}

.mp-testimonial-card__product-title {
	font-size: 13px;
	font-weight: 600;
	color: #1f2937;
	line-height: 1.3;
	margin: 0;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Mobile & Tablet Responsive */
@media (max-width: 991px) {
	.mp-testimonials-grid {
		grid-template-columns: repeat(var(--mp-cols-tablet, 2), minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.mp-testimonials-grid {
		grid-template-columns: repeat(var(--mp-cols-mobile, 1), minmax(0, 1fr));
	}

	.mp-testimonials-grid.mp-testimonials-grid--scroll {
		display: flex;
		overflow-x: auto;
		scroll-snap-type: x mandatory;
		padding-bottom: 8px;
		-webkit-overflow-scrolling: touch;
		gap: 12px;
	}

	.mp-testimonials-grid.mp-testimonials-grid--scroll .mp-testimonial-card {
		min-width: 85%;
		scroll-snap-align: start;
		flex-shrink: 0;
	}
}