:root {
	--mscx-flow-ink: #0A192F;
	--mscx-flow-brand: #1D8CF8;
	--mscx-flow-soft: #F7FAFF;
	--mscx-flow-border: #D8E7F7;
}

.mscx-header-action {
	position: relative !important;
}

.mscx-header-count {
	position: absolute;
	inset-block-start: -7px;
	inset-inline-end: -8px;
	display: grid;
	place-items: center;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border: 2px solid #fff;
	border-radius: 999px;
	background: var(--mscx-flow-brand);
	color: #fff;
	font-family: 'IBM Plex Sans Arabic', sans-serif;
	font-size: 10px;
	font-weight: 800;
	line-height: 1;
	box-shadow: 0 3px 9px rgba(29, 140, 248, .25);
}

.mscx-certificate-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 50px;
	margin: 10px 0 4px;
	border: 1px solid #B8E0C7;
	border-radius: 12px;
	background: #F0FBF4;
	color: #176B3A;
	font-weight: 800;
	transition: transform .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.mscx-certificate-button:hover,
.mscx-certificate-button:focus-visible {
	background: #176B3A;
	color: #fff;
	box-shadow: 0 10px 24px rgba(23, 107, 58, .15);
	transform: translateY(-2px);
}

.mscx-related-cart-action {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}

.mscx-related-cart-action .tutor-native-add-to-cart,
.mscx-related-cart-action .tutor-native-view-cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 40px;
	padding: 7px 12px;
	border: 1px solid var(--mscx-flow-brand);
	border-radius: 9px;
	background: var(--mscx-flow-brand);
	color: #fff;
	font-size: 12px;
	font-weight: 800;
}

.mscx-related-cart-action a:hover,
.mscx-related-cart-action button:hover {
	background: var(--mscx-flow-ink);
	border-color: var(--mscx-flow-ink);
	color: #fff;
}

/* Tutor completion and review dialogs */
.tutor-modal.mscx-dialog-enhanced .tutor-modal-root,
.tutor-modal.mscx-dialog-enhanced .tutor-modal-window,
.tutor-modal.mscx-dialog-enhanced .tutor-modal-content {
	border-radius: 18px !important;
}

.tutor-modal.mscx-dialog-enhanced .tutor-modal-content {
	overflow: hidden;
	border: 1px solid var(--mscx-flow-border);
	box-shadow: 0 28px 80px rgba(10, 25, 47, .2);
}

.tutor-modal.mscx-dialog-enhanced .tutor-modal-header,
.tutor-modal.mscx-dialog-enhanced .tutor-modal-body,
.tutor-modal.mscx-dialog-enhanced .tutor-modal-footer {
	padding-inline: 24px !important;
}

.tutor-modal.mscx-dialog-enhanced .tutor-modal-header {
	padding-block: 24px 14px !important;
	background: linear-gradient(180deg, #F7FAFF, #fff);
	text-align: right;
}

.tutor-modal.mscx-dialog-enhanced .tutor-modal-title {
	color: var(--mscx-flow-ink);
	font-family: 'Noto Kufi Arabic', 'IBM Plex Sans Arabic', sans-serif;
	font-size: 21px;
	font-weight: 800;
}

.tutor-modal.mscx-dialog-enhanced textarea,
.tutor-modal.mscx-dialog-enhanced input {
	border-color: var(--mscx-flow-border) !important;
	border-radius: 10px !important;
	background: #FBFDFF !important;
}

.tutor-modal.mscx-dialog-enhanced .tutor-btn {
	min-height: 44px;
	border-radius: 10px !important;
	font-weight: 800;
}

.mscx-progress-warning {
	display: flex;
	align-items: flex-start;
	gap: 9px;
	margin: 10px 0;
	padding: 11px 13px;
	border: 1px solid #F2D79A;
	border-radius: 10px;
	background: #FFF9E8;
	color: #725616;
	font-size: 12px;
	line-height: 1.7;
}

@media (max-width: 767px) {
	.mscx-header-count { inset-block-start: -5px; inset-inline-end: -6px; }
	.tutor-modal.mscx-dialog-enhanced .tutor-modal-header,
	.tutor-modal.mscx-dialog-enhanced .tutor-modal-body,
	.tutor-modal.mscx-dialog-enhanced .tutor-modal-footer { padding-inline: 16px !important; }
}

@media (prefers-reduced-motion: reduce) {
	.mscx-certificate-button,
	.mscx-related-cart-action * { transition: none !important; }
}
