/*
 * IntelQI LMS — Enterprise Learning Platform
 * Developed and maintained by Euclideum Solutions Private Limited
 *
 * This software includes components licensed under the GNU General Public License (GPL).
 * All original code, product configuration, branding, and non-GPL assets are the intellectual property of
 * Euclideum Solutions Private Limited.
 *
 * Any use, modification, or redistribution must be in accordance with the applicable open-source licenses
 * and any additional terms applicable to proprietary components.
 *
 * Copyright © 2025 Euclideum Solutions Private Limited.
 */

/* Assessment Page Styles */

.assessment-container {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: #f5f5f5;
	z-index: 1000;
}

/* Loading Indicator */
.assessment-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100vh;
	background: #ffffff;
}

.spinner {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
}

.spinner > div {
	width: 18px;
	height: 18px;
	background-color: #4F46E5;
	border-radius: 100%;
	display: inline-block;
	animation: sk-bouncedelay 1.4s infinite ease-in-out both;
}

.spinner .bounce1 {
	animation-delay: -0.32s;
}

.spinner .bounce2 {
	animation-delay: -0.16s;
}

@keyframes sk-bouncedelay {
	0%, 80%, 100% {
		transform: scale(0);
	}
	40% {
		transform: scale(1.0);
	}
}

.assessment-loading p {
	color: #6B7280;
	font-size: 16px;
	margin: 0;
}

/* Error Display */
.assessment-error {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	height: 100vh;
	text-align: center;
	padding: 20px;
	background: #ffffff;
}

.error-icon {
	font-size: 64px;
	margin-bottom: 20px;
}

.assessment-error h3 {
	color: #1F2937;
	font-size: 24px;
	margin-bottom: 12px;
	font-weight: 600;
}

.assessment-error p {
	color: #6B7280;
	font-size: 16px;
	margin-bottom: 24px;
	max-width: 500px;
}

.assessment-error .btn {
	padding: 10px 24px;
	font-size: 16px;
}

/* Challenge Toolbar */
.challenge-toolbar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 60px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	z-index: 1001;
	display: flex;
	align-items: center;
	padding: 0 20px;
}

.toolbar-content {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	max-width: 100%;
	gap: 20px;
}

.toolbar-left,
.toolbar-right {
	flex: 0 0 auto;
}

.toolbar-center {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.toolbar-title {
	color: #ffffff;
	font-size: 18px;
	font-weight: 600;
	white-space: nowrap;
}

.user-info {
	color: #ffffff;
	font-size: 14px;
	opacity: 0.9;
	white-space: nowrap;
}

.challenge-input {
	width: 100%;
	max-width: 400px;
	padding: 8px 12px;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	font-size: 14px;
	transition: all 0.3s ease;
}

.challenge-input::placeholder {
	color: rgba(255, 255, 255, 0.6);
}

.challenge-input:focus {
	outline: none;
	background: rgba(255, 255, 255, 0.25);
	border-color: rgba(255, 255, 255, 0.5);
}

.challenge-toolbar .btn {
	padding: 8px 16px;
	font-size: 14px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.challenge-toolbar .btn-primary {
	background: #ffffff;
	color: #667eea;
	font-weight: 600;
}

.challenge-toolbar .btn-primary:hover {
	background: #f0f0f0;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.challenge-toolbar .btn-secondary {
	background: rgba(255, 255, 255, 0.2);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.3);
}

.challenge-toolbar .btn-secondary:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: translateY(-1px);
}

/* Iframe Container */
.assessment-frame-container {
	width: 100%;
	height: 100vh;
	padding-top: 60px; /* Space for toolbar */
	position: relative;
	background: #ffffff;
}

#assessment-iframe {
	width: 100%;
	height: 100%;
	border: none;
	display: block;
}

/* Responsive */
@media (max-width: 768px) {
	.assessment-error h3 {
		font-size: 20px;
	}

	.assessment-error p {
		font-size: 14px;
	}

	.error-icon {
		font-size: 48px;
	}

	/* Toolbar responsive */
	.challenge-toolbar {
		height: auto;
		min-height: 60px;
		padding: 10px;
	}

	.toolbar-content {
		flex-wrap: wrap;
		gap: 10px;
	}

	.toolbar-left,
	.toolbar-right {
		flex: 0 0 100%;
		text-align: center;
	}

	.toolbar-center {
		flex: 0 0 100%;
		flex-direction: column;
	}

	.challenge-input {
		max-width: 100%;
	}

	.toolbar-center .btn {
		width: 100%;
	}

	.assessment-frame-container {
		padding-top: 140px; /* More space for wrapped toolbar */
	}
}
