/**
 * EduNexa — ادونکسا
 * Download Box Stylesheet (Tabs, Accordion, Packages, Badges & Responsive Actions)
 *
 * @package EduNexa
 * @author  امیر حسین بناوند (Amir Hossein Banavand)
 * @link    https://npocto.ir
 * @version 1.0.0
 */

/* ==========================================================================
   1. Download Box Main Container & Header
   ========================================================================== */
.Edu-download-box {
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-top: 4px solid #FAB237;
	border-radius: 18px;
	padding: 24px;
	margin: 40px 0;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.04), 0 8px 10px -6px rgba(0, 0, 0, 0.02);
	position: relative;
}

.Edu-download-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding-bottom: 20px;
	border-bottom: 1px solid #f1f5f9;
	margin-bottom: 20px;
}

.Edu-download-header-title {
	display: flex;
	align-items: center;
	gap: 14px;
}

.Edu-download-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	border-radius: 12px;
	background: rgba(250, 178, 55, 0.15);
	color: #925c00;
	flex-shrink: 0;
}

.Edu-download-icon svg {
	width: 22px;
	height: 22px;
}

.Edu-download-title {
	font-size: 1.25rem;
	font-weight: 800;
	color: #1e293b;
	margin: 0 0 4px 0;
}

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

.Edu-download-pkg-count {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	color: #334155;
	font-size: 0.8rem;
	font-weight: 700;
	padding: 6px 14px;
	border-radius: 999px;
	white-space: nowrap;
}

/* ==========================================================================
   2. Download Tabs Navigation
   ========================================================================== */
.Edu-download-tabs-nav {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-bottom: 24px;
	border-bottom: 2px solid #f1f5f9;
	padding-bottom: 8px;
}

.Edu-download-tab-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: transparent;
	border: none;
	color: #64748b;
	font-size: 0.92rem;
	font-weight: 700;
	padding: 10px 18px;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.Edu-download-tab-btn svg {
	width: 16px;
	height: 16px;
}

.Edu-download-tab-btn:hover {
	color: #1e293b;
	background: #f8fafc;
}

.Edu-download-tab-btn.is-active {
	background: #FAB237;
	color: #222733;
	box-shadow: 0 4px 12px rgba(250, 178, 55, 0.25);
}

.Edu-download-tab-btn.is-active svg {
	color: #222733;
}

.Edu-download-tab-panel {
	display: none;
	animation: EduFadeIn 0.3s ease;
}

.Edu-download-tab-panel.is-active {
	display: block;
}

@keyframes EduFadeIn {
	from {
		opacity: 0;
		transform: translateY(6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ==========================================================================
   3. Packages Accordion
   ========================================================================== */
.Edu-download-packages-accordion {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.Edu-download-package-item {
	border: 1px solid #e2e8f0;
	border-radius: 14px;
	overflow: hidden;
	background: #ffffff;
	transition: all 0.25s ease;
}

.Edu-download-package-item:hover {
	border-color: #cbd5e1;
}

.Edu-download-package-item.is-open {
	border-color: #FAB237;
	box-shadow: 0 6px 16px rgba(0, 0, 0, 0.03);
}

/* Package Header */
.Edu-package-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 14px 18px;
	background: #f8fafc;
	cursor: pointer;
	user-select: none;
	transition: background-color 0.2s ease;
}

.Edu-download-package-item.is-open .Edu-package-card-header {
	background: #f1f5f9;
}

.Edu-package-header-info {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.Edu-package-folder-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #FAB237;
}

.Edu-package-folder-icon svg {
	width: 20px;
	height: 20px;
}

.Edu-package-name {
	font-size: 1rem;
	font-weight: 700;
	color: #1e293b;
	margin: 0;
}

.Edu-package-badges {
	display: flex;
	align-items: center;
	gap: 8px;
}

.Edu-pkg-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.75rem;
	font-weight: 600;
	padding: 2px 8px;
	border-radius: 6px;
}

.Edu-pkg-version {
	background: #e0f2fe;
	color: #0369a1;
	border: 1px solid #bae6fd;
}

.Edu-pkg-size {
	background: #f1f5f9;
	color: #475569;
	border: 1px solid #e2e8f0;
}

.Edu-pkg-size svg {
	width: 12px;
	height: 12px;
	color: #64748b;
}

.Edu-package-header-chevron {
	display: inline-flex;
	align-items: center;
	color: #94a3b8;
	transition: transform 0.3s ease;
}

.Edu-download-package-item.is-open .Edu-package-header-chevron {
	transform: rotate(180deg);
	color: #222733;
}

/* Package Body */
.Edu-package-card-body {
	display: none;
	padding: 18px;
	background: #ffffff;
	border-top: 1px solid #f1f5f9;
}

.Edu-download-package-item.is-open .Edu-package-card-body {
	display: block;
}

/* Package Actions, Password & Notes */
.Edu-package-actions-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 16px;
	padding-bottom: 12px;
	border-bottom: 1px dashed #e2e8f0;
}

.Edu-password-wrap {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: #fffbeb;
	border: 1px solid #fef3c7;
	padding: 6px 12px;
	border-radius: 8px;
}

.Edu-password-label {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.8rem;
	font-weight: 700;
	color: #b45309;
}

.Edu-password-label svg {
	width: 13px;
	height: 13px;
}

.Edu-password-copy-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	color: #92400e;
	transition: color 0.2s ease;
}

.Edu-password-code {
	font-family: inherit;
	font-weight: 800;
	font-size: 0.9rem;
	direction: ltr;
	background: #fef3c7;
	padding: 2px 8px;
	border-radius: 4px;
	color: #78350f;
}

.Edu-password-copy-icon svg {
	width: 14px;
	height: 14px;
	color: #d97706;
}

.Edu-password-copy-btn:hover .Edu-password-copy-icon svg {
	color: #222733;
}

.Edu-package-description {
	font-size: 0.85rem;
	color: #64748b;
}

.Edu-package-description p {
	margin: 0;
}

/* ==========================================================================
   4. Download Links List
   ========================================================================== */
.Edu-package-links-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.Edu-download-link-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	padding: 10px 14px;
	transition: all 0.2s ease;
}

.Edu-download-link-item:hover {
	background: #ffffff;
	border-color: #cbd5e1;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.03);
}

.Edu-link-details {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
	min-width: 0;
}

.Edu-link-type-pill {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 0.72rem;
	font-weight: 700;
	padding: 3px 8px;
	border-radius: 6px;
	flex-shrink: 0;
}

.Edu-link-type-pill svg {
	width: 12px;
	height: 12px;
}

.Edu-type-direct {
	background: #ecfdf5;
	color: #065f46;
	border: 1px solid #a7f3d0;
}

.Edu-type-mirror {
	background: #fef3c7;
	color: #92400e;
	border: 1px solid #fde68a;
}

.Edu-type-drive {
	background: #eff6ff;
	color: #1e40af;
	border: 1px solid #bfdbfe;
}

.Edu-type-github {
	background: #f1f5f9;
	color: #0f172a;
	border: 1px solid #cbd5e1;
}

.Edu-link-title {
	font-size: 0.92rem;
	font-weight: 600;
	color: #1e293b;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Link Actions (Download Button + Tools) */
.Edu-link-actions-group {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-shrink: 0;
}

.Edu-btn-download {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #FAB237;
	color: #222733;
	font-size: 0.85rem;
	font-weight: 700;
	padding: 7px 16px;
	border-radius: 8px;
	text-decoration: none;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 6px rgba(250, 178, 55, 0.25);
}

.Edu-btn-download:hover {
	background: #e59d22;
	color: #222733;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(250, 178, 55, 0.4);
}

.Edu-btn-download svg {
	width: 14px;
	height: 14px;
}

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

.Edu-link-tool-btn svg {
	width: 14px;
	height: 14px;
}

.Edu-link-tool-btn:hover {
	color: #1e293b;
	border-color: #cbd5e1;
	background: #f1f5f9;
}

.Edu-tool-report:hover {
	color: #ef4444;
	border-color: #fca5a5;
	background: #fee2e2;
}

.Edu-tool-qr:hover {
	color: #0284c7;
	border-color: #7dd3fc;
	background: #e0f2fe;
}

/* ==========================================================================
   5. Guide & Trailer Panels
   ========================================================================== */
.Edu-download-guide-box {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 20px;
}

.Edu-guide-tips {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 16px;
	padding-bottom: 16px;
	border-bottom: 1px dashed #cbd5e1;
}

.Edu-guide-tip-item {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-size: 0.9rem;
	color: #334155;
}

.Edu-guide-tip-icon {
	color: #059669;
	display: inline-flex;
	flex-shrink: 0;
	margin-top: 2px;
}

.Edu-guide-tip-icon svg {
	width: 16px;
	height: 16px;
}

.Edu-guide-custom-text {
	font-size: 0.92rem;
	line-height: 1.8;
	color: #475569;
}

.Edu-download-trailer-wrap {
	position: relative;
	padding-bottom: 56.25%; /* 16:9 ratio */
	height: 0;
	overflow: hidden;
	border-radius: 14px;
	background: #000000;
}

.Edu-download-trailer-wrap iframe,
.Edu-download-trailer-wrap video {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border: none;
}

/* ==========================================================================
   6. Responsive
   ========================================================================== */
@media (max-width: 768px) {
	.Edu-download-box {
		padding: 18px 16px;
		border-radius: 16px;
		margin-bottom: 24px;
	}

	.Edu-download-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 12px;
	}

	.Edu-download-title {
		font-size: 1.15rem;
	}

	.Edu-download-tabs-nav {
		overflow-x: auto;
		white-space: nowrap;
		-webkit-overflow-scrolling: touch;
		scroll-snap-type: x mandatory;
		padding-bottom: 8px;
		gap: 8px;
		width: 100%;
	}

	.Edu-download-tab-btn {
		flex-shrink: 0;
		scroll-snap-align: start;
		padding: 8px 14px;
		font-size: 0.85rem;
	}

	.Edu-download-link-item {
		flex-direction: column;
		align-items: flex-start;
		padding: 14px 12px;
		gap: 12px;
	}

	.Edu-link-main-info {
		width: 100%;
	}

	.Edu-link-title {
		font-size: 0.9rem;
	}

	.Edu-link-actions-group {
		width: 100%;
		flex-direction: column;
		gap: 10px;
	}

	.Edu-btn-download {
		width: 100%;
		justify-content: center;
		padding: 10px;
	}

	.Edu-link-secondary-tools {
		width: 100%;
		justify-content: space-between;
	}

	.Edu-download-password-box {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
		padding: 12px 14px;
	}

	.Edu-copy-password-btn {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.Edu-download-box {
		padding: 16px 12px;
	}

	.Edu-link-badges-row {
		flex-wrap: wrap;
		gap: 6px;
	}

	.Edu-link-badge {
		font-size: 0.72rem;
		padding: 2px 6px;
	}
}

