/* =========================================================================
   The Transformation Package panel (#db-package).

   A black drawer like the live package popup: it slides in from the right
   a beat after the backdrop (160ms, the live shortcode's delay), a bottom
   sheet on phones (foundation's --right behaviour). Inside, the price and
   what's included on black, then a white card for the details and Stripe's
   Payment Element, with the green pay button.
   Tokens only (tokens.css). Loads after base.css.
   ====================================================================== */

.db-sheet--package .db-sheet__panel {
	background: var(--db-black);
	color: var(--db-white);
	border-color: var(--db-on-dark-line);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.3);
	-webkit-backdrop-filter: none;
	backdrop-filter: none;
}
.db-sheet--package.is-open .db-sheet__panel { transition-delay: 160ms; }
.db-sheet--package :focus-visible { outline-color: var(--db-white); }
.db-sheet--package .db-pkg__card :focus-visible { outline-color: var(--db-black); }

.db-pkg__head { padding: 20px 16px 8px 28px; }
.db-pkg__head .db-sheet__title { font-size: 22px; font-stretch: var(--db-stretch-head); font-weight: var(--db-w-head); letter-spacing: -0.02em; }
.db-pkg__body { display: flex; flex-direction: column; gap: 24px; padding: 4px 28px 28px; }

/* Price and what's included */
.db-pkg__intro { display: flex; flex-direction: column; gap: 14px; }
.db-pkg__price { display: flex; align-items: baseline; gap: 10px; margin: 0; }
.db-pkg__n {
	font-stretch: var(--db-stretch-head);
	font-size: clamp(44px, 3vw + 24px, 60px);
	font-weight: var(--db-w-head);
	line-height: 1;
	letter-spacing: -0.04em;
}
.db-pkg__cur { font-size: 15px; color: var(--db-on-dark-2); }
.db-pkg__lead { margin: 0; max-width: 440px; font-size: var(--db-fs-sm); line-height: 1.6; color: var(--db-on-dark); }
.db-pkg__perks {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 14px;
	margin: 4px 0 0;
	padding: 0;
	list-style: none;
}
.db-pkg__perks li { display: flex; align-items: center; gap: 10px; font-size: var(--db-fs-xs); font-weight: 500; line-height: 1.3; }
.db-pkg__tick {
	flex: none;
	width: 20px;
	height: 20px;
	border-radius: var(--db-r-xs);
	background: var(--db-green);
	color: var(--db-black);
	display: flex;
	align-items: center;
	justify-content: center;
}

/* The white card */
.db-pkg__card {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 24px;
	border-radius: var(--db-r-lg);
	background: var(--db-white);
	color: var(--db-black);
}
.db-pkg__cardtitle { margin: 0; font-size: 18px; font-weight: 650; letter-spacing: -0.01em; }
.db-pkg__text { margin: 0; font-size: var(--db-fs-sm); line-height: 1.55; color: var(--db-muted); }
.db-pkg__fields { display: flex; flex-direction: column; gap: 14px; }
.db-pkg__card .db-input { background: var(--db-white); }
.db-pkg__pay { display: flex; flex-direction: column; gap: 7px; }
.db-pkg__pay .db-label { margin: 0; }
.db-pkg__element { min-height: 140px; }
.db-pkg__element.is-ready { min-height: 0; }
.db-pkg__skel { height: 140px; border-radius: var(--db-r-field); }
.db-pkg__msg {
	margin: 0;
	padding: 12px 14px;
	border-radius: var(--db-r-sm);
	background: var(--db-red-tint);
	color: var(--db-red);
	font-size: var(--db-fs-xs);
	line-height: 1.5;
}
.db-pkg__card .db-btn--signal { margin-top: 4px; }
.db-pkg__fine { display: flex; align-items: flex-start; justify-content: center; gap: 8px; margin: 0; text-align: center; font-size: var(--db-fs-2xs); line-height: 1.5; color: var(--db-muted); }
.db-pkg__fine .db-icon { margin-top: 2px; }
.db-pkg__fine a { color: var(--db-muted); text-decoration: underline; text-underline-offset: 3px; }
.db-pkg__alt { align-self: center; font-size: var(--db-fs-xs); }

/* Paid: a moment on the confirmation, then the receipt page loads. */
.db-pkg__done {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 12px;
	padding: 40px 24px;
	border-radius: var(--db-r-lg);
	background: var(--db-white);
	color: var(--db-black);
	text-align: center;
	animation: db-rise 0.45s var(--db-ease) both;
}
.db-pkg__done[hidden] { display: none; }
.db-pkg__donetick {
	width: 56px;
	height: 56px;
	border-radius: 20px;
	background: var(--db-green);
	display: flex;
	align-items: center;
	justify-content: center;
}

@media (max-width: 760px) {
	.db-pkg__head { padding: 16px 12px 4px 20px; }
	.db-pkg__body { gap: 20px; padding: 4px 16px 20px; }
	.db-pkg__card { padding: 20px; border-radius: 20px; }
	.db-sheet--package.is-open .db-sheet__panel { transition-delay: 80ms; }
}
@media (max-width: 380px) {
	.db-pkg__perks { grid-template-columns: minmax(0, 1fr); }
}

/* Photo, key facts, what's included and how it starts (owner's 2026-11-03 pass). */
.db-pkg__media { margin: 0; aspect-ratio: 16 / 10; border-radius: var(--db-r-lg); overflow: hidden; background: #1a1a1a; }
.db-pkg__media .db-pkg__img { display: block; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 30%; }
.db-pkg__facts {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1px;
	margin: 0;
	border-radius: var(--db-r-md);
	overflow: hidden;
	background: var(--db-on-dark-line);
	border: 1px solid var(--db-on-dark-line);
}
.db-pkg__facts > div { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: var(--db-black); }
.db-pkg__facts dt { font-size: var(--db-fs-2xs); color: var(--db-on-dark-2); }
.db-pkg__facts dd { margin: 0; font-size: var(--db-fs-sm); font-weight: 600; color: var(--db-white); }
.db-pkg__block { display: flex; flex-direction: column; gap: 12px; }
.db-pkg__h { margin: 0; font-size: var(--db-fs-sm); font-weight: 650; color: var(--db-white); }
.db-pkg__block .db-pkg__perks { grid-template-columns: 1fr; margin: 0; }
.db-pkg__steps { margin: 0; padding: 0; list-style: none; counter-reset: db-step; display: flex; flex-direction: column; gap: 10px; }
.db-pkg__steps li { counter-increment: db-step; display: flex; gap: 12px; align-items: baseline; font-size: var(--db-fs-xs); line-height: 1.5; color: var(--db-on-dark); }
.db-pkg__steps li::before { content: counter(db-step); flex: none; font-weight: 700; color: var(--db-green); min-width: 12px; }

/* Never squash the photo or the facts to fit; the panel body scrolls instead. */
.db-pkg__body > * { flex-shrink: 0; }

/* Light panel (owner's 2026-11-03 pass): white, no photo, the buy button in a
   fixed footer while the details scroll above it. */
.db-sheet--package .db-sheet__panel { background: var(--db-white); color: var(--db-black); border-color: var(--db-line); box-shadow: 0 24px 64px rgba(0, 0, 0, 0.16); }
.db-sheet--package :focus-visible { outline-color: var(--db-black); }
.db-pkg__head .db-ibtn--dark { background: var(--db-mist); color: var(--db-black); }
.db-pkg__head .db-ibtn--dark:hover { background: var(--db-mist-2); }
.db-pkg__cur, .db-pkg__lead { color: var(--db-muted); }
.db-pkg__facts { background: var(--db-line); border-color: var(--db-line); }
.db-pkg__facts > div { background: var(--db-white); }
.db-pkg__facts dt { color: var(--db-muted); }
.db-pkg__facts dd, .db-pkg__h { color: var(--db-black); }
.db-pkg__steps li { color: var(--db-muted); }
.db-pkg__steps li::before { color: var(--db-black); }
.db-pkg__card { background: var(--db-mist); border: 0; box-shadow: none; }
.db-pkg__body { padding-bottom: 24px; }
.db-pkg__foot {
	gap: 8px;
	padding: 14px 28px calc(16px + env(safe-area-inset-bottom));
	background: var(--db-white);
	border-top: 1px solid var(--db-line);
	box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.05);
}
.db-pkg__foot .db-pkg__fine { justify-content: center; margin: 0; color: var(--db-muted); }
.db-pkg__foot .db-pkg__msg { margin: 0; }
@media (max-width: 640px) { .db-pkg__foot { padding-inline: 20px; } }
