.epdfd-wrap {
	--epdfd-gap: 24px;
	--epdfd-radius: 12px;
	--epdfd-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
	--epdfd-primary: #1F65F4;
	font-family: inherit;
}

.epdfd-search {
	margin-bottom: 24px;
}

.epdfd-search-input {
	width: 100%;
	max-width: 400px;
	padding: 12px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	font-size: 15px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.epdfd-search-input:focus {
	border-color: var(--epdfd-primary);
	box-shadow: 0 0 0 3px rgba(31, 101, 244, 0.12);
}

.epdfd-section {
	margin-bottom: 40px;
}

.epdfd-section-title {
	font-size: 22px;
	font-weight: 700;
	margin-bottom: 20px;
	color: #111827;
}

.epdfd-items {
	display: grid;
	gap: var(--epdfd-gap);
}

.epdfd-grid {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.epdfd-list {
	grid-template-columns: 1fr;
}

.epdfd-item {
	position: relative;
	display: flex;
	flex-direction: column;
	background: #ffffff;
	border: 1px solid #e5e7eb;
	border-radius: var(--epdfd-radius);
	box-shadow: var(--epdfd-shadow);
	overflow: hidden;
	transition: transform 0.2s, box-shadow 0.2s;
	text-decoration: none;
	color: inherit;
}

.epdfd-list .epdfd-item {
	flex-direction: row;
	align-items: stretch;
}

.epdfd-item:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.epdfd-item.epdfd-modal-trigger {
	cursor: pointer;
}

.epdfd-thumb {
	position: relative;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	overflow: hidden;
	background: #f3f4f6;
	flex-shrink: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.epdfd-list .epdfd-thumb {
	width: 220px;
}

@media (max-width: 767px) {
	.epdfd-list .epdfd-thumb {
		width: 100%;
	}
	.epdfd-list .epdfd-item {
		flex-direction: column;
	}
}

.epdfd-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s;
	margin: auto;
}

.epdfd-thumb-placeholder {
	object-fit: contain !important;
	width: auto !important;
	height: auto !important;
	max-width: 55%;
	max-height: 55%;
	padding: 20px;
	margin: auto;
}

.epdfd-item:hover .epdfd-thumb img:not(.epdfd-thumb-placeholder) {
	transform: scale(1.04);
}

.epdfd-body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: flex-start;
	flex: 1;
	padding: 18px;
}

.epdfd-title {
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 10px;
	color: #111827;
}

.epdfd-meta {
	display: flex;
	gap: 12px;
	font-size: 13px;
	color: #6b7280;
	margin-bottom: 16px;
}

.epdfd-size::before {
	content: '';
	display: inline-block;
	width: 8px;
	height: 8px;
	background: #1F65F4;
	border-radius: 50%;
	margin-right: 5px;
}

.epdfd-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	align-self: flex-start;
	padding: 10px 18px;
	background: #1F65F4;
	color: #ffffff;
	font-size: 14px;
	font-weight: 600;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.2s, transform 0.2s;
	border: none;
	cursor: pointer;
}

.epdfd-btn:hover {
	background: #174bb8;
	color: #ffffff;
}

.epdfd-modal {
	display: none;
	position: fixed;
	inset: 0;
	z-index: 99999;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.epdfd-modal.epdfd-active {
	display: flex;
}

.epdfd-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.75);
}

.epdfd-modal-content {
	position: relative;
	width: 100%;
	max-width: 1100px;
	height: 85vh;
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.epdfd-modal-close {
	position: absolute;
	top: -52px;
	right: 0;
	width: 44px;
	height: 44px;
	background: #ffffff;
	color: #111827;
	border: none;
	border-radius: 50%;
	font-size: 26px;
	line-height: 44px;
	text-align: center;
	cursor: pointer;
	z-index: 3;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
	transition: transform 0.2s, background 0.2s;
}

.epdfd-modal-close:hover {
	transform: scale(1.08);
	background: #f3f4f6;
}

.epdfd-pdf-object {
	flex: 1;
	width: 100%;
	border: 0;
	background: #ffffff;
}

.epdfd-modal-footer {
	display: flex;
	padding: 14px 18px;
	background: #ffffff;
	border-top: 1px solid #e5e7eb;
	flex-shrink: 0;
}

.epdfd-download-position-left .epdfd-modal-footer {
	justify-content: flex-start;
}

.epdfd-download-position-center .epdfd-modal-footer {
	justify-content: center;
}

.epdfd-download-position-right .epdfd-modal-footer {
	justify-content: flex-end;
}

.epdfd-modal-download {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 14px 24px;
	background: #1F65F4;
	color: #ffffff;
	font-size: 15px;
	font-weight: 600;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.2s, transform 0.2s;
}

.epdfd-modal-download:hover {
	background: #174bb8;
	color: #ffffff;
}

@media (max-width: 991px) {
	.epdfd-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	}
}

@media (max-width: 767px) {
	.epdfd-grid {
		grid-template-columns: 1fr !important;
	}
	.epdfd-modal-content {
		height: 90vh;
		border-radius: 8px;
	}
}

.epdfd-item.hidden {
	display: none;
}

.epdfd-debug {
	padding: 16px;
	background: #fef3c7;
	border: 1px solid #f59e0b;
	border-radius: 8px;
	color: #92400e;
	font-size: 14px;
	margin-bottom: 20px;
}

.epdfd-debug code {
	background: rgba(0, 0, 0, 0.05);
	padding: 2px 6px;
	border-radius: 4px;
}
