/* NTPay 후원 버튼
 * 테마에서 덮어쓰기 쉽도록 :where()로 우선순위를 0으로 두고, 색은 변수로 노출합니다.
 *   --ntpay-primary, --ntpay-button-bg, --ntpay-button-color, --ntpay-button-radius
 */

:root { --ntpay-primary: #1f6f5c; }

:where(.ntpay-button) {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: .4em;
	padding: .85em 1.7em;
	border: 0;
	border-radius: var(--ntpay-button-radius, 10px);
	background: var(--ntpay-button-bg, var(--ntpay-primary));
	color: var(--ntpay-button-color, #fff);
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: filter .15s ease;
}
:where(.ntpay-button):hover { filter: brightness(1.08); }
:where(.ntpay-button):focus-visible,
:where([data-ntpay]):focus-visible { outline: 2px solid var(--ntpay-primary); outline-offset: 3px; }
:where(.ntpay-button--full) { display: flex; width: 100%; }
:where([data-ntpay]:not(button)) { cursor: pointer; }

.ntpay-admin-hint {
	display: block;
	margin-top: 6px;
	color: #8a6100;
	font-size: 13px;
}

/* 진행 표시 · 오류 안내 */
.ntpay-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(20, 24, 22, .45);
	color-scheme: light;
}
.ntpay-overlay[hidden] { display: none; }

.ntpay-sheet {
	box-sizing: border-box;
	width: 100%;
	max-width: 360px;
	padding: 24px;
	border-radius: 16px;
	background: #fff;
	color: #1d2320;
	font-size: 15px;
	line-height: 1.55;
	text-align: center;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .2);
	animation: ntpay-in .16s ease-out;
}
.ntpay-sheet--loading { display: flex; align-items: center; gap: 12px; text-align: left; }
.ntpay-sheet-text { margin: 0; }
.ntpay-sheet--error .ntpay-sheet-text { margin-bottom: 18px; }
.ntpay-sheet-actions { display: flex; gap: 8px; }
.ntpay-sheet-btn {
	flex: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	margin: 0;
	padding: 8px 14px;
	border: 1px solid #cfd6d2;
	border-radius: 10px;
	background: #fff;
	color: #1d2320;
	font: inherit;
	font-weight: 600;
	text-decoration: none;
	cursor: pointer;
}
.ntpay-sheet-btn.is-primary { border-color: var(--ntpay-primary); background: var(--ntpay-primary); color: #fff; }
.ntpay-sheet-btn:focus-visible { outline: 2px solid var(--ntpay-primary); outline-offset: 2px; }

.ntpay-spinner {
	flex: none;
	width: 22px;
	height: 22px;
	border: 2px solid #dfe4e1;
	border-top-color: var(--ntpay-primary);
	border-radius: 50%;
	animation: ntpay-spin .8s linear infinite;
}
@keyframes ntpay-spin { to { transform: rotate(360deg); } }
@keyframes ntpay-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .ntpay-sheet { animation: none; } .ntpay-spinner { animation-duration: 2s; } }
