/**
 * Allure xAPI Connect - Player Styles
 */

/* Player Container */
.allure-scorm-player {
	position: relative;
	margin: 20px 0;
}

/* Loading State */
.allure-player-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	background: #f8f9fa;
	border-radius: 8px;
	color: #666;
}

.allure-spinner {
	width: 40px;
	height: 40px;
	border: 3px solid #e0e0e0;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: allure-spin 0.8s linear infinite;
	margin-bottom: 15px;
}

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

/* Iframe Player */
.allure-player-iframe {
	display: block;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Error State */
.allure-player-error {
	text-align: center;
	padding: 40px 20px;
	background: #fef2f2;
	border-radius: 8px;
	color: #991b1b;
}

.allure-player-error .dashicons {
	font-size: 32px;
	width: 32px;
	height: 32px;
	margin-bottom: 10px;
}

.allure-player-error p {
	margin: 0 0 15px 0;
}

/* Course Card (for lightbox/new window modes) */
.allure-course-card {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 30px;
	text-align: center;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.allure-course-title {
	margin: 0 0 15px 0;
	font-size: 1.25em;
	color: #1d2327;
}

.allure-course-status {
	display: inline-block;
	padding: 5px 12px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 20px;
}

.allure-status-completed {
	background: #d4edda;
	color: #155724;
}

.allure-status-in-progress {
	background: #fff3cd;
	color: #856404;
}

.allure-launch-btn {
	font-size: 16px !important;
	padding: 12px 30px !important;
	height: auto !important;
}

.allure-launch-btn .dashicons {
	margin-right: 5px;
	vertical-align: middle;
}

/* Login Required */
.allure-scorm-login-required {
	background: #f8f9fa;
	border-radius: 8px;
	overflow: hidden;
}

.allure-login-message {
	text-align: center;
	padding: 40px 20px;
}

.allure-login-message .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #c3c4c7;
	margin-bottom: 15px;
}

.allure-login-message h3 {
	margin: 0 0 10px 0;
	color: #1d2327;
}

.allure-login-message p {
	margin: 0 0 20px 0;
	color: #666;
}

/* Error Message */
.allure-scorm-error {
	background: #fef2f2;
	border-radius: 8px;
	overflow: hidden;
}

.allure-error-message {
	text-align: center;
	padding: 40px 20px;
	color: #991b1b;
}

.allure-error-message .dashicons {
	font-size: 32px;
	width: 32px;
	height: 32px;
	margin-bottom: 10px;
}

.allure-error-message p {
	margin: 0;
}

.allure-error-message a {
	color: #991b1b;
}

/* Lightbox Modal */
.allure-lightbox-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.85);
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.allure-lightbox-container {
	background: #fff;
	border-radius: 8px;
	width: 100%;
	max-width: 1200px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.allure-lightbox-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 15px 20px;
	background: #1d2327;
	color: #fff;
}

.allure-lightbox-title {
	font-weight: 600;
	font-size: 16px;
}

.allure-lightbox-close {
	background: none;
	border: none;
	color: #fff;
	font-size: 28px;
	cursor: pointer;
	padding: 0;
	line-height: 1;
	opacity: 0.7;
	transition: opacity 0.2s;
}

.allure-lightbox-close:hover {
	opacity: 1;
}

.allure-lightbox-content {
	flex: 1;
	position: relative;
	min-height: 400px;
	background: #f8f9fa;
}

.allure-lightbox-content .allure-player-loading {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	background: transparent;
}

.allure-lightbox-content .allure-player-iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 0;
}

/* Responsive */
@media screen and (max-width: 768px) {
	.allure-lightbox-container {
		max-height: 100vh;
		border-radius: 0;
	}

	.allure-lightbox-overlay {
		padding: 0;
	}

	.allure-course-card {
		padding: 20px;
	}
}
