/* ===== Grid Kategori ===== */
.dokbap-kategori-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
	gap: 22px;
	margin: 30px 0;
}

.dokbap-kategori-item {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: 35px 15px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	text-decoration: none;
	color: #222;
	background: #fff;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.dokbap-kategori-item:hover {
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
	transform: translateY(-3px);
	color: #1a5d1a;
}

.dokbap-kategori-icon img {
	width: 100px;
	height: 100px;
	object-fit: contain;
	margin-bottom: 12px;
}

.dokbap-kategori-icon .dashicons {
	font-size: 90px;
	width: 90px;
	height: 90px;
	color: #1a5d1a;
	margin-bottom: 12px;
}

.dokbap-kategori-nama {
	font-weight: 700;
	letter-spacing: 0.5px;
	font-size: 15px;
}

/* ===== Grid Daftar Dokumen ===== */
.dokbap-dokumen-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 25px;
	margin: 30px 0;
}

.dokbap-dokumen-item {
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	display: flex;
	flex-direction: column;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.dokbap-dokumen-cover {
	height: 280px;
	background: #f2f2f2;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.dokbap-dokumen-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.dokbap-cover-placeholder .dashicons {
	font-size: 60px;
	width: 60px;
	height: 60px;
	color: #bbb;
}

.dokbap-dokumen-info {
	padding: 12px 15px 5px;
}

.dokbap-dokumen-info h4 {
	margin: 0 0 5px;
	font-size: 15px;
	line-height: 1.4;
}

.dokbap-tahun {
	font-size: 12px;
	color: #777;
}

.dokbap-dokumen-aksi {
	display: flex;
	gap: 8px;
	padding: 10px 15px 15px;
}

.dokbap-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 8px 10px;
	border-radius: 4px;
	border: none;
	cursor: pointer;
	font-size: 13px;
	text-decoration: none;
	font-weight: 600;
	transition: opacity 0.2s ease;
}

.dokbap-btn:hover {
	opacity: 0.85;
}

.dokbap-btn-lihat {
	background: #333;
	color: #fff;
}

.dokbap-btn-download {
	background: #1a5d1a;
	color: #fff;
}

.dokbap-btn .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
}

/* ===== Modal Flipbook ===== */
.dokbap-modal {
	display: none;
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	z-index: 99999;
}

.dokbap-modal.dokbap-modal-open {
	display: block;
}

.dokbap-modal-overlay {
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(0, 0, 0, 0.75);
}

.dokbap-modal-content {
	position: relative;
	max-width: 850px;
	margin: 3% auto;
	background: #fff;
	border-radius: 8px;
	padding: 25px;
	max-height: 90vh;
	overflow-y: auto;
	text-align: center;
}

.dokbap-modal-close {
	position: absolute;
	top: 10px;
	right: 15px;
	background: none;
	border: none;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	color: #444;
}

#dokbap-modal-title {
	margin: 0 0 15px;
	font-size: 18px;
}

#dokbap-flipbook-container {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 400px;
}

.dokbap-flipbook {
	margin: 0 auto;
}

.dokbap-page {
	background: #fff;
}

.dokbap-page img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.dokbap-page-closing {
	display: flex;
	align-items: center;
	justify-content: center;
	background: #f7f7f7;
}

.dokbap-closing-inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 20px;
	gap: 12px;
}

.dokbap-closing-inner .dashicons {
	font-size: 48px;
	width: 48px;
	height: 48px;
	color: #999;
}

.dokbap-closing-inner p {
	margin: 0;
	color: #555;
	font-size: 14px;
}

.dokbap-closing-inner .dokbap-btn {
	flex: none;
	padding: 10px 18px;
}

.dokbap-loading,
.dokbap-error {
	padding: 60px 20px;
	color: #666;
	font-size: 14px;
}

.dokbap-error {
	color: #c0392b;
}

body.dokbap-modal-noscroll {
	overflow: hidden;
}

@media (max-width: 600px) {
	.dokbap-modal-content {
		margin: 0;
		max-width: 100%;
		height: 100%;
		border-radius: 0;
	}
}
