/**
 * Plus paywall — card design.
 *
 * Hand-written, scoped under `.btc-echo-plus-paywall` because the theme has
 * no Tailwind build step (assets/css/styles.css is compiled elsewhere and
 * committed), so new utility classes wouldn't exist in the bundle. Everything
 * the redesigned paywall needs that isn't already in styles.css lives here.
 *
 * Rendered by btce_display_plus_wall() in inc/template-tags.php and the
 * template-parts/paywall-payment-methods.php partial.
 *
 * Layout strategy (mobile-first):
 *   - base (≤ 639px) = "Variant B": cards stack vertically, each card is a
 *     compact row (price block left, CTA right). The featured card (badge
 *     set) is pulled to the top via `order`.
 *   - ≥ 640px (Tailwind `sm`) = cards sit side by side, content stacked
 *     vertically and centred, CTA pinned to the bottom edge.
 *
 * @package BTC-ECHO_3.0_TW
 */

.btc-echo-plus-paywall {
	--btce-pw-accent: #f7a63c;
	--btce-pw-accent-hover: #e8951f;
	--btce-pw-card-bg: #ffffff;
	--btce-pw-card-border: #e5e7eb;
	--btce-pw-text: #1f2937;
	--btce-pw-muted: #6b7280;
	--btce-pw-cta-text: #1c1917;
}

/* ---- Header icon: lock mark centred over a concentric-circles backdrop ---- */
.btc-echo-plus-paywall .btce-pw-icon {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: 130px;
	margin-bottom: 0.25rem;
	overflow: hidden;
}

.btc-echo-plus-paywall .btce-pw-icon__bg {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 300px;
	height: 300px;
	max-width: none;
	transform: translate(-50%, -50%);
	pointer-events: none;
}

.btc-echo-plus-paywall .btce-pw-icon__mark {
	position: relative;
	z-index: 1;
	width: 56px;
	height: 56px;
}

/* ---- Features list: centre the group, keep ticks left-aligned ---- */
.btc-echo-plus-paywall .btce-pw-features {
	width: -moz-fit-content;
	width: fit-content;
	margin-inline: auto;
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.btc-echo-plus-paywall .btce-pw-features__icon {
	display: block;
	width: 22px;
	height: 22px;
	flex-shrink: 0;
}

/* ---- Cards container ---- */
.btc-echo-plus-paywall .btce-pw-cards {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	padding-top: 1rem; /* room for the "Sehr beliebt!" badge sitting above the featured card */
}

/* ---- Single card (base = mobile compact row) ---- */
.btc-echo-plus-paywall .btce-pw-card {
	position: relative;
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 1.25rem;
	background: var(--btce-pw-card-bg);
	border: 1px solid var(--btce-pw-card-border);
	border-radius: 0.75rem;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.btc-echo-plus-paywall .btce-pw-card--featured {
	/* The featured card is always white, so keep its text dark even in dark
	 * mode (the variables cascade to the card's children). */
	--btce-pw-text: #1f2937;
	--btce-pw-muted: #6b7280;
	border: 2px solid rgba(255, 156, 41, 0.35);
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 4px 12px 0 rgba(255, 156, 41, 0.35), 0 12px 16px -4px rgba(0, 0, 0, 0.08);
	order: -1; /* pull the recommended card to the top on mobile */
}

/* ---- Badge: hand-drawn arrow + "Sehr beliebt!" above the featured card ----
 * Base (mobile) keeps the group inside the card's right edge so it never
 * overflows the viewport. The desktop media query repositions it to the
 * top-right corner with the label spilling outward, matching the mockup. */
.btc-echo-plus-paywall .btce-pw-card__badge {
	position: absolute;
	bottom: calc(100% - 14px);
	right: 0.75rem;
	display: flex;
	align-items: start;
	gap: 0.25rem;
	z-index: 3;
	pointer-events: none;
}

.btc-echo-plus-paywall .btce-pw-card__badge-arrow {
	display: block;
	width: 38px;
	height: auto;
	flex-shrink: 0;
}

.btc-echo-plus-paywall .btce-pw-card__badge-text {
	color: #163724;
	font-weight: 700;
	font-size: 0.9375rem;
	line-height: 1;
	white-space: nowrap;
	margin-top: -0.375rem;
}

/* ---- Card body (title + price) ---- */
.btc-echo-plus-paywall .btce-pw-card__body {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.125rem;
	min-width: 0;
}

.btc-echo-plus-paywall .btce-pw-card__title {
	font-weight: 600;
	font-size: 1rem;
	color: var(--btce-pw-text);
}

.btc-echo-plus-paywall .btce-pw-card__price-block {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	line-height: 1.15;
}

.btc-echo-plus-paywall .btce-pw-card__price-prefix,
.btc-echo-plus-paywall .btce-pw-card__price-note {
	font-size: 0.8125rem;
	color: var(--btce-pw-muted);
}

.btc-echo-plus-paywall .btce-pw-card__price {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--btce-pw-text);
	white-space: nowrap;
}

/* ---- CTA button ---- */
.btc-echo-plus-paywall .btce-pw-card__cta {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.5rem 1.5rem;
	background: var(--btce-pw-accent);
	color: var(--btce-pw-cta-text);
	font-weight: 600;
	border-radius: 0.375rem;
	text-decoration: none;
	transition: background-color 0.15s ease-in-out;
}

.btc-echo-plus-paywall .btce-pw-card__cta-arrow {
	display: block;
	width: 20px;
	height: 20px;
	flex-shrink: 0;
	color: #fff; /* stroke="currentColor" → white */
	opacity: 0.6;
}

.btc-echo-plus-paywall .btce-pw-card__cta:hover,
.btc-echo-plus-paywall .btce-pw-card__cta:focus {
	background: var(--btce-pw-accent-hover);
	color: var(--btce-pw-cta-text);
}

/* ---- Payment methods strip ---- */
.btc-echo-plus-paywall .btce-pw-payments {
	margin-top: 1.25rem;
	text-align: center;
}

.btc-echo-plus-paywall .btce-pw-payments__label {
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--btce-pw-muted);
	margin-bottom: 0.625rem;
}

.btc-echo-plus-paywall .btce-pw-payments__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
}

.btc-echo-plus-paywall .btce-pw-payments__item {
	margin: 0;
	padding: 0;
	line-height: 0;
}

.btc-echo-plus-paywall .btce-pw-payments__icon {
	display: block;
	height: 26px;
	width: auto;
	border-radius: 4px;
	box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.08);
}

/* ---- Login line ---- */
.btc-echo-plus-paywall .btce-pw-login {
	color: var(--btce-pw-text);
}

/* =====================================================================
 * Desktop ≥ 640px: cards side by side, vertical + centred, CTA at bottom.
 * ===================================================================== */
@media (min-width: 640px) {
	.btc-echo-plus-paywall .btce-pw-cards {
		flex-direction: row;
		align-items: stretch;
		gap: 1rem;
	}

	.btc-echo-plus-paywall .btce-pw-card {
		flex: 1 1 0;
		flex-direction: column;
		align-items: center;
		justify-content: flex-start;
		gap: 0.75rem;
		padding: 1.5rem 1.25rem;
		text-align: center;
	}

	.btc-echo-plus-paywall .btce-pw-card--featured {
		order: 0; /* keep editor order on desktop */
	}

	/* Pin the arrow to the top-right corner; let "Sehr beliebt!" spill outward. */
	.btc-echo-plus-paywall .btce-pw-card__badge {
		right: auto;
		left: calc(100% - 58px);
		bottom: calc(100% - 18px);
		gap: 0.375rem;
	}

	.btc-echo-plus-paywall .btce-pw-card__badge-arrow {
		width: 50px;
	}

	.btc-echo-plus-paywall .btce-pw-card__body {
		align-items: center;
		flex: 1 1 auto;
		gap: 0.25rem;
	}

	.btc-echo-plus-paywall .btce-pw-card__price-block {
		align-items: center;
	}

	.btc-echo-plus-paywall .btce-pw-card__price {
		font-size: 2rem;
	}

	.btc-echo-plus-paywall .btce-pw-card__cta {
		width: 100%;
		margin-top: auto;
	}
}

/* =====================================================================
 * Dark mode (class strategy: `.dark` ancestor, matching the theme).
 * ===================================================================== */
.dark .btc-echo-plus-paywall {
	--btce-pw-card-bg: #111827;
	--btce-pw-card-border: #374151;
	--btce-pw-text: #f3f4f6;
	--btce-pw-muted: #9ca3af;
}

.dark .btc-echo-plus-paywall .btce-pw-card:not(.btce-pw-card--featured) {
	box-shadow: none;
}

.dark .btc-echo-plus-paywall .btce-pw-payments__icon {
	box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12);
}
