/* Base styles untuk PDF generation */
.pdf-capture {
	/* Reset semua transformasi dan positioning */
	position: relative !important;
	transform: none !important;
	transition: none !important;
	animation: none !important;

	/* Pastikan konten terlihat */
	overflow: visible !important;
	background-color: #ffffff !important;

	/* Typography yang konsisten */
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	line-height: 1.4;
	color: #000000 !important;
}

/* Perbaiki layout untuk PDF */
.pdf-capture * {
	/* Reset transformasi pada child elements */
	transform: none !important;
	transition: none !important;
	animation: none !important;

	/* Hapus shadow dan border yang tidak perlu */
	box-shadow: none !important;
	text-shadow: none !important;

	/* Pastikan text readable */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Map container adjustments */
.pdf-capture .map-content {
	position: relative !important;
	height: auto !important;
	min-height: 400px;
	overflow: visible !important;
}

/* Map info panel */
.pdf-capture .map-info {
	position: relative !important;
	overflow: visible !important;
	height: auto !important;
	max-height: none !important;
	width: 100% !important;
	padding: 2rem !important;
	background-color: #ffffff !important;
	box-shadow: none !important;
}

/* Responsive grid adjustments */
.pdf-capture .grid {
	display: grid;
	gap: 1rem;
}

.pdf-capture .xl\\:grid-cols-2 {
	grid-template-columns: 1fr;
}

/* Chart containers */
.pdf-capture canvas,
.pdf-capture svg {
	max-width: 100% !important;
	height: auto !important;
	background-color: transparent !important;
}

/* Table styling untuk PDF */
.pdf-capture table {
	width: 100% !important;
	border-collapse: collapse !important;
	margin: 1rem 0 !important;
}

.pdf-capture table th,
.pdf-capture table td {
	padding: 0.5rem !important;
	border: 1px solid #ddd !important;
	text-align: left !important;
	font-size: 0.875rem !important;
}

.pdf-capture table th {
	background-color: #f8f9fa !important;
	font-weight: 600 !important;
}

/* Responsive breakpoints untuk PDF */

/* Mobile (320px - 480px) */
@media screen and (max-width: 480px) {
	.pdf-capture {
		font-size: 14px !important;
	}

	.pdf-capture .map-info {
		padding: 1rem !important;
	}

	.pdf-capture .grid {
		grid-template-columns: 1fr !important;
		gap: 0.75rem !important;
	}

	.pdf-capture .w-90 {
		width: 100% !important;
		padding: 0.5rem !important;
	}

	.pdf-capture .h5,
	.pdf-capture .h6 {
		font-size: 1.1rem !important;
		margin-bottom: 0.5rem !important;
	}

	.pdf-capture .text-base {
		font-size: 0.9rem !important;
	}
}

/* Tablet (481px - 768px) */
@media screen and (min-width: 481px) and (max-width: 768px) {
	.pdf-capture {
		font-size: 15px !important;
	}

	.pdf-capture .map-info {
		padding: 1.5rem !important;
	}

	.pdf-capture .grid {
		gap: 1rem !important;
	}

	.pdf-capture .md\\:grid-cols-2 {
		grid-template-columns: 1fr 1fr !important;
	}

	.pdf-capture .md\\:grid-cols-4 {
		grid-template-columns: repeat(2, 1fr) !important;
	}
}

/* Laptop (769px - 1024px) */
@media screen and (min-width: 769px) and (max-width: 1024px) {
	.pdf-capture {
		font-size: 16px !important;
	}

	.pdf-capture .xl\\:grid-cols-2 {
		grid-template-columns: 1fr 1fr !important;
	}

	.pdf-capture .md\\:grid-cols-4 {
		grid-template-columns: repeat(4, 1fr) !important;
	}
}

/* Desktop (1025px+) */
@media screen and (min-width: 1025px) {
	.pdf-capture {
		font-size: 16px !important;
	}

	.pdf-capture .xl\\:grid-cols-2 {
		grid-template-columns: 1fr 1fr !important;
	}

	.pdf-capture .map-info {
		padding: 2rem !important;
	}
}

/* Color bars untuk indeks */
.pdf-capture [class*='color-'] {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-size: 0.75rem !important;
	font-weight: 600 !important;
	min-height: 0.75rem !important;
	border: 1px solid rgba(0, 0, 0, 0.1) !important;
}

.pdf-capture .indeks-active {
	min-height: 1.5rem !important;
	border: 2px solid #000000 !important;
	font-weight: 700 !important;
	position: relative !important;
}

/* Legends dan labels */
.pdf-capture .color-1 {
	background-color: rgb(50, 136, 189) !important;
	color: white !important;
}
.pdf-capture .color-2 {
	background-color: rgb(153, 213, 148) !important;
	color: white !important;
}
.pdf-capture .color-3 {
	background-color: rgb(230, 245, 152) !important;
	color: black !important;
}
.pdf-capture .color-4 {
	background-color: rgb(255, 255, 191) !important;
	color: black !important;
}
.pdf-capture .color-5 {
	background-color: rgb(254, 224, 139) !important;
	color: black !important;
}
.pdf-capture .color-6 {
	background-color: rgb(252, 141, 89) !important;
	color: white !important;
}
.pdf-capture .color-7 {
	background-color: rgb(213, 62, 79) !important;
	color: white !important;
}

/* Print-specific optimizations */
.pdf-capture img {
	max-width: 100% !important;
	height: auto !important;
	image-rendering: -webkit-optimize-contrast !important;
}

/* Flexbox adjustments */
.pdf-capture .flex {
	display: flex !important;
}

.pdf-capture .flex-wrap {
	flex-wrap: wrap !important;
}

.pdf-capture .items-center {
	align-items: center !important;
}

.pdf-capture .justify-between {
	justify-content: space-between !important;
}

.pdf-capture .justify-evenly {
	justify-content: space-evenly !important;
}

/* Spacing utilities */
.pdf-capture .mb-2 {
	margin-bottom: 0.5rem !important;
}
.pdf-capture .mb-4 {
	margin-bottom: 1rem !important;
}
.pdf-capture .mb-8 {
	margin-bottom: 2rem !important;
}
.pdf-capture .mb-12 {
	margin-bottom: 3rem !important;
}
.pdf-capture .pb-16 {
	padding-bottom: 4rem !important;
}

/* Text utilities */
.pdf-capture .text-center {
	text-align: center !important;
}
.pdf-capture .text-start {
	text-align: start !important;
}
.pdf-capture .text-sm {
	font-size: 0.875rem !important;
}
.pdf-capture .text-base {
	font-size: 1rem !important;
}

/* High DPI display adjustments */
@media screen and (-webkit-min-device-pixel-ratio: 2), screen and (min-resolution: 192dpi) {
	.pdf-capture {
		-webkit-font-smoothing: antialiased !important;
		-moz-osx-font-smoothing: grayscale !important;
	}

	.pdf-capture canvas,
	.pdf-capture svg {
		image-rendering: -webkit-optimize-contrast !important;
	}
}

/* Dark mode override untuk PDF */
@media (prefers-color-scheme: dark) {
	.pdf-capture,
	.pdf-capture * {
		background-color: #ffffff !important;
		color: #000000 !important;
	}
}
