/**
 * .js-page-loading-link — 메인 등 동일 출처 페이지 이동 시 로딩 UX (전역 바 + 가벼운 오버레이 + 버튼 상태)
 */

#cc-page-loading-bar {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	z-index: 100001;
	pointer-events: none;
	opacity: 0;
	transition: opacity 0.12s ease;
	background: linear-gradient(90deg, #2563eb, #93c5fd, #2563eb);
	background-size: 220% 100%;
	animation: ccPageLoadingBarMove 1s linear infinite;
}

#cc-page-loading-bar.is-visible {
	opacity: 1;
}

@keyframes ccPageLoadingBarMove {
	0% {
		background-position: 0% 0;
	}
	100% {
		background-position: 220% 0;
	}
}

#cc-page-loading-backdrop {
	position: fixed;
	inset: 0;
	z-index: 100000;
	pointer-events: none;
	background: rgba(15, 15, 35, 0.22);
	opacity: 0;
	transition: opacity 0.18s ease;
}

#cc-page-loading-backdrop.is-visible {
	opacity: 1;
}

.js-page-loading-link {
	position: relative;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	vertical-align: middle;
	touch-action: manipulation;
}

.js-page-loading-link__row {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.42rem;
	max-width: 100%;
}

.js-page-loading-link__text {
	white-space: nowrap;
	text-align: center;
}

.js-page-loading-link .pll-spinner {
	display: none;
	width: 0.95em;
	height: 0.95em;
	flex-shrink: 0;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: rgba(255, 255, 255, 0.95);
	border-radius: 50%;
	animation: pllSpinnerRotate 0.65s linear infinite;
	box-sizing: border-box;
}

.js-page-loading-link.is-nav-loading .pll-spinner {
	display: block;
}

.js-page-loading-link.is-nav-loading .js-page-loading-link__lead-icon {
	display: none !important;
}

.js-page-loading-link.is-nav-loading {
	pointer-events: none !important;
	cursor: wait !important;
	opacity: 0.95;
}

@keyframes pllSpinnerRotate {
	to {
		transform: rotate(360deg);
	}
}

.js-page-loading-link--on-light .pll-spinner {
	border-color: rgba(37, 99, 235, 0.28);
	border-top-color: #1d4ed8;
}

@media (prefers-reduced-motion: reduce) {
	#cc-page-loading-bar {
		animation: none;
		opacity: 0.85;
	}
	.js-page-loading-link .pll-spinner {
		animation: none;
		border-top-color: rgba(255, 255, 255, 0.75);
	}
}
