/**
 * EduNexa — ادونکسا
 * Post Modals Stylesheet (Broken Link Report, File Guide & QR Code)
 *
 * @package EduNexa
 * @author  امیر حسین بناوند (Amir Hossein Banavand)
 * @link    https://npocto.ir
 * @version 1.0.0
 */

/* ==========================================================================
   1. Modal Base & Backdrop Overlay
   ========================================================================== */
.Edu-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	box-sizing: border-box;
	direction: rtl;
	text-align: right;
}

.Edu-modal[hidden] {
	display: none !important;
}

.Edu-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(15, 23, 42, 0.65);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	animation: EduModalFadeIn 0.25s ease forwards;
}

.Edu-modal-dialog {
	position: relative;
	width: 100%;
	max-width: 560px;
	z-index: 1;
	animation: EduModalScaleUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.Edu-modal-dialog-md {
	max-width: 640px;
}

.Edu-modal-dialog-sm {
	max-width: 440px;
}

@keyframes EduModalFadeIn {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes EduModalScaleUp {
	from {
		opacity: 0;
		transform: scale(0.94) translateY(12px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.Edu-modal-content {
	background: #ffffff;
	border-radius: 20px;
	border: 1px solid rgba(250, 178, 55, 0.35);
	box-shadow: 0 25px 50px -12px rgba(15, 23, 42, 0.35);
	overflow: hidden;
	display: flex;
	flex-direction: column;
	max-height: calc(100vh - 40px);
}

/* ==========================================================================
   2. Modal Header
   ========================================================================== */
.Edu-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
	background: #ffffff;
	border-bottom: 1px solid #f1f5f9;
}

.Edu-modal-title-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
}

.Edu-modal-header-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 10px;
	flex-shrink: 0;
}

.Edu-modal-header-icon svg {
	width: 20px;
	height: 20px;
}

.Edu-icon-danger {
	background: #fef2f2;
	color: #ef4444;
	border: 1px solid #fee2e2;
}

.Edu-icon-gold {
	background: rgba(250, 178, 55, 0.15);
	color: #925c00;
	border: 1px solid rgba(250, 178, 55, 0.3);
}

.Edu-modal-title {
	font-size: 1.15rem;
	font-weight: 800;
	color: #1e293b;
	margin: 0 0 3px 0;
}

.Edu-modal-subtitle {
	font-size: 0.78rem;
	color: #64748b;
	display: block;
}

.Edu-modal-close-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 8px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	color: #64748b;
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 0;
}

.Edu-modal-close-btn svg {
	width: 16px;
	height: 16px;
}

.Edu-modal-close-btn:hover {
	background: #fee2e2;
	color: #ef4444;
	border-color: #fca5a5;
}

/* ==========================================================================
   3. Modal Body & Forms
   ========================================================================== */
.Edu-modal-body {
	padding: 22px 24px;
	overflow-y: auto;
}

.Edu-report-target-summary {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 12px 14px;
	margin-bottom: 18px;
}

.Edu-target-item {
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.Edu-target-label {
	font-size: 0.75rem;
	color: #64748b;
}

.Edu-target-val {
	font-size: 0.88rem;
	color: #1e293b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.Edu-form-group {
	margin-bottom: 16px;
}

.Edu-form-label {
	display: block;
	font-size: 0.85rem;
	font-weight: 700;
	color: #334155;
	margin-bottom: 6px;
}

.Edu-required {
	color: #ef4444;
}

.Edu-form-select,
.Edu-form-input,
.Edu-form-textarea {
	width: 100%;
	padding: 10px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 0.9rem;
	color: #1e293b;
	background: #ffffff;
	box-sizing: border-box;
	transition: all 0.2s ease;
	outline: none;
}

.Edu-form-select:focus,
.Edu-form-input:focus,
.Edu-form-textarea:focus {
	border-color: #FAB237;
	box-shadow: 0 0 0 3px rgba(250, 178, 55, 0.2);
}

.Edu-form-textarea {
	resize: vertical;
	min-height: 80px;
}

/* Feedback Box */
.Edu-modal-feedback {
	display: none;
	padding: 12px 16px;
	border-radius: 8px;
	font-size: 0.88rem;
	margin-top: 14px;
	line-height: 1.6;
}

.Edu-modal-feedback.is-visible {
	display: block;
	animation: EduFadeIn 0.2s ease;
}

.Edu-modal-feedback.is-success {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.Edu-modal-feedback.is-error {
	background: #fef2f2;
	color: #991b1b;
	border: 1px solid #fecaca;
}

/* ==========================================================================
   4. Modal Footer & Buttons
   ========================================================================== */
.Edu-modal-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 16px 24px;
	background: #f8fafc;
	border-top: 1px solid #f1f5f9;
}

.Edu-btn-secondary {
	background: #ffffff;
	border: 1px solid #cbd5e1;
	color: #475569;
	padding: 8px 18px;
	border-radius: 8px;
	font-weight: 700;
	font-size: 0.85rem;
	cursor: pointer;
	transition: all 0.2s ease;
}

.Edu-btn-secondary:hover {
	background: #f1f5f9;
	color: #1e293b;
	border-color: #94a3b8;
}

/* Loading Spinner */
.Edu-spinner {
	display: none;
	width: 14px;
	height: 14px;
	border: 2px solid rgba(34, 39, 51, 0.2);
	border-top-color: #222733;
	border-radius: 50%;
	animation: EduSpin 0.7s linear infinite;
	margin-right: 6px;
}

.is-loading .Edu-spinner {
	display: inline-block;
}

.is-loading .Edu-btn-text {
	opacity: 0.7;
}

@keyframes EduSpin {
	to { transform: rotate(360deg); }
}

/* ==========================================================================
   5. Guide Modal Content Styles
   ========================================================================== */
.Edu-guide-content {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

.Edu-guide-block {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 16px;
}

.Edu-guide-block-title {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 0.95rem;
	font-weight: 800;
	color: #1e293b;
	margin: 0 0 8px 0;
}

.Edu-guide-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #FAB237;
	color: #222733;
	font-size: 0.8rem;
	font-weight: 800;
	flex-shrink: 0;
}

.Edu-guide-block p {
	font-size: 0.88rem;
	line-height: 1.7;
	color: #475569;
	margin: 0;
}

.Edu-guide-callout {
	display: flex;
	align-items: center;
	gap: 8px;
	background: #fffbeb;
	border: 1px solid #fef3c7;
	padding: 8px 12px;
	border-radius: 6px;
	margin-top: 10px;
	font-size: 0.82rem;
	color: #92400e;
}

.Edu-guide-callout code {
	background: #fef3c7;
	color: #78350f;
	font-weight: 800;
	padding: 2px 8px;
	border-radius: 4px;
	font-size: 0.88rem;
}

/* ==========================================================================
   6. QR Modal Styles
   ========================================================================== */
.Edu-qr-body {
	text-align: center;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 14px;
}

.Edu-qr-image-container {
	padding: 12px;
	background: #ffffff;
	border: 2px solid #FAB237;
	border-radius: 14px;
	box-shadow: 0 8px 20px rgba(250, 178, 55, 0.15);
	display: inline-flex;
}

.Edu-qr-image-container img {
	display: block;
	border-radius: 6px;
}

.Edu-qr-instruction {
	font-size: 0.85rem;
	color: #64748b;
	line-height: 1.6;
	margin: 0;
	max-width: 300px;
}

.Edu-qr-link-preview {
	display: flex;
	align-items: center;
	gap: 6px;
	width: 100%;
}

.Edu-qr-input {
	font-size: 0.8rem;
	padding: 8px 10px;
	background: #f8fafc;
	color: #64748b;
}

/* ==========================================================================
   7. Responsive
   ========================================================================== */
@media (max-width: 640px) {
	.Edu-modal {
		padding: 10px;
		align-items: flex-end; /* Mobile bottom sheet style or centered fit */
	}

	.Edu-modal-dialog {
		width: 100%;
		max-width: 100%;
		max-height: 88vh;
		border-radius: 18px 18px 0 0;
		display: flex;
		flex-direction: column;
	}

	.Edu-modal-header {
		padding: 14px 16px;
	}

	.Edu-modal-body {
		padding: 14px 16px;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
	}

	.Edu-modal-footer {
		padding: 12px 16px 18px;
		flex-direction: column;
		gap: 8px;
	}

	.Edu-modal-footer .Edu-btn {
		width: 100%;
		justify-content: center;
	}

	.Edu-report-target-summary {
		grid-template-columns: 1fr;
		gap: 6px;
	}

	.Edu-qr-code-img {
		max-width: 180px;
		height: auto;
	}
}

