/*
 * MyCC Print Reading (Server PDF) — subtle grey button rendered into the
 * LearnDash focus-mode header, just left of the step status + prev/next nav.
 */

.mycc-prp__focus-btn {
	display: inline-flex;
	align-items: center;
	align-self: center;
	gap: 0.4em;
	margin-right: 0.6rem;
	/* Match the .ld-status pill: 30px tall, 12px text, 6px radius. */
	height: 30px;
	padding: 0 12px;
	font-size: 12px;
	font-weight: 600;
	line-height: 1;
	box-sizing: border-box;
	/* !important: the LearnDash/BuddyBoss wrapper sets a blue link color that
	   otherwise wins on specificity. */
	color: #3a3f45 !important;
	background: #eceef1;
	border: 1px solid #dfe3e8;
	border-radius: 6px;
	text-decoration: none !important;
	white-space: nowrap;
	vertical-align: middle;
	box-shadow: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.mycc-prp__focus-btn:hover,
.mycc-prp__focus-btn:focus-visible {
	background: #e0e4e9;
	color: #23272c !important;
	text-decoration: none !important;
}

.mycc-prp__focus-btn:focus-visible {
	outline: 2px solid #b7bec7;
	outline-offset: 2px;
}

.mycc-prp__focus-btn .mycc-prp__icon {
	display: inline-flex;
	align-items: center;
}

.mycc-prp__focus-btn .mycc-prp__icon svg {
	display: block;
	width: 13px;
	height: 13px;
}

/* Loading state: hide the printer glyph, show a spinning ring. */
.mycc-prp__focus-btn.is-loading {
	pointer-events: none;
	opacity: 0.9;
	cursor: progress;
}

.mycc-prp__focus-btn.is-loading .mycc-prp__icon {
	display: none;
}

.mycc-prp__focus-btn.is-loading::before {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	border: 2px solid currentColor;
	border-top-color: transparent;
	border-radius: 50%;
	animation: mycc-prp-spin 0.6s linear infinite;
}

@keyframes mycc-prp-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.mycc-prp__focus-btn.is-loading::before {
		animation-duration: 1.6s;
	}
}

@media print {
	.mycc-prp__focus-btn,
	.no-print {
		display: none !important;
	}
}
