/* =========================================================================
 * VB Subscriptions — Previous Packs grid
 *
 * Loads on the My Account page and anywhere [previous_packs] is used, so it
 * brings its own brand values rather than relying on account.css (whose
 * variables only exist inside .woocommerce-account).
 *
 * It has to look the same wherever it's dropped, so:
 *
 *   - Every selector starts with .vbs-packs:not(#vbs). The :not(#vbs) never
 *     excludes anything; it lifts the rules to ID strength, so theme and
 *     page-builder rules for page content (which resize spans, paragraphs
 *     and buttons there) can't win over them.
 *   - Every text element sets its own size, weight, line height, spacing
 *     and case instead of inheriting any of them from the page.
 *   - Colours on the dark panels are forced, as the theme gives strong and
 *     p its own dark text.
 * ====================================================================== */
.vbs-packs:not(#vbs) {
	display: grid;
	gap: 18px;
	margin: 0;
	padding: 0;
	font-family: var(--vbs-body, inherit);
	font-size: 16px;
	font-weight: 400;
	line-height: 1.5;
	letter-spacing: normal;
	text-transform: none;
	color: var(--vbs-ink);
	text-align: left;
}
.vbs-packs:not(#vbs) *,
.vbs-packs:not(#vbs) *::before,
.vbs-packs:not(#vbs) *::after { box-sizing: border-box; }

/* Intro (account page only) */
.vbs-packs:not(#vbs) .vbs-packs__title {
	margin: 0; padding: 0; font-family: var(--vbs-display, inherit); font-weight: var(--vbs-heading-weight);
	font-size: 34px; line-height: 1; text-transform: var(--vbs-heading-case); letter-spacing: -.01em;
	color: var(--vbs-ink);
}
.vbs-packs:not(#vbs) .vbs-packs__title span { font: inherit; letter-spacing: inherit; color: var(--vbs-accent); }
.vbs-packs:not(#vbs) .vbs-packs__lede {
	margin: 0; max-width: 62ch; font-size: 16px; line-height: 1.5; color: var(--vbs-muted);
}
.vbs-packs:not(#vbs) .vbs-packs__meta {
	margin: 0; font-family: var(--vbs-display, inherit); font-weight: 700; font-size: 13px; line-height: 1.3;
	letter-spacing: .12em; text-transform: uppercase; color: var(--vbs-muted);
}
.vbs-packs:not(#vbs) .vbs-packs__empty { margin: 0; font-size: 16px; line-height: 1.5; color: var(--vbs-muted); }

/* The grid. min() keeps a phone's single column from overflowing. */
.vbs-packs:not(#vbs) .vbs-packs__stage { position: relative; margin: 0; padding: 0; }
.vbs-packs:not(#vbs) .vbs-packs__grid {
	list-style: none; margin: 0; padding: 0; display: grid; gap: 16px;
	grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr));
}
.vbs-packs:not(#vbs) .vbs-pack {
	display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none;
	font-size: 16px; line-height: 1.5;
	border: 1px solid var(--vbs-line); border-radius: 12px; overflow: hidden; background: #fff;
}
.vbs-packs:not(#vbs) .vbs-pack::before,
.vbs-packs:not(#vbs) .vbs-pack::marker { content: none; display: none; }
.vbs-packs:not(#vbs) .vbs-pack__photo {
	aspect-ratio: 4 / 3; display: flex; align-items: center; justify-content: center;
	margin: 0; padding: 0; background: #1a1a1c; overflow: hidden;
}
.vbs-packs:not(#vbs) .vbs-pack__photo img {
	width: 100%; height: 100%; max-width: none; margin: 0; padding: 0; border: 0;
	object-fit: cover; display: block; border-radius: 0; box-shadow: none;
}
.vbs-packs:not(#vbs) .vbs-pack__photo span {
	font-family: var(--vbs-display, inherit); font-weight: 700; font-size: 11px; line-height: 1.2;
	letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.35);
}
.vbs-packs:not(#vbs) .vbs-pack__body {
	display: flex; flex-direction: column; gap: 6px; flex: 1; margin: 0; padding: 14px 14px 16px;
}
.vbs-packs:not(#vbs) .vbs-pack__date {
	display: block; margin: 0; padding: 0;
	font-family: var(--vbs-body, inherit); font-size: 13px; font-weight: 400; line-height: 1.4;
	letter-spacing: normal; text-transform: none; color: var(--vbs-muted);
}
.vbs-packs:not(#vbs) .vbs-pack__name {
	display: block; margin: 0 0 8px; padding: 0;
	font-family: var(--vbs-body, inherit); font-size: 20px; font-weight: 700; line-height: 1.2;
	letter-spacing: normal; text-transform: none; color: var(--vbs-ink);
}

.vbs-packs:not(#vbs) .vbs-pack__btn {
	margin: auto 0 0; display: flex; align-items: center; justify-content: center;
	width: 100%; min-height: 0; height: auto; padding: 11px 10px; border: 0; border-radius: 8px;
	background: var(--vbs-accent); color: var(--vbs-on-accent); box-shadow: none; text-shadow: none;
	font-family: var(--vbs-display, inherit); font-weight: 800; font-size: 15px; line-height: 1.2;
	letter-spacing: .06em; text-transform: uppercase; text-decoration: none; cursor: pointer;
	transition: background .15s ease;
}
.vbs-packs:not(#vbs) .vbs-pack__btn:hover { background: var(--vbs-accent-dark); color: var(--vbs-on-accent); }
.vbs-packs:not(#vbs) .vbs-pack__btn:focus-visible { outline: 2px solid var(--vbs-ink); outline-offset: 2px; }
.vbs-packs:not(#vbs) .vbs-pack__btn[aria-pressed="true"] {
	background: #fff; color: var(--vbs-accent); box-shadow: inset 0 0 0 2px var(--vbs-accent);
}
.vbs-packs:not(#vbs) .vbs-pack__btn.is-static,
.vbs-packs:not(#vbs) .vbs-pack__btn.is-static:hover {
	background: #f1f1f3; color: #a2a2a8; cursor: default;
}
.vbs-packs:not(#vbs) .vbs-pack__left {
	display: block; margin: 0; padding: 0; text-align: center;
	font-family: var(--vbs-display, inherit); font-weight: 700; font-size: 12px; line-height: 1.3;
	letter-spacing: .12em; text-transform: uppercase; color: #b7791f;
}
.vbs-packs:not(#vbs) .vbs-pack__left.is-low { color: var(--vbs-accent); }

/* Sold out or already bought: present but receded. */
.vbs-packs:not(#vbs) .vbs-pack.is-gone .vbs-pack__photo { background: #f1f1f3; }
.vbs-packs:not(#vbs) .vbs-pack.is-gone .vbs-pack__photo img { opacity: .4; filter: grayscale(1); }
.vbs-packs:not(#vbs) .vbs-pack.is-gone .vbs-pack__photo span { color: #b9b9bf; }
.vbs-packs:not(#vbs) .vbs-pack.is-gone .vbs-pack__date,
.vbs-packs:not(#vbs) .vbs-pack.is-gone .vbs-pack__name { color: #b9b9bf; }
.vbs-packs:not(#vbs) .vbs-pack.is-busy { opacity: .6; pointer-events: none; }

/* -------------------------------------------------------------------------
 * Locked (logged out, or no active membership): the whole grid greyed out,
 * with a padlock card over the top.
 * ---------------------------------------------------------------------- */
.vbs-packs:not(#vbs).is-locked .vbs-packs__stage { min-height: 380px; }
.vbs-packs:not(#vbs).is-locked .vbs-packs__grid {
	filter: grayscale(1);
	opacity: .35;
	pointer-events: none;
	user-select: none;
}
.vbs-packs:not(#vbs) .vbs-packs__overlay {
	position: absolute; inset: 0; z-index: 3;
	display: flex; justify-content: center; align-items: flex-start;
	margin: 0; padding: clamp(24px, 6vw, 64px) 16px 16px;
	background: linear-gradient(180deg, rgba(255,255,255,.15), rgba(255,255,255,.55));
	border-radius: 12px;
}
.vbs-packs:not(#vbs) .vbs-packs__lockcard {
	position: sticky; top: 120px;
	width: 100%; max-width: 420px;
	display: flex; flex-direction: column; align-items: center; gap: 10px;
	margin: 0; padding: 28px 24px 24px; text-align: center;
	border-radius: var(--vbs-radius);
	background: var(--vbs-ink);
	box-shadow: 0 18px 44px color-mix(in srgb, var(--vbs-ink) 28%, transparent);
}
.vbs-packs:not(#vbs) .vbs-packs__padlock {
	position: relative; display: block; width: 56px; height: 56px; margin: 0 0 4px; padding: 0;
	border-radius: 50%; background: var(--vbs-accent);
}
.vbs-packs:not(#vbs) .vbs-packs__padlock::before {
	content: ""; position: absolute; inset: 14px; background: #fff;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10.5' width='16' height='11' rx='2.5'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
	        mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='10.5' width='16' height='11' rx='2.5'/%3E%3Cpath d='M8 10.5V7.5a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.vbs-packs:not(#vbs) .vbs-packs__lockhead {
	margin: 0; padding: 0; font-family: var(--vbs-display, inherit); font-weight: var(--vbs-heading-weight); font-size: 24px; line-height: 1.1;
	letter-spacing: .02em; text-transform: var(--vbs-heading-case); color: #fff !important;
}
.vbs-packs:not(#vbs) .vbs-packs__locktext {
	margin: 0; padding: 0; max-width: 34ch;
	font-family: var(--vbs-body, inherit); font-size: 14px; font-weight: 400; line-height: 1.5;
	letter-spacing: normal; text-transform: none; color: rgba(255,255,255,.72) !important;
}
.vbs-packs:not(#vbs) .vbs-packs__lockactions {
	display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 8px 0 0; padding: 0; width: 100%;
}

/* Call-to-action buttons (lock card and basket bar). Their own styles, so
   they look the same on the account page and anywhere else. */
.vbs-packs:not(#vbs) a.vbs-packs__cta {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	margin: 0; padding: 12px 22px; border: 1.5px solid var(--vbs-accent); border-radius: 8px;
	background: var(--vbs-accent); color: var(--vbs-on-accent) !important;
	font-family: var(--vbs-display, inherit); font-weight: 800; font-size: 15px; line-height: 1.2;
	letter-spacing: .06em; text-transform: uppercase;
	text-decoration: none !important; box-shadow: none; text-shadow: none; cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}
.vbs-packs:not(#vbs) a.vbs-packs__cta:hover,
.vbs-packs:not(#vbs) a.vbs-packs__cta:focus-visible {
	background: var(--vbs-accent-dark); border-color: var(--vbs-accent-dark); color: var(--vbs-on-accent) !important;
}
.vbs-packs:not(#vbs) a.vbs-packs__cta:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.vbs-packs:not(#vbs) a.vbs-packs__cta.is-secondary {
	background: transparent; border-color: rgba(255,255,255,.4);
}
.vbs-packs:not(#vbs) a.vbs-packs__cta.is-secondary:hover,
.vbs-packs:not(#vbs) a.vbs-packs__cta.is-secondary:focus-visible {
	background: rgba(255,255,255,.12); border-color: #fff;
}

/* Basket bar: stays in reach while scrolling a long grid. */
.vbs-packs:not(#vbs) .vbs-packs__bar {
	position: sticky; bottom: 16px; z-index: 5;
	display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
	margin: 0; padding: 18px 22px; border-radius: var(--vbs-radius);
	background: var(--vbs-ink); color: #fff;
	box-shadow: 0 14px 34px color-mix(in srgb, var(--vbs-ink) 28%, transparent);
}
.vbs-packs:not(#vbs) .vbs-packs__bar[hidden] { display: none; }
.vbs-packs:not(#vbs) .vbs-packs__bartext { flex: 1 1 240px; display: grid; gap: 2px; margin: 0; padding: 0; }
.vbs-packs:not(#vbs) .vbs-packs__bar strong {
	display: block; margin: 0;
	font-family: var(--vbs-display, inherit); font-weight: var(--vbs-heading-weight); font-size: 20px; line-height: 1.2;
	letter-spacing: normal; text-transform: var(--vbs-heading-case); color: #fff !important;
}
.vbs-packs:not(#vbs) .vbs-packs__bartext span {
	display: block; margin: 0;
	font-family: var(--vbs-body, inherit); font-size: 13px; font-weight: 400; line-height: 1.4;
	letter-spacing: normal; text-transform: none; color: rgba(255,255,255,.7) !important;
}

.vbs-packs:not(#vbs) .vbs-packs__error {
	margin: 0; padding: 10px 14px; border-radius: 8px; background: #fdecea; color: #b32d2e;
	font-size: 14px; line-height: 1.4;
}
.vbs-packs:not(#vbs) .vbs-packs__error[hidden] { display: none; }

@media (max-width: 620px) {
	.vbs-packs:not(#vbs) .vbs-packs__lockcard { padding: 24px 18px 20px; }
	.vbs-packs:not(#vbs) .vbs-packs__lockactions a.vbs-packs__cta { flex: 1 1 100%; }
	.vbs-packs:not(#vbs) .vbs-packs__bar a.vbs-packs__cta { width: 100%; }
}
