/* =====================================================
   Baijia Testimonials Carousel Widget
   ===================================================== */

/* ── Header (title + arrows) ── */
.bjts-header {
	display: flex;
	align-items: center;
	gap: 16px;
	margin-bottom: 28px;
	flex-wrap: wrap;
}

.bjts-section-title {
	margin: 0;
	flex: 1 1 auto;   /* flex-shrink:1 — allows title to shrink/wrap */
	min-width: 0;     /* allows shrinking below natural content size */
	word-break: break-word;
	font-size: 28px;
	font-weight: 700;
	line-height: 1.3;
	color: #111111;
}

/* ── Navigation arrows ── */
.bjts-nav {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-shrink: 0;
}

.bjts-prev,
.bjts-next {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	border: 1px solid #dddddd;
	background: #ffffff;
	color: #555555;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease, opacity 0.2s ease;
	-webkit-appearance: none;
	appearance: none;
	flex-shrink: 0;
}

.bjts-prev svg,
.bjts-next svg {
	width: 16px;
	height: 16px;
	display: block;
}

.bjts-prev:hover:not(:disabled),
.bjts-next:hover:not(:disabled) {
	border-color: #8b5cf6;
	color: #8b5cf6;
}

.bjts-prev:disabled,
.bjts-next:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

/* ── Slider viewport ── */
.bjts-slider-wrap {
	overflow: hidden;
	width: 100%;
}

/* ── Track ── */
.bjts-track {
	display: flex;
	align-items: stretch;
	transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
	will-change: transform;
	/* gap and card widths set by JS */
}

/* ── Card ── */
.bjts-card {
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #e8e8e8;
	border-radius: 10px;
	padding: 28px;
	box-sizing: border-box;
	flex-shrink: 0;
	/* width set by JS */
}

/* ── Quote icon ── */
.bjts-quote-icon {
	font-size: 52px;
	line-height: 1;
	color: #f0b429;
	font-family: Georgia, "Times New Roman", serif;
	margin-bottom: 16px;
	height: 44px;
	overflow: hidden;
}

/* ── Review text ── */
.bjts-review-text {
	font-size: 14px;
	line-height: 1.75;
	color: #333333;
	flex: 1;
	margin-bottom: 24px;
}

/* ── Author row ── */
.bjts-author {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-top: auto;
	padding-top: 20px;
	border-top: 1px solid #f0f0f0;
}

/* ── Avatar ── */
.bjts-avatar {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	flex-shrink: 0;
}

.bjts-avatar-placeholder {
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: #e8e8e8;
	color: #888888;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 20px;
	font-weight: 600;
	flex-shrink: 0;
}

/* ── Author info ── */
.bjts-author-info {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.bjts-name {
	font-size: 14px;
	font-weight: 600;
	color: #111111;
	line-height: 1.4;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.bjts-author-title {
	font-size: 12px;
	color: #888888;
	line-height: 1.4;
	display: block;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* ══════════════════════════════════════════
   Mobile — use widget class for same specificity
   as Elementor dynamic CSS + !important
   ══════════════════════════════════════════ */
@media (max-width: 767px) {
	/* Header: title takes full first row, nav wraps to second row */
	.elementor-widget-baijia-testimonials .bjts-header,
	.bjts-header {
		flex-wrap: wrap !important;
		align-items: flex-start !important;
		gap: 10px 0 !important;
	}

	.elementor-widget-baijia-testimonials .bjts-section-title,
	.bjts-section-title {
		flex: 1 1 100% !important; /* full-width first row */
		font-size: 22px !important;
	}

	.elementor-widget-baijia-testimonials .bjts-nav,
	.bjts-nav {
		margin-left: auto; /* push nav to the right on second row */
	}

	.bjts-card {
		padding: 20px;
	}

	.bjts-review-text {
		font-size: 13px;
	}
}
