/* Engage Widget Styles */

.engage-widget {
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 8px;
	margin: 30px 0;
	padding: 0;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.engage-widget-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: white;
	padding: 20px;
	border-radius: 8px 8px 0 0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.engage-widget-header h2 {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
}

.engage-widget-toggle {
	background: rgba(255, 255, 255, 0.2);
	border: 1px solid rgba(255, 255, 255, 0.3);
	color: white;
	padding: 8px 16px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9rem;
	transition: all 0.3s ease;
}

.engage-widget-toggle:hover {
	background: rgba(255, 255, 255, 0.3);
}

/* === THEME: MINIMAL === */
.engage-widget.theme-minimal {
	background: #ffffff;
	border: 2px solid #e0e0e0;
	border-radius: 4px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.engage-widget.theme-minimal .engage-widget-header {
	background: #ffffff;
	color: #333333;
	border-bottom: 1px solid #e0e0e0;
	padding: 16px 20px;
}

.engage-widget.theme-minimal .engage-widget-header h2 {
	font-size: 1.3rem;
	font-weight: 500;
	color: #2c3e50;
}

.engage-widget.theme-minimal .engage-widget-toggle {
	background: #f5f5f5;
	border: 1px solid #d0d0d0;
	color: #555555;
	padding: 6px 14px;
	border-radius: 3px;
}

.engage-widget.theme-minimal .engage-widget-toggle:hover {
	background: #eeeeee;
}

.engage-widget.theme-minimal .engage-tab-btn {
	background: transparent;
	border: 1px solid #d0d0d0;
	color: #555555;
	border-radius: 3px;
}

.engage-widget.theme-minimal .engage-tab-btn:hover {
	background: #f9f9f9;
}

.engage-widget.theme-minimal .engage-tab-btn.active {
	background: #2c3e50;
	color: #ffffff;
	border-color: #2c3e50;
}

.engage-widget.theme-minimal .engage-btn-primary {
	background: #2c3e50;
	color: #ffffff;
}

.engage-widget.theme-minimal .engage-btn-primary:hover {
	background: #1a252f;
}

/* === THEME: DARK === */
.engage-widget.theme-dark {
	background: #1e1e1e;
	border: 1px solid #333333;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.engage-widget.theme-dark .engage-widget-header {
	background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
	color: #e2e8f0;
	border-bottom: 1px solid #4a5568;
}

.engage-widget.theme-dark .engage-widget-header h2 {
	color: #f7fafc;
}

.engage-widget.theme-dark .engage-widget-toggle {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid rgba(255, 255, 255, 0.2);
	color: #e2e8f0;
}

.engage-widget.theme-dark .engage-widget-toggle:hover {
	background: rgba(255, 255, 255, 0.15);
}

.engage-widget.theme-dark .engage-widget-content {
	background: #2d3748;
	color: #e2e8f0;
}

.engage-widget.theme-dark .engage-tab-btn {
	background: #2d3748;
	border: 1px solid #4a5568;
	color: #cbd5e0;
}

.engage-widget.theme-dark .engage-tab-btn:hover {
	background: #3d4758;
}

.engage-widget.theme-dark .engage-tab-btn.active {
	background: #667eea;
	color: #ffffff;
	border-color: #667eea;
}

.engage-widget.theme-dark .engage-content {
	color: #e2e8f0;
}

.engage-widget.theme-dark .engage-whiteboard-input {
	background: #1a202c;
	border: 1px solid #4a5568;
	color: #e2e8f0;
}

.engage-widget.theme-dark .engage-whiteboard-input:focus {
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.2);
}

.engage-widget.theme-dark .engage-btn-primary {
	background: #667eea;
	color: #ffffff;
}

.engage-widget.theme-dark .engage-btn-primary:hover {
	background: #5568d3;
}

.engage-widget.theme-dark .engage-btn-secondary {
	background: #4a5568;
	color: #e2e8f0;
}

.engage-widget.theme-dark .engage-btn-secondary:hover {
	background: #5a6778;
}

.engage-widget.theme-dark .engage-search-form input {
	background: #1a202c;
	border: 1px solid #4a5568;
	color: #e2e8f0;
}

.engage-widget.theme-dark .engage-search-form input:focus {
	border-color: #667eea;
}

.engage-widget.theme-dark .engage-loader {
	border-color: #4a5568;
	border-top-color: #667eea;
}

.engage-widget-content {
	padding: 20px;
}

/* Tabs */
.engage-tabs {
	display: flex;
	flex-direction: column;
}

.engage-tab-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
	border-bottom: 2px solid #eee;
	padding-bottom: 10px;
}

.engage-tab-btn {
	background: #f0f0f0;
	border: 1px solid #ddd;
	color: #333;
	padding: 10px 15px;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.9rem;
	transition: all 0.3s ease;
	white-space: nowrap;
	text-decoration: none;
	display: inline-block;
}

.engage-tab-btn:hover {
	background: #e8e8e8;
}

.engage-tab-btn.active {
	background: #667eea;
	color: white;
	border-color: #667eea;
}

/* Tab Content */
.engage-tabs-content {
	position: relative;
}

.engage-tab-content {
	display: none;
	animation: fadeIn 0.3s ease;
}

.engage-tab-content.active {
	display: block;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Loading indicator */
.engage-loader {
	display: none;
	width: 20px;
	height: 20px;
	border: 3px solid #f3f3f3;
	border-top: 3px solid #667eea;
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin: 20px auto;
}

.engage-loader[style*="display: block"] {
	display: block;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}
	100% {
		transform: rotate(360deg);
	}
}

/* Content area */
.engage-content {
	min-height: 100px;
	line-height: 1.6;
	color: #333;
}

.engage-content p {
	margin: 10px 0;
}

.engage-content ul,
.engage-content ol {
	margin: 15px 0 15px 20px;
}

.engage-content li {
	margin: 8px 0;
}

/* Whiteboard */
.engage-whiteboard-input {
	width: 100%;
	min-height: 250px;
	padding: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-family: 'Courier New', monospace;
	font-size: 0.95rem;
	resize: vertical;
	line-height: 1.5;
}

.engage-whiteboard-input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.engage-whiteboard-actions {
	display: flex;
	gap: 10px;
	margin-top: 15px;
}

/* Buttons */
.engage-btn {
	padding: 10px 20px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 0.95rem;
	transition: all 0.3s ease;
	font-weight: 500;
}

.engage-btn-primary {
	background: #667eea;
	color: white;
}

.engage-btn-primary:hover {
	background: #5568d3;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.engage-btn-secondary {
	background: #e8e8e8;
	color: #333;
}

.engage-btn-secondary:hover {
	background: #d8d8d8;
}

/* Search form */
.engage-search-form {
	display: flex;
	gap: 10px;
	margin-bottom: 20px;
}

.engage-search-form input {
	flex: 1;
	padding: 10px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 0.95rem;
}

.engage-search-form input:focus {
	outline: none;
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Learning link */
.engage-learning-link {
	display: inline-block;
	margin-top: 15px;
	padding: 12px 20px;
	background: #667eea;
	color: white;
	text-decoration: none;
	border-radius: 4px;
	transition: all 0.3s ease;
}

.engage-learning-link:hover {
	background: #5568d3;
	text-decoration: none;
}

/* Responsive */
@media (max-width: 768px) {
	.engage-tab-buttons {
		flex-direction: column;
	}

	.engage-tab-btn {
		width: 100%;
		text-align: center;
	}

	.engage-widget-header {
		flex-direction: column;
		gap: 15px;
	}

	.engage-widget-header h2 {
		font-size: 1.2rem;
	}

	.engage-whiteboard-actions {
		flex-direction: column;
	}

	.engage-btn {
		width: 100%;
	}

	.engage-search-form {
		flex-direction: column;
	}
}

/* Error and success messages */
.engage-error {
	padding: 12px;
	background: #fee;
	border-left: 4px solid #c33;
	color: #c33;
	border-radius: 4px;
	margin: 10px 0;
}

.engage-success {
	padding: 12px;
	background: #efe;
	border-left: 4px solid #3c3;
	color: #3c3;
	border-radius: 4px;
	margin: 10px 0;
}
