/* Minimal, theme-agnostic. Inherits type and colour from the host theme. */

.myscorm-player {
	margin: 1.5rem 0;
}

/*
 * The frame is always white, whatever the visitor's system theme.
 *
 * SCORM packages are authored for a white page. Most set a text colour and
 * no background, so the iframe element's own background shows through. Give
 * it a dark one and the course renders black text on near-black -- which is
 * what happened in 0.7.0 and earlier. Never make this respect
 * prefers-color-scheme.
 */
.myscorm-frame {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 320px;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	background: #fff;
	color-scheme: light;
}

.myscorm-status {
	display: inline-block;
	margin: 0 0 0.75rem;
	padding: 0.25rem 0.6rem;
	border-radius: 999px;
	font-size: 0.85em;
	background: rgba(0, 0, 0, 0.06);
}

.myscorm-status--passed,
.myscorm-status--completed {
	background: rgba(22, 128, 86, 0.12);
	color: #0f5c3d;
}

.myscorm-status--failed {
	background: rgba(179, 45, 46, 0.12);
	color: #8a2224;
}

.myscorm-hint {
	margin: 0.6rem 0 0;
	font-size: 0.85em;
	opacity: 0.7;
}

.myscorm-notice {
	padding: 1rem 1.2rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.03);
}

@media (prefers-color-scheme: dark) {
	/* Border only. The background stays white; see above. */
	.myscorm-frame {
		border-color: rgba(255, 255, 255, 0.14);
	}
}

.myscorm-finished {
	padding: 1.5rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.03);
}

.myscorm-finished p {
	margin: 0 0 0.5rem;
}

.myscorm-finished p:last-child {
	margin-bottom: 0;
	opacity: 0.75;
	font-size: 0.9em;
}

.myscorm-finished-title {
	font-weight: 600;
}

@media (prefers-color-scheme: dark) {
	.myscorm-finished {
		border-color: rgba(255, 255, 255, 0.14);
		background: rgba(255, 255, 255, 0.04);
	}
}

.myscorm-resume {
	padding: 1.5rem;
	border: 1px solid rgba(0, 0, 0, 0.12);
	border-radius: 6px;
	background: rgba(0, 0, 0, 0.03);
}

.myscorm-resume-title {
	margin: 0 0 1rem;
	font-weight: 600;
}

.myscorm-resume-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.6rem;
	margin: 0;
}

.myscorm-button {
	font: inherit;
	padding: 0.6rem 1.1rem;
	border: 1px solid currentColor;
	border-radius: 4px;
	background: transparent;
	color: inherit;
	cursor: pointer;
}

.myscorm-button:hover {
	opacity: 0.8;
}

.myscorm-button[disabled] {
	opacity: 0.5;
	cursor: default;
}

.myscorm-button--quiet {
	border-color: rgba(0, 0, 0, 0.2);
	opacity: 0.8;
}

@media (prefers-color-scheme: dark) {
	.myscorm-resume {
		border-color: rgba(255, 255, 255, 0.14);
		background: rgba(255, 255, 255, 0.04);
	}

	.myscorm-button--quiet {
		border-color: rgba(255, 255, 255, 0.25);
	}
}

/*
 * Listing, breadcrumb and progress styles live in css/training.css, which
 * comes from the design system and is loaded after this file. Nothing for
 * them here: two stylesheets competing for the same classes is worse than
 * either on its own.
 */
