/* ===================================================================
   Package Price Calculator — [package_price_calculator] shortcode.
   Reuses the site's existing design tokens/utilities (--space-*,
   --radius-*, --brand-*, .card-rhythm, .eyebrow) rather than
   introducing a new palette. Pill selector pattern (hidden radio +
   sibling label) mirrors assets/memorial-comments.css's guestbook
   relationship pills, but under its own class names/tokens since the
   guestbook's --nlf-gold/--nlf-ink tokens are scoped to its own
   cream sub-theme and shouldn't leak in here.
   =================================================================== */

.nlf-price-calc {
	max-width: 640px;
	margin: 0 auto;
}

.nlf-calc-field {
	border: 0;
	margin: 0 0 var(--space-5) 0;
	padding: 0;
}

.nlf-calc-field[hidden] {
	display: none;
}

.nlf-calc-field legend {
	margin-bottom: var(--space-2);
}

/* --- Pill selectors --------------------------------------------------- */
.nlf-calc-pill-group {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-2);
}

.nlf-calc-pill-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.nlf-calc-pill {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: var(--space-2) var(--space-4);
	border: var(--border-width) solid var(--border-default);
	border-radius: var(--radius-sm);
	color: var(--text-secondary);
	font-size: 14px;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, color .15s ease;
}

.nlf-calc-pill:hover {
	border-color: var(--border-gold);
}

.nlf-calc-pill-input:checked + .nlf-calc-pill {
	background: var(--brand-accent);
	border-color: var(--brand-accent);
	color: var(--text-on-gold);
}

.nlf-calc-pill-input:focus-visible + .nlf-calc-pill {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}

/* --- Tier cards (Catholic/Christian/No Religious Rites only) ----------- */
.nlf-calc-tier-group {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: var(--space-3);
}

.nlf-calc-tier-card-input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.nlf-calc-tier-card {
	display: flex;
	flex-direction: column;
	border: var(--border-width) solid var(--border-default);
	border-radius: var(--radius-md);
	overflow: hidden;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.nlf-calc-tier-card:hover {
	border-color: var(--border-gold);
}

.nlf-calc-tier-card-input:checked + .nlf-calc-tier-card {
	border-color: var(--brand-accent);
	box-shadow: 0 0 0 1px var(--brand-accent);
}

.nlf-calc-tier-card-input:focus-visible + .nlf-calc-tier-card {
	outline: 2px solid var(--focus-ring);
	outline-offset: 2px;
}

.nlf-calc-tier-image {
	position: relative;
	width: 100%;
	aspect-ratio: 4 / 3;
	background: var(--surface-inverse);
	overflow: hidden;
}

.nlf-calc-tier-photo {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.nlf-calc-tier-photo-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	padding: var(--space-4);
	color: var(--text-muted);
	font-size: 13px;
	text-align: center;
}

.nlf-calc-tier-name {
	padding: var(--space-3) var(--space-3) 0;
	font-weight: 600;
	color: var(--text-primary);
	font-size: 14px;
}

.nlf-calc-tier-writeup {
	margin: var(--space-1) 0 0;
	padding: 0 var(--space-3) var(--space-3);
	color: var(--text-secondary);
	font-size: 12px;
	line-height: 1.4;
}

@media (max-width: 767px) {
	.nlf-calc-tier-group {
		grid-template-columns: 1fr;
	}
}

/* --- Price display ------------------------------------------------------ */
.nlf-calc-price-display {
	margin: var(--space-6) 0;
	padding-top: var(--space-5);
	border-top: var(--border-width) solid var(--border-subtle);
	text-align: center;
}

.nlf-calc-result-name {
	font-family: 'Playfair Display', serif;
	font-size: 22px;
	color: var(--text-primary);
	margin: var(--space-2) 0 0;
}

.nlf-calc-result-price-line {
	margin: var(--space-1) 0 var(--space-3);
}

.nlf-calc-price-amount {
	font-family: 'Playfair Display', serif;
	font-size: 32px;
	line-height: 1.2;
	color: var(--brand-accent);
}

.nlf-calc-result-duration {
	color: var(--text-muted);
	font-size: 15px;
}

.nlf-calc-result-writeup {
	max-width: 480px;
	margin: 0 auto var(--space-3);
	color: var(--text-secondary);
	font-size: 14px;
	line-height: 1.5;
}

.nlf-calc-result-writeup[hidden] {
	display: none;
}

.nlf-calc-price-note {
	margin: 0;
	color: var(--text-muted);
	font-size: 13px;
}

.nlf-calc-wake-price[hidden] {
	display: none;
}

/* --- Cremation tiles (shown instead of a single price when "No Wake"
   is selected — Same-Day/Next-Day are informational only, never a
   user selection, so these numbers are static and never rewritten by
   JS) ------------------------------------------------------------------ */
.nlf-calc-cremation-tiles {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
}

.nlf-calc-cremation-tiles[hidden] {
	display: none;
}

.nlf-calc-cremation-tile {
	flex: 1 1 0;
	padding: var(--space-4);
	border: var(--border-width) solid var(--border-subtle);
	border-radius: var(--radius-md);
	background: var(--surface-inverse);
	text-align: center;
}

.nlf-calc-cremation-tile-price {
	font-family: 'Playfair Display', serif;
	font-size: 24px;
	color: var(--brand-accent);
	margin-top: var(--space-1);
}

/* --- CTA row -------------------------------------------------------- */
.nlf-calc-cta-row {
	display: flex;
	flex-wrap: wrap;
	gap: var(--space-3);
}

.nlf-calc-cta {
	flex: 1 1 auto;
	text-align: center;
	padding: var(--space-3) var(--space-5);
	border-radius: var(--radius-sm);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: 0.02em;
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease, border-color .15s ease;
}

.nlf-calc-cta-whatsapp {
	background: var(--brand-accent);
	border: var(--border-width) solid var(--brand-accent);
	color: var(--text-on-gold);
}

.nlf-calc-cta-whatsapp:hover {
	background: var(--brand-accent-hover);
	border-color: var(--brand-accent-hover);
	color: var(--text-on-gold);
}

.nlf-calc-cta-learn-more {
	background: transparent;
	border: var(--border-width) solid var(--border-gold);
	color: var(--text-primary);
}

.nlf-calc-cta-learn-more:hover {
	border-color: var(--brand-accent-hover);
	color: var(--brand-accent);
}

@media (max-width: 767px) {
	.nlf-calc-cta {
		flex: 1 1 100%;
	}

	.nlf-calc-cremation-tile {
		flex: 1 1 100%;
	}
}
