.epg-gallery {
	display: flex;
	width: 100%;
	height: 620px;
	gap: 20px;
	box-sizing: border-box;
}

.epg-gallery.epg-dir-reverse {
	flex-direction: row-reverse;
}

.epg-gallery * {
	box-sizing: border-box;
}

/* ---------- LIST COLUMN ---------- */
.epg-list-col {
	flex: 0 0 32%;
	max-width: 32%;
	height: 100%;
	overflow-y: auto;
	padding-right: 4px;
}

.epg-list-col::-webkit-scrollbar {
	width: 6px;
}
.epg-list-col::-webkit-scrollbar-thumb {
	background: rgba(0,0,0,0.2);
	border-radius: 10px;
}

.epg-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.epg-item {
	display: flex;
	gap: 10px;
	padding: 8px;
	border-radius: 8px;
	cursor: pointer;
	transition: background-color 0.2s ease;
	background-color: transparent;
	outline: none;
}

.epg-item:focus-visible {
	box-shadow: 0 0 0 2px #065fd4;
}

.epg-item.is-active {
	background-color: #e5f1ff;
}

.epg-item-thumb {
	position: relative;
	width: 120px;
	min-width: 120px;
	aspect-ratio: 4 / 3;
	border-radius: 8px;
	overflow: hidden;
	background: #ddd;
	flex-shrink: 0;
}

.epg-item-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.epg-item-badge {
	position: absolute;
	bottom: 4px;
	right: 4px;
	background: rgba(0,0,0,0.75);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.5px;
	padding: 2px 5px;
	border-radius: 3px;
	line-height: 1;
}

.epg-item-info {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 2px;
}

.epg-item-title {
	font-size: 14px;
	font-weight: 600;
	color: #0f0f0f;
	line-height: 1.3;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.epg-item-meta {
	font-size: 12px;
	color: #606060;
}

.epg-item-desc {
	font-size: 12px;
	color: #606060;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* ---------- PREVIEW COLUMN ---------- */
.epg-preview-col {
	flex: 1;
	min-width: 0;
	height: 100%;
	display: flex;
	flex-direction: column;
	background: #f8f9fa;
	border-radius: 8px;
	overflow: hidden;
	border: 1px solid #e2e2e2;
}

.epg-preview-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 10px 14px;
	border-bottom: 1px solid #e2e2e2;
	background: #fff;
}

.epg-preview-current-title {
	font-size: 14px;
	font-weight: 600;
	color: #0f0f0f;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.epg-download-btn {
	flex-shrink: 0;
	font-size: 12px;
	font-weight: 600;
	color: #fff;
	background-color: #065fd4;
	padding: 6px 14px;
	border-radius: 18px;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

.epg-download-btn:hover {
	background-color: #0b4faa;
	color: #fff;
}

.epg-preview-frame-wrap {
	position: relative;
	flex: 1;
	min-height: 0;
}

.epg-preview-iframe {
	width: 100%;
	height: 100%;
	border: 0;
	display: block;
}

.epg-preview-placeholder {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 12px;
	color: #8a8a8a;
	text-align: center;
	padding: 20px;
}

.epg-icon-pdf-large {
	font-style: normal;
	font-weight: 800;
	font-size: 13px;
	letter-spacing: 1px;
	color: #fff;
	background: #d33b2c;
	padding: 14px 18px;
	border-radius: 10px;
}

.epg-icon-pdf {
	font-style: normal;
}

.epg-preview-placeholder p {
	margin: 0;
	font-size: 14px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 767px) {
	.epg-gallery,
	.epg-gallery.epg-dir-reverse {
		flex-direction: column;
		height: auto !important;
	}

	.epg-list-col {
		max-width: 100%;
		flex: 1 1 auto;
		max-height: 320px;
	}

	.epg-preview-col {
		flex: 0 0 420px;
		height: 420px;
	}
}
