/**
 * PN-RED Smart Lazy Loading - Core Helper Stylesheet
 *
 * @package Pengadilan Negeri Red
 * @subpackage PN-RED Suite / Smart Lazy Loading
 */

/* 1. Stabilitas Dimensi & Pencegahan CLS */
img[loading="lazy"],
.pnred-smart-lazy-img {
	content-visibility: auto;
	max-width: 100%;
	height: auto;
}

/* Aspect ratio stability for responsive iframes */
.pnred-smart-lazy-iframe-wrap {
	position: relative;
	width: 100%;
	overflow: hidden;
	background-color: #f1f5f9;
}

.pnred-smart-lazy-iframe-wrap iframe {
	width: 100%;
	height: 100%;
	border: 0;
}

/* 2. Loading State Transitions */
.pnred-smart-lazy-loading {
	opacity: 0.85;
	transition: opacity 0.3s ease;
}

.pnred-smart-lazy-ready {
	opacity: 1;
}

/* 3. Admin Debug Bar Overlay */
#pnred-smart-lazy-debug-bar {
	position: fixed;
	bottom: 12px;
	right: 12px;
	z-index: 9999999;
	background: rgba(15, 23, 42, 0.95);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	color: #f8fafc;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, sans-serif;
	font-size: 12px;
	line-height: 1.4;
	border-radius: 8px;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
	max-width: 380px;
	width: calc(100vw - 24px);
	transition: all 0.25s ease;
}

.pnred-debug-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 8px 12px;
	background: rgba(154, 33, 9, 0.9);
	border-radius: 8px 8px 0 0;
	font-weight: 700;
	font-size: 12px;
	letter-spacing: 0.3px;
	cursor: pointer;
	user-select: none;
}

.pnred-debug-header .dashicons {
	font-size: 16px;
	width: 16px;
	height: 16px;
	line-height: 16px;
	margin-right: 4px;
	vertical-align: text-top;
}

.pnred-debug-content {
	padding: 10px 12px;
	max-height: 320px;
	overflow-y: auto;
}

.pnred-debug-section {
	margin-bottom: 8px;
	padding-bottom: 8px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.pnred-debug-section:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: none;
}

.pnred-debug-label {
	font-weight: 600;
	color: #94a3b8;
	margin-bottom: 4px;
	display: flex;
	justify-content: space-between;
}

.pnred-debug-badge {
	display: inline-block;
	padding: 1px 6px;
	border-radius: 4px;
	font-size: 10px;
	font-weight: 700;
	text-transform: uppercase;
}

.pnred-badge-success {
	background: #166534;
	color: #bbf7d0;
}

.pnred-badge-info {
	background: #075985;
	color: #bae6fd;
}

.pnred-badge-warning {
	background: #854d0e;
	color: #fef08a;
}

.pnred-debug-list {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.pnred-debug-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	color: #e2e8f0;
	font-size: 11px;
}

.pnred-debug-tag {
	background: rgba(255, 255, 255, 0.1);
	padding: 1px 5px;
	border-radius: 3px;
	font-family: monospace;
	font-size: 10px;
}

.pnred-debug-footer {
	margin-top: 8px;
	padding-top: 6px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	text-align: center;
	font-size: 10px;
	color: #94a3b8;
	letter-spacing: 0.2px;
}

/* 4. Smart Navigation Top Transition Loader */
#pnred-page-loader {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 3px;
	z-index: 999999;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.25s ease;
}

#pnred-page-loader.is-active {
	opacity: 1;
}

#pnred-page-loader .pnred-loader-bar {
	height: 100%;
	width: 0%;
	background: linear-gradient(90deg, #9a2109 0%, #e11d48 50%, #f59e0b 100%);
	box-shadow: 0 0 10px rgba(225, 29, 72, 0.7);
	transition: width 0.3s cubic-bezier(0.1, 0.9, 0.2, 1);
	border-radius: 0 2px 2px 0;
}


