/**
 * choPOS Paddle — receipt, account and payment pages.
 * Uses the theme's own custom properties, with fallbacks for other themes.
 */

.storepos-order,
.storepos-account,
.storepos-paddle-checkout {
	--sp-ink: var(--ink, #0a1b33);
	--sp-muted: var(--muted, #61728c);
	--sp-line: var(--line, #e3eaf4);
	--sp-soft: var(--bg-soft, #f5f8fd);
	--sp-blue: var(--blue, #0076fe);
	--sp-navy: var(--navy-900, #011e46);
	--sp-mint: var(--mint-700, #00a97c);
	--sp-radius: var(--radius, 16px);

	max-width: 860px;
	margin-inline: auto;
	color: var(--sp-ink);
}

[data-storepos-plan].is-loading {
	opacity: .7;
	pointer-events: none;
}

/* --- Confirmation header ------------------------------------------------ */

.storepos-order-head {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	margin-bottom: 28px;
}

.storepos-order-head h2 {
	margin: 0 0 6px;
	font-size: clamp(1.35rem, 3vw, 1.75rem);
	line-height: 1.2;
	letter-spacing: -.02em;
}

.storepos-order-head p {
	margin: 0;
	color: var(--sp-muted);
	line-height: 1.6;
}

.storepos-tick {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	background: rgba(0, 169, 124, .12);
	color: var(--sp-mint);
}

.storepos-tick svg {
	width: 24px;
	height: 24px;
}

.storepos-tick--wait {
	background: rgba(0, 118, 254, .1);
	color: var(--sp-blue);
}

/* --- Licence key -------------------------------------------------------- */

.storepos-keycard {
	padding: 22px 24px;
	margin-bottom: 28px;
	background: var(--sp-soft);
	border: 1px dashed var(--sp-blue);
	border-radius: var(--sp-radius);
}

.storepos-keycard-label {
	margin: 0 0 10px;
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .08em;
	text-transform: uppercase;
	color: var(--sp-muted);
}

.storepos-keyrow {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

.storepos-key {
	flex: 1 1 260px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: clamp(1rem, 2.4vw, 1.2rem);
	font-weight: 700;
	letter-spacing: .06em;
	color: var(--sp-navy);
	word-break: break-all;
}

.storepos-copy {
	flex: 0 0 auto;
}

.storepos-copy.is-copied {
	background: var(--sp-mint);
	border-color: var(--sp-mint);
	color: #fff;
}

/* --- Panels ------------------------------------------------------------- */

.storepos-order-grid {
	display: grid;
	gap: 20px;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.storepos-panel {
	padding: 24px;
	background: #fff;
	border: 1px solid var(--sp-line);
	border-radius: var(--sp-radius);
	box-shadow: var(--shadow-sm, 0 1px 2px rgba(1, 30, 70, .06));
}

.storepos-panel--quiet {
	background: var(--sp-soft);
	box-shadow: none;
}

.storepos-panel h2,
.storepos-panel h3 {
	margin: 0 0 16px;
	font-size: 1.05rem;
	letter-spacing: -.01em;
}

.storepos-panel-lede {
	margin: -8px 0 20px;
	color: var(--sp-muted);
	line-height: 1.6;
}

/* --- Summary list ------------------------------------------------------- */

.storepos-summary {
	margin: 0 0 20px;
}

.storepos-summary > div {
	display: flex;
	justify-content: space-between;
	gap: 16px;
	padding: 11px 0;
	border-bottom: 1px solid var(--sp-line);
}

.storepos-summary > div:first-child {
	border-top: 1px solid var(--sp-line);
}

.storepos-summary dt {
	color: var(--sp-muted);
	font-size: .95rem;
}

.storepos-summary dd {
	margin: 0;
	font-weight: 600;
	text-align: right;
}

.storepos-summary-total dt,
.storepos-summary-total dd {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--sp-ink);
}

/* --- Steps -------------------------------------------------------------- */

.storepos-steps {
	list-style: none;
	margin: 0 0 20px;
	padding: 0;
}

.storepos-steps li {
	display: flex;
	gap: 14px;
	padding: 0 0 18px;
}

.storepos-steps li:last-child {
	padding-bottom: 0;
}

.storepos-step-n {
	flex: 0 0 auto;
	display: grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--sp-blue);
	color: #fff;
	font-size: .85rem;
	font-weight: 700;
}

.storepos-steps strong {
	display: block;
	margin-bottom: 3px;
}

.storepos-steps p {
	margin: 0;
	color: var(--sp-muted);
	font-size: .95rem;
	line-height: 1.55;
}

/* --- Actions and small links -------------------------------------------- */

.storepos-order-actions,
.storepos-licence-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: center;
	margin: 0;
}

.storepos-linkbtn {
	padding: 0;
	background: none;
	border: 0;
	color: var(--sp-blue);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
}

.storepos-linkbtn:hover {
	text-decoration: underline;
}

.storepos-linkbtn--quiet {
	color: var(--sp-muted);
	font-weight: 500;
}

.storepos-order-foot {
	margin: 28px 0 0;
	padding-top: 20px;
	border-top: 1px solid var(--sp-line);
	color: var(--sp-muted);
	font-size: .95rem;
	line-height: 1.65;
}

.storepos-order--empty {
	text-align: center;
	padding: 8px 0 0;
}

.storepos-order--empty p {
	color: var(--sp-muted);
	line-height: 1.65;
}

.storepos-order--empty .storepos-order-actions {
	justify-content: center;
	margin-top: 20px;
}

/* --- Account ------------------------------------------------------------ */

.storepos-account-bar {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 18px;
	margin-bottom: 26px;
	border-bottom: 1px solid var(--sp-line);
}

.storepos-account-who {
	margin: 0;
	color: var(--sp-muted);
	font-size: .95rem;
}

.storepos-account-who strong {
	color: var(--sp-ink);
}

.storepos-section-title {
	margin: 0 0 16px;
	font-size: 1.15rem;
	letter-spacing: -.01em;
}

.storepos-licences {
	display: grid;
	gap: 18px;
	margin-bottom: 26px;
}

.storepos-licence {
	padding: 24px;
	background: #fff;
	border: 1px solid var(--sp-line);
	border-radius: var(--sp-radius);
	box-shadow: var(--shadow-sm, 0 1px 2px rgba(1, 30, 70, .06));
}

.storepos-licence-head {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	justify-content: space-between;
	margin-bottom: 18px;
}

.storepos-licence-head h3 {
	margin: 0 0 4px;
	font-size: 1.2rem;
	letter-spacing: -.01em;
}

.storepos-licence-sub {
	margin: 0;
	color: var(--sp-muted);
	font-size: .9rem;
}

.storepos-status {
	flex: 0 0 auto;
	padding: 5px 11px;
	border-radius: 999px;
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .02em;
	background: rgba(97, 114, 140, .12);
	color: var(--sp-muted);
}

.storepos-status--active {
	background: rgba(0, 169, 124, .14);
	color: var(--sp-mint);
}

.storepos-status--past_due {
	background: rgba(214, 69, 69, .12);
	color: #c23b3b;
}

.storepos-licence .storepos-keyrow {
	padding: 14px 16px;
	margin-bottom: 18px;
	background: var(--sp-soft);
	border-radius: var(--radius-sm, 10px);
}

.storepos-licence .storepos-key {
	font-size: 1rem;
}

.storepos-facts {
	display: grid;
	gap: 14px;
	grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
	margin: 0 0 18px;
	padding: 16px 0;
	border-block: 1px solid var(--sp-line);
}

.storepos-facts dt {
	margin-bottom: 3px;
	color: var(--sp-muted);
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.storepos-facts dd {
	margin: 0;
	font-weight: 600;
}

.storepos-sites {
	margin: 0 0 18px;
}

.storepos-sites h4 {
	margin: 0 0 6px;
	color: var(--sp-muted);
	font-size: .8rem;
	font-weight: 600;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.storepos-sites ul {
	margin: 0;
	padding: 0;
	list-style: none;
}

.storepos-sites li {
	display: flex;
	gap: 12px;
	align-items: center;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid var(--sp-line);
}

.storepos-sites li:last-child {
	border-bottom: 0;
}

.storepos-site-name {
	overflow-wrap: anywhere;
}

.storepos-site-name em {
	margin-left: 6px;
	color: var(--sp-muted);
	font-size: .85rem;
	font-style: normal;
}

.storepos-sites form {
	flex-shrink: 0;
	margin: 0;
}

.storepos-signin-form {
	max-width: 420px;
}

.storepos-fineprint {
	margin: 18px 0 0;
	color: var(--sp-muted);
	font-size: .9rem;
	line-height: 1.6;
}

.storepos-notice {
	margin-bottom: 22px;
}

/* --- Payment link page --------------------------------------------------- */

.storepos-paddle-checkout {
	text-align: center;
	padding: 8px 0 0;
}

.storepos-paddle-checkout p {
	color: var(--sp-muted);
	line-height: 1.65;
}

@media (max-width: 600px) {
	.storepos-order-head,
	.storepos-licence-head {
		flex-direction: column;
	}

	.storepos-summary > div {
		flex-direction: column;
		gap: 2px;
	}

	.storepos-summary dd {
		text-align: left;
	}
}
