/* Order-pay page. Kept minimal and inheriting so it sits inside any theme. */
.ftsc-pay {
	max-width: 480px;
	margin: 1.5em 0;
}

.ftsc-pay__lead {
	margin: 0 0 1em;
}

.ftsc-message:empty {
	display: none;
}

.ftsc-message {
	margin: 0 0 1em;
}

.ftsc-buttons {
	position: relative;
	min-height: 150px;
}

.ftsc-loading {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin: 0;
	padding: 1em 0;
	opacity: 0.75;
}

.ftsc-loading::before,
.ftsc-overlay__box::before {
	content: "";
	width: 1.1em;
	height: 1.1em;
	flex: none;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: ftsc-spin 0.8s linear infinite;
}

.ftsc-other {
	margin: 1em 0 0;
	font-size: 0.9em;
}

.ftsc-retry {
	margin-top: 0.75em;
}

/* Covers the page while the payment is being confirmed, so it can't be paid twice. */
.ftsc-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(255, 255, 255, 0.85);
}

.ftsc-overlay__box {
	display: flex;
	align-items: center;
	gap: 0.75em;
	max-width: 360px;
	padding: 1em 1.25em;
	border-radius: 8px;
	background: #fff;
	color: #1e1e1e;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
}

@media (prefers-color-scheme: dark) {
	.ftsc-overlay {
		background: rgba(0, 0, 0, 0.7);
	}
	.ftsc-overlay__box {
		background: #1e1e1e;
		color: #f0f0f0;
	}
}

@keyframes ftsc-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (prefers-reduced-motion: reduce) {
	.ftsc-loading::before,
	.ftsc-overlay__box::before,
	.ftsc-preparing::before {
		animation-duration: 2.4s;
	}
}

/* Buttons on the checkout page itself (classic and block checkout). */
.ftsc-inline {
	margin-top: 1em;
}

.ftsc-block-buttons {
	width: 100%;
}

.ftsc-load-error {
	margin: 0 0 1em;
	color: #b32d2e;
}

.ftsc-editor-placeholder {
	padding: 1em;
	border: 1px dashed currentColor;
	border-radius: 4px;
	text-align: center;
	opacity: 0.7;
}

/* Between a click and PayPal opening: the checkout is submitted and the
   PayPal order created. Keeps the buttons visibly busy meanwhile. */
.ftsc-preparing {
	display: flex;
	align-items: center;
	gap: 0.6em;
	margin: 0 0 0.75em;
	font-size: 0.95em;
}

.ftsc-preparing::before {
	content: "";
	width: 1em;
	height: 1em;
	flex: none;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: ftsc-spin 0.8s linear infinite;
}

.ftsc-is-preparing {
	opacity: 0.6;
	pointer-events: none;
	transition: opacity 0.15s;
}
