/**
 * MR Stiff Product Manual Tab — Testimonial slider + drawer.
 *
 * Columns are set per breakpoint by the script (--mspmt-tm-cols); --mspmt-tm-gap
 * comes from the widget.
 */

.mspmt-tm {
	position: relative;
	--mspmt-tm-gap: 24px;
	--mspmt-tm-cols: 2;
}

.mspmt-tm__viewport {
	overflow: hidden;
}

.mspmt-tm__track {
	display: flex;
	gap: var( --mspmt-tm-gap );
	transition: transform var( --mspmt-tm-speed, 400ms ) ease;
	will-change: transform;
}

.mspmt-tm__slide {
	flex: 0 0 calc( ( 100% - ( var( --mspmt-tm-cols ) - 1 ) * var( --mspmt-tm-gap ) ) / var( --mspmt-tm-cols ) );
	box-sizing: border-box;
	min-width: 0;
}

/* ---- Card -------------------------------------------------------------- */

.mspmt-tm-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 100%;
	padding: 32px;
	text-align: left;
	background: #f4f2ee;
	border: 0;
	border-radius: 14px;
	cursor: pointer;
	font: inherit;
	color: inherit;
}

.mspmt-tm-stars {
	display: inline-flex;
	gap: 4px;
	margin-bottom: 18px;
	font-size: 18px;
	line-height: 1;
}

.mspmt-tm-star {
	color: #d9d9d9;
}

.mspmt-tm-star.is-on {
	color: #f5a623;
}

.mspmt-tm-card__text {
	margin-bottom: 22px;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.5;
	color: #1a1a1a;

	/* Keep cards even by clamping the preview text. */
	display: -webkit-box;
	-webkit-line-clamp: 5;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---- Author footer ----------------------------------------------------- */

.mspmt-tm-author {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-top: auto;
}

.mspmt-tm-author__quote {
	flex: 0 0 auto;
	font-size: 40px;
	line-height: 0.6;
	color: #cfcabf;
}

.mspmt-tm-author__img {
	flex: 0 0 auto;
}

.mspmt-tm-author__img-el {
	display: block;
	width: 42px;
	height: 42px;
	object-fit: cover;
	border-radius: 50%;
}

.mspmt-tm-author__meta {
	display: flex;
	flex-direction: column;
	line-height: 1.3;
}

.mspmt-tm-author__name {
	font-weight: 700;
	color: #1a1a1a;
}

.mspmt-tm-author__role {
	font-size: 0.9em;
	color: #8a8a8a;
}

/* ---- Arrows (revealed on hover of the section) ------------------------- */

.mspmt-tm__arrow {
	position: absolute;
	top: 50%;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin-top: -22px;
	font-size: 22px;
	line-height: 1;
	color: #222;
	cursor: pointer;
	background: #efefef;
	border: 0;
	border-radius: 50%;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.15s ease, visibility 0.15s ease;
}

.mspmt-tm:hover .mspmt-tm__arrow {
	opacity: 1;
	visibility: visible;
}

.mspmt-tm__arrow .mspmt-arrow-svg {
	display: block;
}

.mspmt-tm__arrow--prev {
	left: -10px;
}

.mspmt-tm__arrow--next {
	right: -10px;
}

.mspmt-tm__arrow[disabled] {
	opacity: 0;
	cursor: default;
}

.mspmt-tm:hover .mspmt-tm__arrow[disabled] {
	opacity: 0.35;
	visibility: visible;
}

/* ---- Dots -------------------------------------------------------------- */

.mspmt-tm__dots {
	display: flex;
	gap: 8px;
	justify-content: center;
	margin-top: 20px;
}

.mspmt-tm__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	cursor: pointer;
	background: #d0d0d0;
	border: 0;
	border-radius: 50%;
	transition: background-color 0.15s ease;
}

.mspmt-tm__dot.is-active {
	background: #333;
}

/* ---- Drawer ------------------------------------------------------------ */

.mspmt-tm-drawer {
	position: fixed;
	inset: 0;
	z-index: 99999;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.mspmt-tm-drawer.is-open {
	visibility: visible;
	opacity: 1;
	transition: opacity 0.25s ease;
}

.mspmt-tm-drawer__overlay {
	position: absolute;
	inset: 0;
	background: rgba( 0, 0, 0, 0.5 );
	/* Hide the native cursor so only the custom "+" indicator shows. */
	cursor: none;
}

.mspmt-tm-drawer__panel {
	position: absolute;
	top: 0;
	left: 0;
	/* Explicitly clear right so a theme rule can't pull the panel to the right. */
	right: auto;
	bottom: 0;
	width: min( 460px, 92vw );
	padding: 40px 30px;
	overflow-y: auto;
	background: #fff;
	box-shadow: 4px 0 24px rgba( 0, 0, 0, 0.18 );
	transform: translateX( -100% );
	transition: transform 0.28s ease;
}

.mspmt-tm-drawer.is-open .mspmt-tm-drawer__panel {
	transform: translateX( 0 );
}

.mspmt-tm-drawer__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 36px;
	height: 36px;
	font-size: 24px;
	line-height: 1;
	cursor: pointer;
	background: none;
	border: 0;
	color: #333;
}

.mspmt-tm-drawer__content {
	margin: 16px 0 24px;
	line-height: 1.6;
}

.mspmt-tm-drawer__content > :first-child {
	margin-top: 0;
}

/* Pointer-following "+" indicator over the dimmed overlay (outside drawer). */

.mspmt-tm-drawer__cursor {
	position: fixed;
	top: 0;
	left: 0;
	z-index: 100000;
	width: 54px;
	height: 54px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 2px 12px rgba( 0, 0, 0, 0.25 );
	opacity: 0;
	pointer-events: none;
	transform: translate( -50%, -50% );
	transition: opacity 0.12s ease;
}

.mspmt-tm-drawer__cursor.is-visible {
	opacity: 1;
}

.mspmt-tm-drawer__cursor::before,
.mspmt-tm-drawer__cursor::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	background: #1a1a1a;
	transform: translate( -50%, -50% );
}

.mspmt-tm-drawer__cursor::before {
	width: 20px;
	height: 2px;
}

.mspmt-tm-drawer__cursor::after {
	width: 2px;
	height: 20px;
}
