/* Buy-page package picker - markup from common/pkg-picker.php */

.pkgp-card {
	--pkgp-accent: #7b2fd9;
	--pkgp-edge: #34008d;
	--pkgp-border: #e2dcec;
	--pkgp-text: #16131d;
	--pkgp-muted: #6b6677;
	--pkgp-price: #3f7d2c;
	--pkgp-badge: #823af0;
	--pkgp-cta: #1a73e7;

	max-width: 520px;
	margin: 24px auto 0;
	padding: 24px 20px 0;
	background: #faf8fe;
	border: 1px solid var(--pkgp-border);
	border-radius: 20px;
	overflow: hidden;
	font-family: "Inter", sans-serif;
	color: var(--pkgp-text);
	text-align: left;
}

.pkgp-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.pkgp-tile {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto;
	align-items: baseline;
	row-gap: 2px;
	padding: 20px 16px 16px;
	background: #fff;
	border: 1px solid var(--pkgp-border);
	border-radius: 14px;
	color: var(--pkgp-text);
	text-decoration: none;
	cursor: pointer;
	transition: border-color .15s, background-color .15s;
	-webkit-tap-highlight-color: transparent;
}

.pkgp-tile:hover { border-color: #c9b8ea; color: var(--pkgp-text); text-decoration: none; }

.pkgp-tile.is-selected,
.pkgp-tile.is-selected:hover {
	background: var(--pkgp-accent);
	border-color: var(--pkgp-edge);
	box-shadow: 0 0 0 1px var(--pkgp-edge); /* 2px border without shifting the layout */
	color: #fff;
}

.pkgp-tile.is-selected .pkgp-price,
.pkgp-tile.is-selected .pkgp-unit { color: #fff; }

.pkgp-tile:focus-visible { outline: 2px solid var(--pkgp-accent); outline-offset: 2px; }

.pkgp-tile.is-extra { display: none; }
.pkgp.is-expanded .pkgp-tile.is-extra { display: grid; }

.pkgp-qty {
	font-size: 31px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: -.01em;
}

.pkgp-price {
	grid-row: 1;
	grid-column: 2;
	font-size: 17px;
	font-weight: 500;
	color: var(--pkgp-price);
}

.pkgp-tile .pkgp-unit {
	grid-column: 1 / -1;
	font-size: 15px;
	color: var(--pkgp-muted);
}

.pkgp-unit { text-transform: lowercase; }

.pkgp-badge {
	position: absolute;
	top: -11px;
	left: 12px;
	padding: 3px 10px;
	background: var(--pkgp-badge);
	border-radius: 999px;
	color: #fff;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .04em;
	line-height: 16px;
	text-transform: uppercase;
	white-space: nowrap;
}

.pkgp-more {
	display: block;
	margin: 16px auto 0;
	padding: 4px 8px;
	background: none;
	border: 0;
	color: var(--pkgp-accent);
	font: inherit;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
}

.pkgp-more:hover { text-decoration: underline; }
.pkgp.is-expanded .pkgp-more { display: none; }

.pkgp-summary {
	margin-top: 16px;
	padding: 16px 0 20px;
	border-top: 1px solid var(--pkgp-border);
}

.pkgp-continue {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 15px 20px;
	background: var(--pkgp-cta);
	border-radius: 12px;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	text-transform: uppercase;
	text-decoration: none;
	transition: background-color .15s;
}

.pkgp-arrow { width: 22px; height: 22px; fill: currentColor; }

.pkgp-continue:hover { background: #1765cc; color: #fff; text-decoration: none; }
.pkgp-continue.is-loading { opacity: .7; pointer-events: none; }

/* Premium tier follows the orange of its tier box. */
.pkgp[data-pkgs="2"] {
	--pkgp-accent: #e35000;
	--pkgp-edge: #ff6a00;
}

/* Trust footer */

.pkgp-trust { margin: 0 -20px; border-top: 1px solid var(--pkgp-border); }

.pkgp-trust svg:not([role]) {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.6;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.pkgp-paywith {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 5px;
	padding: 14px 12px;
	background: #fff;
	color: var(--pkgp-muted);
	font-size: 12px;
}

.pkgp-paywith-label {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-right: 3px;
	white-space: nowrap;
}

.pkgp-paywith-label svg { width: 14px; height: 14px; }

.pkgp-pay {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 24px;
	min-width: 38px;
	padding: 0 5px;
	background: #fff;
	border: 1px solid var(--pkgp-border);
	border-radius: 5px;
}

.pkgp-pay img, .pkgp-pay svg { display: block; height: auto; max-height: 15px; }
.pkgp-pay-dark { background: #000; border-color: #000; }
.pkgp-pay-dark img { filter: invert(1); max-height: 13px; }
.pkgp-pay-badge { padding: 0; overflow: hidden; }
.pkgp-pay-badge img { width: 36px; max-height: none; }

.pkgp-features {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 16px 20px;
	background: #f7f8fb;
	border-top: 1px solid var(--pkgp-border);
	list-style: none;
}

.pkgp-features li {
	display: flex;
	align-items: flex-start;
	justify-content: center;
	gap: 8px;
	margin: 0;
	color: var(--pkgp-muted);
	font-size: 12px;
	line-height: 1.35;
}

.pkgp-features svg { margin-top: 1px; color: #8a8594; }
.pkgp-features strong { display: block; color: var(--pkgp-text); font-weight: 600; }

@media (max-width: 420px) {
	.pkgp-card { padding: 18px 16px 0; }
	.pkgp-trust { margin: 0 -16px; }
	.pkgp-features { padding: 14px 8px; gap: 4px; }
	.pkgp-features li { flex-direction: column; align-items: center; text-align: center; gap: 4px; }
}

@media (max-width: 380px) {
	.pkgp-card { padding: 16px 14px 0; }
	.pkgp-trust { margin: 0 -14px; }
	.pkgp-grid { gap: 10px; }
	.pkgp-tile { padding: 18px 12px 14px; }
	.pkgp-qty { font-size: 27px; }
	.pkgp-price { font-size: 15px; }
	.pkgp-paywith-label { flex-basis: 100%; justify-content: center; margin: 0 0 4px; }
}

/* Desktop: line up under the left-aligned tier selector. */
@media only screen and (min-width: 768px) {
	.pkgp-card { max-width: 537px; margin: 24px 0 0; }
}

/* Breathing room under the card, inside the section so it keeps the section's background. */
.packages-section:has(.pkgp-card) { padding-bottom: 32px; }

@media only screen and (min-width: 768px) {
	.packages-section:has(.pkgp-card) { padding-bottom: 56px; }
}

/* Selection feedback: a short spring, one light sweep, and a single ripple from the CTA. */
.pkgp-tile::after {
	content: "";
	position: absolute;
	inset: 0;
	border-radius: inherit;
	background: linear-gradient(105deg, transparent 35%, rgba(255, 255, 255, .38) 50%, transparent 65%) no-repeat;
	background-size: 250% 100%;
	background-position: 150% 0;
	opacity: 0;
	pointer-events: none;
}

.pkgp-tile.is-pop { animation: pkgp-pop .42s cubic-bezier(.34, 1.56, .64, 1); }
.pkgp-tile.is-pop::after { animation: pkgp-sheen .7s ease-out .05s; }
.pkgp-continue.is-ready { animation: pkgp-ripple .9s ease-out; }

@keyframes pkgp-pop {
	0%   { transform: scale(.97); }
	100% { transform: scale(1); }
}

@keyframes pkgp-sheen {
	0%   { opacity: 1; background-position: 150% 0; }
	100% { opacity: 1; background-position: -50% 0; }
}

@keyframes pkgp-ripple {
	0%   { box-shadow: 0 0 0 0 rgba(26, 115, 231, .45); }
	100% { box-shadow: 0 0 0 12px rgba(26, 115, 231, 0); }
}

@media (prefers-reduced-motion: reduce) {
	.pkgp-tile.is-pop,
	.pkgp-tile.is-pop::after,
	.pkgp-continue.is-ready { animation: none; }
}
