/* Pricing table. Inherits the theme's fonts and colors; borders use a neutral tint. */
.qkw-pricing {
	--qkw-border: rgba(127, 127, 127, 0.3);
	--qkw-tint: rgba(127, 127, 127, 0.15);
	margin: 1.5em 0;
}

.qkw-pricing [hidden] {
	display: none !important;
}

.qkw-pricing__toggle {
	display: inline-flex;
	gap: 2px;
	padding: 3px;
	margin-bottom: 1.25em;
	border: 1px solid var(--qkw-border);
	border-radius: 999px;
}

.qkw-pricing__toggle button {
	padding: 0.4em 1.1em;
	border: 0;
	border-radius: 999px;
	background: none;
	color: inherit;
	font: inherit;
	cursor: pointer;
}

.qkw-pricing__toggle button[aria-pressed="true"] {
	background: var(--qkw-tint);
	font-weight: 600;
}

.qkw-pricing__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
	gap: 1.25em;
}

.qkw-pricing__card {
	display: flex;
	flex-direction: column;
	gap: 0.75em;
	padding: 1.5em;
	border: 1px solid var(--qkw-border);
	border-radius: 12px;
}

.qkw-pricing__card.is-featured {
	border: 2px solid currentColor;
}

.qkw-pricing__name,
.qkw-pricing__desc,
.qkw-pricing__price,
.qkw-pricing__trial {
	margin: 0;
}

.qkw-pricing__name {
	font-size: 1.25em;
}

.qkw-pricing__desc,
.qkw-pricing__trial {
	opacity: 0.8;
}

.qkw-pricing__price {
	font-size: 2em;
	font-weight: 700;
	line-height: 1.15;
}

.qkw-pricing__interval {
	margin-left: 0.2em;
	font-size: 0.45em;
	font-weight: 400;
	opacity: 0.75;
}

.qkw-pricing__trial {
	font-size: 0.9em;
}

.qkw-pricing__features {
	flex: 1;
	margin: 0;
	padding: 0;
	list-style: none;
}

.qkw-pricing__features li {
	position: relative;
	padding: 0.3em 0 0.3em 1.4em;
}

.qkw-pricing__features li::before {
	content: "✓";
	position: absolute;
	left: 0;
}

.qkw-pricing__cta .button {
	width: 100%;
	text-align: center;
}

.qkw-admin-error {
	padding: 0.75em 1em;
	border-left: 4px solid #d63638;
	background: rgba(214, 54, 56, 0.08);
}

.qkw-pricing__price--product {
	font-size: 1.5em;
}

.qkw-pricing__details {
	flex: 1;
}

.qkw-pricing__details > :first-child {
	margin-top: 0;
}

.qkw-plan {
	display: block;
	font-size: 0.6em;
	font-weight: 400;
	opacity: 0.75;
}

/* Buy Now */
.qkw-buy-now {
	margin-left: 0.5em;
}

.qkw-buy.is-busy {
	opacity: 0.6;
	cursor: progress;
}

.qkw-error {
	margin: 0.5em 0 0;
	color: #d63638;
	font-size: 0.875em;
}

/* Side cart */
.qkw-cart {
	--qkw-cart-bg: #fff;
	--qkw-cart-text: #1d2327;
	--qkw-cart-line: rgba(0, 0, 0, 0.1);
}

.qkw-cart--dark {
	--qkw-cart-bg: #1d1f23;
	--qkw-cart-text: #f0f0f1;
	--qkw-cart-line: rgba(255, 255, 255, 0.12);
}

.qkw-cart [hidden] {
	display: none !important;
}

.qkw-cart__toggle {
	position: fixed;
	right: 20px;
	bottom: calc(20px + env(safe-area-inset-bottom, 0px));
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--qkw-cart-text);
	color: var(--qkw-cart-bg);
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
	cursor: pointer;
}

.qkw-cart__count {
	position: absolute;
	top: -2px;
	right: -2px;
	min-width: 22px;
	height: 22px;
	padding: 0 6px;
	border-radius: 11px;
	background: #d63638;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 22px;
	text-align: center;
}

.qkw-cart__backdrop {
	position: fixed;
	inset: 0;
	z-index: 99991;
	background: rgba(0, 0, 0, 0.45);
}

.qkw-cart__panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	z-index: 99992;
	display: flex;
	flex-direction: column;
	width: min(420px, 100vw);
	background: var(--qkw-cart-bg);
	color: var(--qkw-cart-text);
	box-shadow: -8px 0 30px rgba(0, 0, 0, 0.18);
	animation: qkw-slide-in 0.25s ease-out;
}

.qkw-cart__panel.is-busy {
	opacity: 0.7;
	pointer-events: none;
}

@keyframes qkw-slide-in {
	from {
		transform: translateX(100%);
	}
	to {
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.qkw-cart__panel {
		animation: none;
	}
}

html.qkw-cart-open {
	overflow: hidden;
}

.qkw-cart__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--qkw-cart-line);
}

.qkw-cart__title {
	margin: 0;
	font-size: 1.15em;
	color: inherit;
}

.qkw-cart__close {
	padding: 0 6px;
	border: 0;
	background: none;
	color: inherit;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
}

.qkw-cart__items {
	flex: 1;
	overflow-y: auto;
	padding: 8px 20px;
}

.qkw-cart__empty {
	margin: 2em 0;
	text-align: center;
	opacity: 0.7;
}

.qkw-cart__item {
	display: grid;
	grid-template-columns: 64px 1fr auto;
	gap: 12px;
	align-items: start;
	padding: 14px 0;
	border-bottom: 1px solid var(--qkw-cart-line);
}

.qkw-cart__image {
	width: 64px;
	height: 64px;
	border-radius: 8px;
	object-fit: cover;
}

.qkw-cart__info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.qkw-cart__name {
	font-weight: 600;
	line-height: 1.3;
}

.qkw-cart__meta {
	font-size: 0.8em;
	opacity: 0.7;
}

.qkw-cart__controls {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-top: 4px;
}

.qkw-cart__qty {
	display: inline-flex;
	align-items: center;
	border: 1px solid var(--qkw-cart-line);
	border-radius: 8px;
}

.qkw-cart__qty button {
	width: 30px;
	height: 30px;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: 16px;
	cursor: pointer;
}

.qkw-cart__qty button:disabled {
	opacity: 0.35;
	cursor: default;
}

.qkw-cart__qty span {
	min-width: 24px;
	text-align: center;
	font-size: 0.9em;
}

.qkw-cart__remove {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: 0.8em;
	text-decoration: underline;
	opacity: 0.7;
	cursor: pointer;
}

.qkw-cart__price {
	font-weight: 600;
	white-space: nowrap;
}

.qkw-cart__footer {
	padding: 18px 20px calc(18px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--qkw-cart-line);
}

.qkw-cart__total {
	display: flex;
	justify-content: space-between;
	font-size: 1.1em;
}

.qkw-cart__note {
	margin: 4px 0 14px;
	font-size: 0.8em;
	opacity: 0.7;
}

.qkw-cart__pay {
	display: block;
	width: 100%;
	min-height: 48px;
	border-radius: 8px;
	font-weight: 600;
}

.qkw-cart__checkout {
	display: block;
	margin-top: 10px;
	color: inherit;
	font-size: 0.875em;
	text-align: center;
	opacity: 0.8;
}

@media (max-width: 480px) {
	.qkw-cart__toggle {
		right: 14px;
		bottom: calc(14px + env(safe-area-inset-bottom, 0px));
		width: 52px;
		height: 52px;
	}

	.qkw-cart__item {
		grid-template-columns: 52px 1fr auto;
	}

	.qkw-cart__image {
		width: 52px;
		height: 52px;
	}
}

.qkw-cart__error {
	margin: 12px 20px 0;
	padding: 10px 12px;
	border-radius: 8px;
	background: rgba(214, 54, 56, 0.1);
	color: #d63638;
	font-size: 0.875em;
}

.qkw-cart__loading {
	margin: 2em 0;
	text-align: center;
	opacity: 0.6;
}
