/**
 * MR Stiff Product Manual Tab — Product USP front-end / widget styles.
 *
 * Four stacked sections: USP rows, Feature rows, Highlight and Description.
 * Each USP/Feature row holds an optional left and right icon + title pair.
 */

.mspmt-usp {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

/* ---- USP / Feature rows ------------------------------------------------ */

.mspmt-usp__list {
	display: flex;
	flex-direction: column;
	row-gap: 14px;
}

.mspmt-usp__row {
	display: flex;
	flex-wrap: wrap;
	column-gap: 32px;
	row-gap: 10px;
}

.mspmt-usp__cell {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1 1 0;
	min-width: 0;
}

.mspmt-usp__icon {
	flex: 0 0 auto;
	width: 22px;
	height: 22px;
	object-fit: contain;
}

.mspmt-usp__label {
	font-weight: 600;
	line-height: 1.3;
}

/* ---- Feature rows (single cell, optional drawer trigger) --------------- */

.mspmt-usp__feature {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	color: inherit;
	font: inherit;
	text-align: left;
}

button.mspmt-usp__feature--drawer {
	cursor: pointer;
}

button.mspmt-usp__feature--drawer:hover .mspmt-usp__label,
button.mspmt-usp__feature--drawer:focus .mspmt-usp__label {
	text-decoration: underline;
}

/* ---- Slide-in drawer --------------------------------------------------- */

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

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

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

/*
 * Close indicator that follows the pointer over the dimmed overlay (outside the
 * drawer). Purely visual — pointer-events are off, and a click on the overlay
 * itself closes the drawer.
 */
.mspmt-usp-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-usp-drawer__cursor.is-visible {
	opacity: 1;
}

.mspmt-usp-drawer__cursor::before,
.mspmt-usp-drawer__cursor::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 2px;
	background: #1a1a1a;
}

.mspmt-usp-drawer__cursor::before {
	transform: translate( -50%, -50% ) rotate( 45deg );
}

.mspmt-usp-drawer__cursor::after {
	transform: translate( -50%, -50% ) rotate( -45deg );
}

.mspmt-usp-drawer__panel {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	width: min( 420px, 90vw );
	padding: 28px 24px;
	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-usp-drawer.is-open .mspmt-usp-drawer__panel {
	transform: translateX( 0 );
}

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

.mspmt-usp-drawer__title {
	margin: 0 0 14px;
	padding-right: 32px;
	font-size: 1.4em;
	font-weight: 700;
}

.mspmt-usp-drawer__content {
	line-height: 1.6;
}

/* ---- Highlight --------------------------------------------------------- */

.mspmt-usp__highlight {
	display: flex;
	align-items: center;
	gap: 10px;
}

.mspmt-usp__highlight-img {
	flex: 0 0 auto;
	width: 28px;
	height: auto;
	object-fit: contain;
}

.mspmt-usp__highlight-title {
	font-weight: 700;
}

/* ---- Description ------------------------------------------------------- */

.mspmt-usp__description {
	line-height: 1.6;
}

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

.mspmt-usp__description > :last-child {
	margin-bottom: 0;
}

/* ---- Editor empty state ------------------------------------------------ */

.mspmt-usp--empty {
	padding: 20px;
	color: #767676;
	background: #f7f7f7;
	border: 1px dashed #c3c4c7;
	border-radius: 4px;
	text-align: center;
}

/* ---- Responsive -------------------------------------------------------- */

@media ( max-width: 600px ) {
	.mspmt-usp__row {
		flex-direction: column;
		column-gap: 0;
	}

	.mspmt-usp__cell {
		flex: 1 1 100%;
	}
}
