/* Shared Swan Pay foundation. Keep the Connector copy in sync. */
@font-face {
	font-family: SwanPay Poppins;
	src: url('./poppins-regular.ttf') format('truetype');
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

@font-face {
	font-family: SwanPay Poppins;
	src: url('./poppins-semibold.ttf') format('truetype');
	font-style: normal;
	font-weight: 600 700;
	font-display: swap;
}

:where(.swanpay-wrap, .swanpay-payment-shell, .swanpay-saved-cards, .swanpay-card-options) {
	--sp-ink: #0c1a44;
	--sp-muted: #626b80;
	--sp-blue: #59b5f7;
	--sp-link: #146da6;
	--sp-aqua: #53dbd7;
	--sp-line: #e2e6ee;
	--sp-soft: #f6f7fb;
	--sp-font: 'SwanPay Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	font-family: var(--sp-font);
	color: var(--sp-ink);
	font-size: 14px;
	line-height: 1.65;
	color-scheme: light;
}

.swanpay-brand-logo {
	display: block;
	width: 156px;
	max-width: 100%;
	height: auto;
}

.swanpay-eyebrow {
	margin: 0 0 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: var(--sp-link);
}

.swanpay-platform {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 12px;
	border: 1px solid var(--sp-line);
	border-radius: 999px;
	background: #fff;
	color: var(--sp-muted);
	font-size: 12px;
}

.swanpay-platform::before {
	content: '';
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--sp-blue);
}

/* Dark text keeps the website's light blue buttons readable. */
:where(.swanpay-wrap, .swanpay-payment-shell) a {
	color: var(--sp-link);
	text-underline-offset: 3px;
}

:where(.swanpay-wrap, .swanpay-payment-shell, .swanpay-saved-cards) :is(a, button, input, select, textarea):focus-visible {
	outline: 3px solid var(--sp-link);
	outline-offset: 3px;
}

:where(.swanpay-wrap, .swanpay-payment-shell, .swanpay-saved-cards) [hidden] {
	display: none !important;
}

/* Setup flow: the numbered onboarding steps shared by Woo, the Connector and the SwanPay app. */
.swanpay-flow-intro {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 16px 24px;
	margin-bottom: 28px;
	padding-bottom: 24px;
	border-bottom: 1px solid var(--sp-line);
}

.swanpay-flow-intro h2 {
	margin: 0 0 6px;
	font-size: 20px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: -.02em;
	color: var(--sp-ink);
}

.swanpay-flow-intro p:not(.swanpay-eyebrow) {
	margin: 0;
	max-width: 60ch;
	color: var(--sp-muted);
}

.swanpay-flow-count {
	flex: none;
	padding: 6px 14px;
	border: 1px solid #cceafa;
	border-radius: 999px;
	background: linear-gradient(120deg, #eaf9fc, #eef7ff);
	color: var(--sp-link);
	font-size: 12px;
	font-weight: 600;
	white-space: nowrap;
}

.swanpay-flow {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: swanpay-flow;
}

.swanpay-flow-step {
	position: relative;
	display: grid;
	grid-template-columns: 36px minmax(0, 1fr);
	column-gap: 18px;
	margin: 0;
	padding-bottom: 32px;
	counter-increment: swanpay-flow;
	animation: swanpay-rise .45s cubic-bezier(.2, .7, .2, 1) both;
}

.swanpay-flow-step:nth-child(2) { animation-delay: .06s; }
.swanpay-flow-step:nth-child(3) { animation-delay: .12s; }
.swanpay-flow-step:nth-child(4) { animation-delay: .18s; }

.swanpay-flow-step:last-child {
	padding-bottom: 0;
}

.swanpay-flow-step:not(:last-child)::after {
	content: '';
	position: absolute;
	top: 44px;
	bottom: 8px;
	left: 17px;
	width: 2px;
	border-radius: 2px;
	background: var(--sp-line);
}

.swanpay-flow-step.is-complete:not(:last-child)::after {
	background: linear-gradient(var(--sp-aqua), var(--sp-blue));
}

.swanpay-flow-marker {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 36px;
	height: 36px;
	border: 1px solid #cceafa;
	border-radius: 50%;
	background: #edf7ff;
	color: var(--sp-link);
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	transition: background .25s ease, border-color .25s ease, color .25s ease, box-shadow .25s ease;
}

.swanpay-flow-marker::before {
	content: counter(swanpay-flow);
}

.swanpay-flow-step.is-current > .swanpay-flow-marker {
	border-color: var(--sp-ink);
	background: var(--sp-ink);
	color: #fff;
	box-shadow: 0 0 0 5px #59b5f72e;
}

.swanpay-flow-step.is-complete > .swanpay-flow-marker {
	border-color: transparent;
	background: linear-gradient(135deg, var(--sp-aqua), var(--sp-blue));
	color: var(--sp-ink);
}

.swanpay-flow-step.is-complete > .swanpay-flow-marker::before {
	content: '';
	width: 11px;
	height: 5px;
	border: solid currentColor;
	border-width: 0 0 2px 2px;
	transform: translateY(-1px) rotate(-45deg);
}

.swanpay-flow-body {
	min-width: 0;
	padding-top: 6px;
}

.swanpay-flow-body > :last-child {
	margin-bottom: 0;
}

.swanpay-flow-title {
	margin: 0 0 6px;
	color: var(--sp-ink);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
}

.swanpay-flow-body p {
	color: var(--sp-muted);
}

@keyframes swanpay-rise {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
	.swanpay-flow-step,
	.swanpay-flow-marker {
		animation: none;
		transition: none;
	}
}
