/* Public quiz styles */
.wgr-pollmaster-quiz {
	border: 1px solid #ddd;
	padding: 20px;
	margin: 15px 0;
	border-radius: 8px;
	background: #fff;
}

.wgr-questions {
	list-style: none;
	padding: 0;
	margin: 0;
}

.wgr-question {
	margin-bottom: 20px;
	padding: 15px;
	background: #f9fafb;
	border-radius: 6px;
	border-left: 4px solid #3b82f6;
}

.wgr-question.wgr-answered {
	border-left-color: #10b981;
}

.wgr-q-text {
	display: block;
	margin-bottom: 12px;
	font-size: 1.1em;
	color: #1f2937;
}

.wgr-answers {
	margin: 10px 0;
}

.wgr-answer {
	display: block;
	padding: 8px 12px;
	margin: 4px 0;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}

.wgr-answer:hover {
	background: #f3f4f6;
	border-color: #d1d5db;
}

.wgr-answer input {
	margin-right: 8px;
}

.wgr-text-answer {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 1em;
}

.wgr-text-answer:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Status indicators */
.wgr-status {
	display: inline-block;
	margin-left: 10px;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 0.9em;
}

.wgr-status-saving {
	color: #6b7280;
}

.wgr-status-saved {
	color: #10b981;
	background: #d1fae5;
}

.wgr-status-correct {
	color: #059669;
	background: #d1fae5;
	font-weight: bold;
}

.wgr-status-incorrect {
	color: #dc2626;
	background: #fee2e2;
	font-weight: bold;
}

.wgr-status-error {
	color: #dc2626;
	background: #fee2e2;
}

/* Navigation */
.wgr-nav {
	display: flex;
	justify-content: space-between;
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #e5e7eb;
}

.wgr-nav button {
	padding: 10px 20px;
}

/* Quiz actions */
.wgr-quiz-actions {
	margin-top: 20px;
	padding-top: 15px;
	border-top: 1px solid #e5e7eb;
	text-align: center;
}

.wgr-complete-quiz {
	padding: 12px 30px !important;
	font-size: 1.1em !important;
}

/* Results */
.wgr-quiz-result {
	margin-top: 20px;
}

.wgr-result {
	padding: 25px;
	border-radius: 8px;
	text-align: center;
}

.wgr-result h3 {
	margin: 0 0 15px;
	font-size: 1.5em;
}

.wgr-result p {
	margin: 8px 0;
	font-size: 1.1em;
}

.wgr-result-pass {
	background: #d1fae5;
	border: 2px solid #10b981;
	color: #065f46;
}

.wgr-result-fail {
	background: #fee2e2;
	border: 2px solid #ef4444;
	color: #991b1b;
}

/* Loading state */
.wgr-quiz-loading {
	text-align: center;
	padding: 40px 20px;
	color: #6b7280;
}

.wgr-spinner {
	display: inline-block;
	width: 20px;
	height: 20px;
	border: 2px solid #e5e7eb;
	border-top-color: #3b82f6;
	border-radius: 50%;
	animation: wgr-spin 0.8s linear infinite;
	margin-right: 8px;
	vertical-align: middle;
}

@keyframes wgr-spin {
	to { transform: rotate(360deg); }
}

/* Blocked state (max attempts reached) */
.wgr-quiz-blocked {
	text-align: center;
	padding: 30px 20px;
}

.wgr-blocked-text {
	font-size: 1.1em;
	color: #dc2626;
	background: #fee2e2;
	padding: 15px 20px;
	border-radius: 6px;
	margin-bottom: 20px;
}

.wgr-previous-result {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	border-radius: 6px;
	padding: 20px;
	margin-top: 15px;
}

.wgr-previous-result h4 {
	margin: 0 0 10px;
	color: #166534;
}

.wgr-previous-result p {
	margin: 5px 0;
	color: #15803d;
}

/* Number input */
.wgr-number-answer {
	width: 100%;
	max-width: 200px;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 1em;
}

.wgr-number-answer:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Dropdown select */
.wgr-dropdown-answer {
	width: 100%;
	max-width: 400px;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 1em;
	background: #fff;
	cursor: pointer;
}

.wgr-dropdown-answer:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Fill in the blank */
.wgr-fill-blank-wrapper {
	background: #fff;
	padding: 15px;
	border-radius: 6px;
	border: 1px solid #e5e7eb;
}

.wgr-fill-blank-context {
	margin: 0 0 15px;
	font-size: 1em;
	line-height: 1.6;
	color: #374151;
}

.wgr-blank-indicator {
	display: inline-block;
	background: #fef3c7;
	color: #92400e;
	padding: 2px 8px;
	border-radius: 3px;
	font-weight: bold;
	margin: 0 2px;
}

.wgr-fill-blank-answer {
	width: 100%;
	max-width: 300px;
	padding: 10px 12px;
	border: 1px solid #d1d5db;
	border-radius: 4px;
	font-size: 1em;
}

.wgr-fill-blank-answer:focus {
	outline: none;
	border-color: #3b82f6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Explanation */
.wgr-explanation {
	margin-top: 15px;
	padding: 12px 15px;
	background: #eff6ff;
	border-left: 3px solid #3b82f6;
	border-radius: 0 4px 4px 0;
}

.wgr-explanation strong {
	color: #1d4ed8;
	display: block;
	margin-bottom: 5px;
}

.wgr-explanation p {
	margin: 0;
	color: #1e40af;
	font-size: 0.95em;
	line-height: 1.5;
}

/* Local save indicator */
.wgr-status-local {
	color: #f59e0b;
	background: #fef3c7;
}

/* Question number */
.wgr-question-number {
	display: inline-block;
	font-size: 0.9em;
	font-weight: bold;
	color: #6b7280;
	margin-right: 8px;
	min-width: 24px;
}

/* Question media */
.wgr-question-image {
	margin: 12px 0;
}

.wgr-question-image img {
	max-width: 100%;
	height: auto;
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.wgr-question-audio {
	margin: 12px 0;
}

.wgr-question-audio audio {
	width: 100%;
	max-width: 400px;
}

/* Running score */
.wgr-running-score {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 15px;
	background: linear-gradient(135deg, #3b82f6, #2563eb);
	color: #fff;
	border-radius: 6px;
	margin-bottom: 15px;
	font-weight: 500;
}

.wgr-running-score .wgr-score-label {
	opacity: 0.9;
}

.wgr-running-score .wgr-score-value {
	font-size: 1.2em;
	font-weight: bold;
}

/* Percentage complete */
.wgr-percentage-complete {
	padding: 10px 15px;
	background: #f3f4f6;
	border-radius: 6px;
	margin-bottom: 15px;
	font-weight: 500;
	color: #374151;
	text-align: center;
}

.wgr-percentage-complete .wgr-percentage-value {
	font-size: 1.3em;
	font-weight: bold;
	color: #3b82f6;
}

/* Forward only navigation */
.wgr-nav-forward-only {
	justify-content: flex-end;
}

/* Feedback messages */
.wgr-feedback {
	margin-top: 10px;
	padding: 10px 15px;
	border-radius: 6px;
	font-weight: 500;
	animation: wgr-fade-in 0.3s ease;
}

.wgr-feedback-correct {
	background: #d1fae5;
	color: #065f46;
	border: 1px solid #10b981;
}

.wgr-feedback-incorrect {
	background: #fee2e2;
	color: #991b1b;
	border: 1px solid #ef4444;
}

@keyframes wgr-fade-in {
	from {
		opacity: 0;
		transform: translateY(-5px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Answer highlighting for instant feedback */
.wgr-answer.wgr-correct-answer {
	background: #d1fae5;
	border-color: #10b981;
}

.wgr-answer.wgr-incorrect-answer {
	background: #fee2e2;
	border-color: #ef4444;
}

.wgr-answer.wgr-correct-answer::after {
	content: ' ✓';
	color: #059669;
	font-weight: bold;
}

.wgr-answer.wgr-incorrect-answer::after {
	content: ' ✗';
	color: #dc2626;
	font-weight: bold;
}

/* Question answered states */
.wgr-question.wgr-correct {
	border-left-color: #10b981;
	background: #f0fdf4;
}

.wgr-question.wgr-incorrect {
	border-left-color: #ef4444;
	background: #fef2f2;
}

/* ========================================
   THEME STYLES
   ======================================== */

/* Elegant Dark Theme */
.wgr-theme-elegant-dark {
	background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
	border: 1px solid #2d3748;
	color: #e2e8f0;
}

.wgr-theme-elegant-dark .wgr-question {
	background: rgba(45, 55, 72, 0.6);
	border-left-color: #4299e1;
	color: #e2e8f0;
}

.wgr-theme-elegant-dark .wgr-q-text {
	color: #f7fafc;
}

.wgr-theme-elegant-dark .wgr-answer {
	background: rgba(26, 32, 44, 0.8);
	border-color: #4a5568;
	color: #e2e8f0;
}

.wgr-theme-elegant-dark .wgr-answer:hover {
	background: rgba(45, 55, 72, 0.9);
	border-color: #4299e1;
}

.wgr-theme-elegant-dark .wgr-text-answer,
.wgr-theme-elegant-dark .wgr-number-answer,
.wgr-theme-elegant-dark .wgr-dropdown-answer,
.wgr-theme-elegant-dark .wgr-fill-blank-answer {
	background: rgba(26, 32, 44, 0.8);
	border-color: #4a5568;
	color: #e2e8f0;
}

.wgr-theme-elegant-dark .wgr-text-answer:focus,
.wgr-theme-elegant-dark .wgr-number-answer:focus,
.wgr-theme-elegant-dark .wgr-dropdown-answer:focus,
.wgr-theme-elegant-dark .wgr-fill-blank-answer:focus {
	border-color: #4299e1;
	box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.2);
}

.wgr-theme-elegant-dark .wgr-running-score {
	background: linear-gradient(135deg, #2d3748, #1a202c);
	border: 1px solid #4a5568;
}

.wgr-theme-elegant-dark .wgr-percentage-complete {
	background: rgba(45, 55, 72, 0.6);
	color: #cbd5e0;
}

.wgr-theme-elegant-dark .wgr-nav {
	border-top-color: #4a5568;
}

.wgr-theme-elegant-dark .wgr-quiz-actions {
	border-top-color: #4a5568;
}

.wgr-theme-elegant-dark .wgr-result-pass {
	background: rgba(16, 185, 129, 0.15);
	border-color: #10b981;
	color: #6ee7b7;
}

.wgr-theme-elegant-dark .wgr-result-pass h3,
.wgr-theme-elegant-dark .wgr-result-pass p {
	color: #e2e8f0;
}

.wgr-theme-elegant-dark .wgr-result-fail {
	background: rgba(239, 68, 68, 0.15);
	border-color: #ef4444;
	color: #fca5a5;
}

.wgr-theme-elegant-dark .wgr-result-fail h3,
.wgr-theme-elegant-dark .wgr-result-fail p {
	color: #e2e8f0;
}

/* Elegant Light Theme */
.wgr-theme-elegant-light {
	background: linear-gradient(135deg, #ffffff 0%, #f7fafc 100%);
	border: 1px solid #e2e8f0;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.wgr-theme-elegant-light .wgr-question {
	background: #ffffff;
	border-left-color: #4299e1;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.wgr-theme-elegant-light .wgr-answer {
	background: #f7fafc;
	border-color: #cbd5e0;
}

.wgr-theme-elegant-light .wgr-answer:hover {
	background: #edf2f7;
	border-color: #4299e1;
}

/* Classic Dark Theme */
.wgr-theme-classic-dark {
	background: #2d3748;
	border: 2px solid #1a202c;
	color: #e2e8f0;
}

.wgr-theme-classic-dark .wgr-question {
	background: #1a202c;
	border-left-color: #63b3ed;
	color: #e2e8f0;
}

.wgr-theme-classic-dark .wgr-q-text {
	color: #f7fafc;
}

.wgr-theme-classic-dark .wgr-answer {
	background: #2d3748;
	border-color: #4a5568;
	color: #e2e8f0;
}

.wgr-theme-classic-dark .wgr-answer:hover {
	background: #4a5568;
	border-color: #63b3ed;
}

.wgr-theme-classic-dark .wgr-text-answer,
.wgr-theme-classic-dark .wgr-number-answer,
.wgr-theme-classic-dark .wgr-dropdown-answer,
.wgr-theme-classic-dark .wgr-fill-blank-answer {
	background: #1a202c;
	border-color: #4a5568;
	color: #e2e8f0;
}

.wgr-theme-classic-dark .wgr-text-answer:focus,
.wgr-theme-classic-dark .wgr-number-answer:focus,
.wgr-theme-classic-dark .wgr-dropdown-answer:focus,
.wgr-theme-classic-dark .wgr-fill-blank-answer:focus {
	border-color: #63b3ed;
	box-shadow: 0 0 0 3px rgba(99, 179, 237, 0.2);
}

.wgr-theme-classic-dark .wgr-running-score {
	background: #1a202c;
	border: 1px solid #4a5568;
}

.wgr-theme-classic-dark .wgr-percentage-complete {
	background: #1a202c;
	color: #cbd5e0;
}

.wgr-theme-classic-dark .wgr-nav,
.wgr-theme-classic-dark .wgr-quiz-actions {
	border-top-color: #4a5568;
}

/* Classic Light Theme (default) */
.wgr-theme-classic-light {
	/* Uses base styles already defined */
}

/* Restart Quiz Button */
.wgr-restart-quiz {
	display: inline-block;
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background: linear-gradient(135deg, #3b82f6, #2563eb);
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 6px rgba(59, 130, 246, 0.3);
	margin-top: 15px;
}

.wgr-restart-quiz:hover {
	background: linear-gradient(135deg, #2563eb, #1d4ed8);
	transform: translateY(-2px);
	box-shadow: 0 6px 12px rgba(59, 130, 246, 0.4);
}

.wgr-restart-quiz:active {
	transform: translateY(0);
	box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
}

/* Social Share Buttons */
.wgr-social-share {
	margin: 20px 0;
	padding: 20px;
	background: #f9fafb;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
}

.wgr-social-share h4 {
	margin: 0 0 15px 0;
	font-size: 18px;
	color: #374151;
}

.wgr-social-share-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: center;
}

.wgr-share-btn {
	font-size: 14px;
	white-space: nowrap;
}

/* Responsive social buttons */
@media (max-width: 768px) {
	.wgr-social-share-buttons {
		flex-direction: column;
	}
	
	.wgr-share-btn {
		width: 100%;
		text-align: center;
		justify-content: center !important;
	}
}
