/* ── Report Modal — frontend overlay ─────────────────────────────────────── */

/* Overlay */
.ep-report-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(10, 10, 26, 0.72);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	transition: opacity 0.25s ease;
}

.ep-report-overlay.is-open {
	display: flex;
	opacity: 1;
	pointer-events: all;
}

/* Box */
.ep-report-modal {
	background: #fff;
	border-radius: 18px;
	width: 100%;
	max-width: 520px;
	box-shadow: 0 24px 80px rgba(0, 0, 0, 0.32);
	transform: translateY(20px) scale(0.97);
	transition: transform 0.28s cubic-bezier(0.34, 1.56, 0.64, 1);
	position: relative;
	overflow: hidden;
}

.ep-report-overlay.is-open .ep-report-modal {
	transform: translateY(0) scale(1);
}

/* Colored top bar */
.ep-report-modal::before {
	content: '';
	display: block;
	height: 4px;
	background: linear-gradient(90deg, #8dc63f, #5b4886);
}

/* Header */
.ep-report-modal__head {
	padding: 22px 24px 0;
	display: flex;
	align-items: flex-start;
	gap: 14px;
}

.ep-report-modal__icon {
	width: 44px;
	height: 44px;
	flex-shrink: 0;
	background: linear-gradient(135deg, #eef7e0, #ede9f8);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #5b4886;
}

.ep-report-modal__title-wrap { flex: 1; }

.ep-report-modal__title {
	font-size: 18px;
	font-weight: 700;
	color: #111827;
	margin: 0 0 4px;
	line-height: 1.2;
}

.ep-report-modal__subtitle {
	font-size: 13px;
	color: #6b7280;
	margin: 0;
}

.ep-report-modal__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 34px;
	height: 34px;
	border-radius: 8px;
	border: none;
	background: #f3f4f6;
	cursor: pointer;
	color: #6b7280;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s, color 0.15s;
}

.ep-report-modal__close:hover {
	background: #ede9f8;
	color: #5b4886;
}

/* Body */
.ep-report-modal__body { padding: 20px 24px 0; }

/* Question preview chip */
.ep-report-qpreview {
	background: #f8f9fa;
	border: 1px solid #e5e7eb;
	border-radius: 10px;
	padding: 10px 14px;
	font-size: 13px;
	color: #374151;
	line-height: 1.55;
	margin-bottom: 18px;
	max-height: 80px;
	overflow: hidden;
	position: relative;
}

.ep-report-qpreview::after {
	content: '';
	position: absolute;
	bottom: 0; left: 0; right: 0;
	height: 28px;
	background: linear-gradient(transparent, #f8f9fa);
}

.ep-report-qpreview__label {
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.6px;
	color: #9ca3af;
	margin-bottom: 4px;
}

/* Type grid */
.ep-report-types {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 16px;
}

.ep-report-type-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1.5px solid #e5e7eb;
	background: #fff;
	cursor: pointer;
	font-size: 13px;
	font-weight: 500;
	color: #374151;
	text-align: left;
	transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.ep-report-type-btn:hover {
	border-color: #8dc63f;
	background: #f6faf0;
}

.ep-report-type-btn.is-selected {
	border-color: #5b4886;
	background: #f5f3ff;
	color: #5b4886;
	box-shadow: 0 0 0 3px rgba(91, 72, 134, 0.12);
}

.ep-report-type-btn .ep-rtype-icon {
	width: 28px;
	height: 28px;
	border-radius: 7px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	flex-shrink: 0;
}

.ep-rtype-icon--wrong    { background: #fef2f2; }
.ep-rtype-icon--unclear  { background: #fffbeb; }
.ep-rtype-icon--typo     { background: #eff6ff; }
.ep-rtype-icon--outdated { background: #f5f3ff; }
.ep-rtype-icon--other    { background: #f3f4f6; }

/* Description textarea */
.ep-report-desc-wrap { margin-bottom: 8px; }

.ep-report-desc-label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	color: #4b5563;
	margin-bottom: 6px;
}

.ep-report-desc {
	width: 100%;
	min-height: 80px;
	padding: 10px 12px;
	border-radius: 10px;
	border: 1.5px solid #e5e7eb;
	font-size: 13px;
	color: #111827;
	font-family: inherit;
	resize: vertical;
	box-sizing: border-box;
	transition: border-color 0.15s, box-shadow 0.15s;
	line-height: 1.5;
}

.ep-report-desc:focus {
	outline: none;
	border-color: #5b4886;
	box-shadow: 0 0 0 3px rgba(91, 72, 134, 0.1);
}

/* Footer */
.ep-report-modal__foot {
	padding: 16px 24px 24px;
	display: flex;
	align-items: center;
	gap: 10px;
}

.ep-report-submit-btn {
	flex: 1;
	padding: 11px 20px;
	border-radius: 10px;
	border: none;
	background: linear-gradient(135deg, #5b4886, #8dc63f);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.2s, transform 0.15s;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.ep-report-submit-btn:hover:not(:disabled) {
	opacity: 0.9;
}

.ep-report-submit-btn:active:not(:disabled) {
	transform: scale(0.98);
}

.ep-report-submit-btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.ep-report-cancel-btn {
	padding: 11px 18px;
	border-radius: 10px;
	border: 1.5px solid #e5e7eb;
	background: #fff;
	color: #6b7280;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.15s, color 0.15s;
}

.ep-report-cancel-btn:hover {
	border-color: #5b4886;
	color: #5b4886;
}

/* Status message */
.ep-report-status-msg {
	margin: 0 24px 16px;
	padding: 10px 14px;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	text-align: center;
	display: none;
}

.ep-report-status-msg.is-success { background: #eef7e0; color: #5a8a1f; display: block; }
.ep-report-status-msg.is-error   { background: #fef2f2; color: #dc2626; display: block; }

/* Report button in the exam nav */
.ep-btn-nav-report {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 10px;
	border: 1.5px solid rgba(91, 72, 134, 0.4);
	background: rgba(91, 72, 134, 0.08);
	color: #5b4886;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.ep-btn-nav-report:hover {
	background: rgba(91, 72, 134, 0.18);
	border-color: #5b4886;
	color: #3d2f5e;
}

/* Already-reported state */
.ep-btn-nav-report.is-reported {
	background: rgba(141, 198, 63, 0.1);
	border-color: rgba(141, 198, 63, 0.4);
	color: #5a8a1f;
	cursor: default;
}

/* Mobile */
@media (max-width: 480px) {
	.ep-report-types { grid-template-columns: 1fr; }
	.ep-report-modal { border-radius: 14px; }
	.ep-report-modal__foot { flex-direction: column-reverse; }
	.ep-report-submit-btn, .ep-report-cancel-btn { width: 100%; justify-content: center; }
}