/**
 * Pricing table.
 */

.crk-pricing {
	/* Wide enough for three cards; two of them side by side reads as a choice
	   between two things, which is not the choice being offered. */
	max-width: 1180px;
	margin-left: auto;
	margin-right: auto;
	--crk-ink: var(--wp--preset--color--ink, #122948);
	--crk-brand: var(--wp--preset--color--brand, #48769e);
	--crk-line: rgba(18, 41, 72, .14);
	text-align: center;
}

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

/* ------------------------------------------------------------- the switch */

.crk-pricing__switch {
	display: inline-flex;
	gap: 4px;
	padding: 5px;
	border-radius: 999px;
	background: rgba(18, 41, 72, .06);
	border: 1px solid var(--crk-line);
	margin-bottom: 14px;
}

.crk-pricing__switch button {
	appearance: none;
	border: 0;
	background: none;
	border-radius: 999px;
	padding: 9px 20px;
	font-size: .92rem;
	font-weight: 600;
	color: var(--crk-ink);
	opacity: .7;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	transition: background .15s ease, opacity .15s ease, color .15s ease;
}

.crk-pricing__switch button:hover {
	opacity: 1;
}

.crk-pricing__switch button.is-active {
	background: var(--crk-ink);
	color: #fff;
	opacity: 1;
}

.crk-pricing__save {
	font-size: .72rem;
	font-weight: 700;
	letter-spacing: .02em;
	text-transform: uppercase;
	padding: 2px 8px;
	border-radius: 999px;
	background: #2f7d5d;
	color: #fff;
}

.crk-pricing__hint {
	margin: 0 0 8px;
	font-size: .88rem;
	color: var(--crk-brand);
	font-weight: 600;
}

/* -------------------------------------------------------------- the cards */

.crk-pricing__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 20px;
	margin-top: 26px;
	text-align: left;
}

.crk-plan {
	position: relative;
	padding: 26px 24px;
	border-radius: 14px;
	border: 1px solid var(--crk-line);
	background: #fff;
	display: flex;
	flex-direction: column;
}

/*
 * The cards used to be height:100% inside a grid told to align items to the
 * start — so each card claimed the full row height while the row was only as
 * tall as its content, and the overflow ran straight through the line of text
 * underneath. Letting the grid stretch them is both simpler and correct.
 */

/*
 * The recommended plan is raised rather than merely tinted — at a glance the
 * eye should land on it without reading a word.
 */
.crk-plan--featured {
	border-color: var(--crk-ink);
	box-shadow: 0 16px 44px rgba(18, 41, 72, .16);
	transform: translateY(-6px);
}

.crk-plan__flag {
	position: absolute;
	top: -11px;
	left: 24px;
	font-size: .7rem;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--crk-ink);
	color: #fff;
}

.crk-plan h3 {
	margin: 0 0 4px;
	font-size: 1.3rem;
}

.crk-plan__tagline {
	margin: 0 0 16px;
	font-size: .88rem;
	opacity: .7;
}

.crk-plan__price {
	margin: 0 0 18px;
	display: flex;
	align-items: baseline;
	gap: 8px;
	flex-wrap: wrap;
}

.crk-plan__amount {
	font-size: 2.6rem;
	font-weight: 700;
	line-height: 1;
	color: var(--crk-ink);
}

.crk-plan__per {
	font-size: .82rem;
	opacity: .65;
}

.crk-plan__lines {
	list-style: none;
	margin: 0 0 22px;
	padding: 0;
	flex: 1 1 auto;
}

.crk-plan__lines li {
	position: relative;
	padding: 0 0 9px 22px;
	font-size: .9rem;
	line-height: 1.55;
}

.crk-plan__lines li::before {
	content: "✓";
	position: absolute;
	left: 0;
	color: #2f7d5d;
	font-weight: 700;
}

.crk-plan__cta {
	display: block;
	width: 100%;
	appearance: none;
	border: 1px solid var(--crk-ink);
	background: none;
	color: var(--crk-ink);
	border-radius: 10px;
	padding: 13px 20px;
	font-size: .95rem;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background .15s ease, color .15s ease;
	box-sizing: border-box;
}

.crk-plan__cta:hover {
	background: var(--crk-ink);
	color: #fff;
}

.crk-plan__cta--strong {
	background: var(--crk-ink);
	color: #fff;
}

.crk-plan__cta--strong:hover {
	background: var(--crk-brand);
	border-color: var(--crk-brand);
	color: #fff;
}

.crk-plan__cta--quiet {
	border-color: var(--crk-line);
	opacity: .85;
}

.crk-pricing__foot {
	margin: 26px 0 0;
	font-size: .82rem;
	opacity: .65;
}

.crk-pricing__none {
	padding: 30px;
	opacity: .7;
}

@media (max-width: 781px) {
	.crk-plan--featured { transform: none; }
}

/* A plan priced by conversation rather than by a number. */
.crk-plan__amount--word {
	font-size: 1.9rem;
}

/* A paid plan whose price Stripe will not confirm. Never shown as free. */
.crk-plan__amount--none {
	opacity: .35;
}

.crk-plan__cta--off {
	cursor: default;
	opacity: .55;
}

.crk-plan__cta--off:hover {
	background: none;
	color: var(--crk-ink);
}
