/**
 * WeekendPass cart panel.
 *
 * White cards stacked on a tinted panel, pill buttons, one accent colour. Sits
 * over the host theme, so every value is scoped and nothing leaks outward.
 */

.wdz-cart {
	--c-ink: #14202b;
	--c-muted: #5b6b7a;
	--c-line: #dde5ea;
	--c-card: #fff;
	--c-panel: #f2f7f9;
	--c-accent: #0e6b72;
	--c-accent-ink: #fff;
	--c-in: #2e7d4f;
	--c-in-bg: #e6f4ec;
	--c-out: #b3312c;
	--c-out-bg: #fbe9e8;

	position: fixed;
	top: 0;
	right: 0;
	z-index: 2147483000;
	/* 100vw counts the scrollbar, which pushed the panel off the left edge on a
	   narrow window; a percentage resolves against the space actually there. */
	width: min(420px, 100%);
	max-height: 100vh;
	overflow-y: auto;
	display: flex;
	flex-direction: column;
	gap: .75rem;
	padding: 1rem 1rem 1.5rem;
	background: var(--c-panel);
	color: var(--c-ink);
	font-family: inherit;
	line-height: 1.45;
	border-radius: 0 0 0 18px;
	box-shadow: 0 18px 50px rgba(16, 32, 45, .22);
	transform: translateX(102%);
	transition: transform .22s ease;
}

.wdz-cart.is-open { transform: translateX(0); }
.wdz-cart[hidden] { display: none; }
/* The panel itself needs this too, not only its children: without it the
   1rem padding is added to the width and the panel hangs off the edge of a
   phone screen. */
.wdz-cart, .wdz-cart *, .wdz-cart *::before, .wdz-cart *::after { box-sizing: border-box; }

/* ---- header ---- */

.wdz-cart__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: .75rem;
	padding-bottom: .5rem;
	border-bottom: 1px solid var(--c-line);
}

.wdz-cart__title {
	margin: 0;
	font-size: 1.15rem;
	font-weight: 800;
	letter-spacing: -.01em;
}

.wdz-cart__close {
	width: 2.2rem;
	height: 2.2rem;
	border-radius: 50%;
	border: 0;
	background: var(--c-card);
	color: var(--c-ink);
	font-size: 1.35rem;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 2px 8px rgba(16, 32, 45, .12);
}
.wdz-cart__close:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

/* ---- rows ---- */

.wdz-cart__body { display: flex; flex-direction: column; gap: .6rem; }

.wdz-cart__row {
	display: grid;
	grid-template-columns: auto 1fr auto;
	gap: .75rem;
	align-items: center;
	padding: .75rem .85rem;
	background: var(--c-card);
	border: 1px solid var(--c-line);
	border-radius: 12px;
}

.wdz-cart__row.is-soldout { border-color: var(--c-out); background: var(--c-out-bg); }

.wdz-cart__thumb {
	width: 58px;
	height: 58px;
	border-radius: 9px;
	overflow: hidden;
	background: #fff;
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
}
.wdz-cart__thumb img { width: 100%; height: 100%; object-fit: contain; }

.wdz-cart__row-main { display: flex; flex-direction: column; align-items: flex-start; gap: .3rem; min-width: 0; }

.wdz-cart__row-name {
	font-weight: 700;
	font-size: .95rem;
	line-height: 1.25;
}

.wdz-cart__pill {
	display: inline-block;
	padding: .12em .55em;
	border-radius: 999px;
	font-size: .7rem;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
}
.wdz-cart__pill--in { background: var(--c-in-bg); color: var(--c-in); }
.wdz-cart__pill--out { background: var(--c-out); color: #fff; }

.wdz-cart__stepper { display: inline-flex; align-items: center; gap: .45rem; }

.wdz-cart__step {
	width: 1.75rem;
	height: 1.75rem;
	border-radius: 7px;
	border: 1px solid var(--c-line);
	background: var(--c-card);
	color: var(--c-accent);
	font-size: 1rem;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
}
.wdz-cart__step:hover:not(:disabled) { border-color: var(--c-accent); }
.wdz-cart__step:disabled { opacity: .35; cursor: default; }
.wdz-cart__step:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 1px; }

.wdz-cart__qty { min-width: 1.2rem; text-align: center; font-weight: 700; font-variant-numeric: tabular-nums; }

.wdz-cart__row-end { display: flex; flex-direction: column; align-items: flex-end; gap: .35rem; }
.wdz-cart__row-price { font-weight: 800; font-variant-numeric: tabular-nums; white-space: nowrap; }

.wdz-cart__remove {
	border: 0;
	background: none;
	color: var(--c-muted);
	font-size: 1rem;
	line-height: 1;
	cursor: pointer;
	padding: .15rem;
}
.wdz-cart__remove:hover { color: var(--c-out); }
.wdz-cart__remove:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

/* ---- booked window ---- */

.wdz-cart__when {
	display: flex;
	flex-direction: column;
	gap: .2rem;
	padding: .7rem .9rem;
	background: var(--c-card);
	border: 1px solid var(--c-accent);
	border-radius: 12px;
}
.wdz-cart__when-name {
	font-size: .7rem;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--c-accent);
}
.wdz-cart__when-range { font-weight: 700; font-variant-numeric: tabular-nums; font-size: .92rem; }

/* ---- empty ---- */

.wdz-cart__empty {
	padding: 1.6rem 1rem;
	background: var(--c-card);
	border: 1px dashed var(--c-line);
	border-radius: 12px;
	text-align: center;
}
.wdz-cart__empty-title { margin: 0 0 .3rem; font-weight: 800; }
.wdz-cart__empty-body { margin: 0; font-size: .9rem; color: var(--c-muted); }

/* ---- totals ---- */

.wdz-cart__totals {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: .75rem;
	padding: .85rem 1rem;
	background: var(--c-card);
	border: 1px solid var(--c-line);
	border-radius: 12px;
}
.wdz-cart__totals-label {
	font-size: .78rem;
	font-weight: 800;
	letter-spacing: .07em;
	text-transform: uppercase;
	color: var(--c-muted);
}
.wdz-cart__totals-value {
	font-size: 1.7rem;
	font-weight: 800;
	color: var(--c-accent);
	font-variant-numeric: tabular-nums;
}

/* ---- actions ---- */

.wdz-cart__actions { display: flex; flex-direction: column; gap: .5rem; }

.wdz-cart__btn {
	width: 100%;
	padding: .78rem 1rem;
	border-radius: 999px;
	font: inherit;
	font-weight: 800;
	font-size: .95rem;
	cursor: pointer;
	border: 1px solid var(--c-line);
	background: var(--c-card);
	color: var(--c-ink);
}
.wdz-cart__btn:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }

.wdz-cart__btn--primary {
	background: var(--c-cta, var(--c-accent));
	border-color: var(--c-cta, var(--c-accent));
	color: var(--c-cta-ink, var(--c-accent-ink));
}
.wdz-cart__btn--primary:hover { filter: brightness(1.08); }

.wdz-cart__btn--danger { color: var(--c-out); border-color: var(--c-out); background: var(--c-card); }
.wdz-cart__btn--danger:hover { background: var(--c-out-bg); }

/* ---- the site's own cart controls open this panel ---- */

body.wdz-has-cart .cartInfo,
body.wdz-has-cart .ioCart,
body.wdz-has-cart .cartIcon { cursor: pointer; }

@media (max-width: 480px) {
	/* Full width on a phone: anchoring both edges is exact, where a width can
	   still disagree with the viewport by a scrollbar. */
	.wdz-cart {
		left: 0;
		right: 0;
		width: auto;
		max-width: none;
		border-radius: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.wdz-cart { transition: none; }
}

/* ---- stand down the platform's own cart ----
   Ours mirrors the same data and proxies the same controls, so showing both
   just stacks two carts on top of each other. Kept in the DOM, not removed:
   its buttons are still what we click, and programmatic clicks work on hidden
   elements. */

body.wdz-has-cart #cartPopover,
body.wdz-has-cart .cartPopover,
body.wdz-has-cart #cartOverlay {
	visibility: hidden !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

/* ---- Your event: plan a length and a start date before choosing anything (1.7.0) ---- */
.wdz-cart__plan {
	background: var(--c-card);
	border: 1px solid var(--c-line);
	border-radius: 12px;
	padding: .9rem .9rem 1rem;
	margin-bottom: .75rem;
	display: flex;
	flex-direction: column;
	gap: .6rem;
}
.wdz-cart__plan[hidden] { display: none; }
.wdz-cart__plan-title { margin: 0; font-size: 1rem; font-weight: 800; color: var(--c-ink); }
.wdz-cart__plan-hint,
.wdz-cart__plan-sub { margin: 0; font-size: .86rem; line-height: 1.4; color: var(--c-muted); }
.wdz-cart__plan-lengths { display: flex; flex-wrap: wrap; gap: .4rem; }
.wdz-cart__plan-length {
	font: inherit; font-size: .85rem; font-weight: 700;
	min-height: 40px; padding: .45rem .8rem;
	border-radius: 999px; border: 2px solid var(--c-line);
	background: var(--c-card); color: var(--c-ink); cursor: pointer;
}
.wdz-cart__plan-length[aria-pressed="true"] { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-accent-ink); }
.wdz-cart__plan-cal { border: 1px solid var(--c-line); border-radius: 10px; padding: .55rem; }
.wdz-cart__plan-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .35rem; }
.wdz-cart__plan-month { font-weight: 800; color: var(--c-ink); font-size: .92rem; }
.wdz-cart__plan-nav {
	width: 36px; height: 36px; border-radius: 8px; border: 1px solid var(--c-line);
	background: var(--c-card); color: var(--c-ink); font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.wdz-cart__plan-nav:disabled { opacity: .35; cursor: default; }
.wdz-cart__plan-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.wdz-cart__plan-dow { text-align: center; font-size: .68rem; font-weight: 700; text-transform: uppercase; color: var(--c-muted); padding: .2rem 0; }
.wdz-cart__plan-day {
	font: inherit; font-size: .85rem; font-weight: 700;
	aspect-ratio: 1; min-height: 34px; border-radius: 8px;
	border: 1px solid var(--c-line); background: var(--c-card); color: var(--c-ink); cursor: pointer;
}
.wdz-cart__plan-day:disabled { border-color: transparent; background: transparent; color: #a9b6c1; cursor: default; font-weight: 400; }
.wdz-cart__plan-day:not(:disabled):hover { border-color: var(--c-accent); }
.wdz-cart__plan-day.is-on { background: var(--c-accent); border-color: var(--c-accent); color: var(--c-accent-ink); }
.wdz-cart__plan-out { min-height: 1.4rem; }
.wdz-cart__plan-range { margin: 0; font-weight: 700; color: var(--c-ink); font-size: .9rem; }
.wdz-cart__plan-wait,
.wdz-cart__plan-msg { margin: 0; font-size: .86rem; color: var(--c-muted); }
.wdz-cart__plan-summary { display: flex; flex-direction: column; gap: .15rem; padding: .55rem .7rem; border-radius: 10px; background: var(--c-in-bg); }
.wdz-cart__plan-name { font-weight: 800; color: var(--c-ink); }
.wdz-cart__plan-summary .wdz-cart__plan-range { font-weight: 600; }
.wdz-cart__plan-set { width: 100%; }
.wdz-cart__plan-set:disabled { opacity: .5; cursor: default; }
.wdz-cart__plan-change {
	align-self: flex-start; font: inherit; font-size: .86rem; font-weight: 700;
	min-height: 40px; padding: .35rem 0; background: none; border: 0;
	color: var(--c-ink); text-decoration: underline; text-underline-offset: .2em; cursor: pointer;
}
.wdz-cart__plan-length:focus-visible,
.wdz-cart__plan-day:focus-visible,
.wdz-cart__plan-nav:focus-visible,
.wdz-cart__plan-change:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
