/* =========================================================================
 * wdz-checkout — Date Gate (Phase 2)
 * Modal that gates inventory browsing behind a date/time selection.
 * Colors come from CSS vars set inline by the template (niche preset):
 *   --wdz-gate-primary, --wdz-gate-accent
 * ========================================================================= */

.wdz-gate[hidden],
.wdz-gate-sticky[hidden] { display: none !important; }

.wdz-gate {
	--wdz-gate-primary: #0F3460;
	--wdz-gate-accent:  #C9A227;
	position: fixed;
	inset: 0;
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: inherit;
}

.wdz-gate__overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 18, 35, 0.72);
	backdrop-filter: blur(2px);
}

.wdz-gate__dialog {
	position: relative;
	z-index: 1;
	width: 580px;
	max-width: calc(100vw - 32px);
	max-height: calc(100vh - 48px);
	overflow-y: auto;
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.32);
	padding: 32px 32px 24px;
	animation: wdz-gate-in 0.22s ease-out;
}

@keyframes wdz-gate-in {
	from { opacity: 0; transform: translateY(12px) scale(0.985); }
	to   { opacity: 1; transform: none; }
}

.wdz-gate__close {
	position: absolute;
	top: 12px;
	right: 14px;
	width: 34px;
	height: 34px;
	border: 0;
	background: transparent;
	font-size: 28px;
	line-height: 1;
	color: #9aa3ad;
	cursor: pointer;
	border-radius: 8px;
}
.wdz-gate__close:hover { background: #f1f3f5; color: #333; }

/* Header */
.wdz-gate__header { text-align: center; margin-bottom: 18px; }
.wdz-gate__logo { max-height: 52px; width: auto; margin: 0 auto 10px; display: block; }
.wdz-gate__brand {
	display: block;
	font-weight: 700;
	font-size: 18px;
	color: var(--wdz-gate-primary);
	margin-bottom: 6px;
}
.wdz-gate__headline {
	margin: 0;
	font-size: 24px;
	line-height: 1.25;
	color: var(--wdz-gate-primary);
}

/* Progress dots */
.wdz-gate__progress {
	display: flex;
	gap: 8px;
	justify-content: center;
	list-style: none;
	margin: 0 0 6px;
	padding: 0;
}
.wdz-gate__progress li {
	width: 28px;
	height: 6px;
	border-radius: 999px;
	background: #e3e6ea;
	transition: background 0.2s;
}
.wdz-gate__progress li.is-active { background: var(--wdz-gate-accent); }
.wdz-gate__progress li.is-done   { background: var(--wdz-gate-primary); }

.wdz-gate__steplabel {
	text-align: center;
	font-size: 12px;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #8b94a0;
	margin: 0 0 18px;
}

/* Steps */
.wdz-gate__step { display: none; }
.wdz-gate__step.is-active { display: block; }
.wdz-gate__step[hidden] { display: none; }

.wdz-gate__steptitle {
	font-size: 17px;
	margin: 0 0 14px;
	color: #1f2733;
}

/* Choices (event type) */
.wdz-gate__choices { display: grid; gap: 10px; }
.wdz-gate__choice {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 14px 16px;
	border: 2px solid #e3e6ea;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}
.wdz-gate__choice:hover { border-color: var(--wdz-gate-accent); }
.wdz-gate__choice input { accent-color: var(--wdz-gate-primary); width: 18px; height: 18px; }
.wdz-gate__choice:has(input:checked) {
	border-color: var(--wdz-gate-primary);
	background: rgba(15, 52, 96, 0.04);
}
.wdz-gate__choice-label { font-size: 15px; font-weight: 600; color: #1f2733; }

/* Fields */
.wdz-gate__field { margin-bottom: 14px; }
.wdz-gate__field-row { display: flex; gap: 14px; flex-wrap: wrap; }
.wdz-gate__field-row .wdz-gate__field { flex: 1 1 180px; }
.wdz-gate__field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #4a5562;
	margin-bottom: 6px;
}
.wdz-gate__field input[type="date"],
.wdz-gate__field input[type="time"] {
	width: 100%;
	box-sizing: border-box;
	padding: 11px 12px;
	font-size: 16px; /* >=16px stops iOS zoom-on-focus */
	border: 2px solid #d7dbe0;
	border-radius: 9px;
	color: #1f2733;
	background: #fff;
}
.wdz-gate__field input:focus {
	outline: none;
	border-color: var(--wdz-gate-primary);
	box-shadow: 0 0 0 3px rgba(15, 52, 96, 0.12);
}
.wdz-gate__hint { font-size: 12px; color: #8b94a0; margin: 4px 0 0; }
.wdz-gate__field input[aria-invalid="true"] { border-color: #c8102e; }

/* Summary (step 4) */
.wdz-gate__summary { margin: 0; }
.wdz-gate__summary > div {
	display: flex;
	justify-content: space-between;
	padding: 12px 0;
	border-bottom: 1px solid #eef0f3;
}
.wdz-gate__summary dt { color: #8b94a0; font-size: 13px; margin: 0; }
.wdz-gate__summary dd { margin: 0; font-weight: 600; color: #1f2733; text-align: right; }

/* Footer buttons */
.wdz-gate__footer {
	display: flex;
	gap: 10px;
	align-items: center;
	margin-top: 24px;
}
.wdz-gate__btn {
	font-size: 15px;
	font-weight: 700;
	padding: 13px 22px;
	border-radius: 10px;
	border: 0;
	cursor: pointer;
	transition: opacity 0.15s, transform 0.05s;
}
.wdz-gate__btn:active { transform: translateY(1px); }
.wdz-gate__btn--primary {
	margin-left: auto;
	background: var(--wdz-gate-primary);
	color: #fff;
}
.wdz-gate__btn--primary[data-wdz-gate-confirm] { background: var(--wdz-gate-accent); color: #1a1a1a; }
.wdz-gate__btn--primary:disabled { opacity: 0.45; cursor: not-allowed; }
.wdz-gate__btn--ghost { background: transparent; color: #6b7480; }
.wdz-gate__btn--ghost:hover { color: #1f2733; }

/* Sticky date button */
.wdz-gate-sticky {
	--wdz-gate-primary: #0F3460;
	--wdz-gate-accent:  #C9A227;
	position: sticky;
	top: 0;
	z-index: 9000;
	width: 100%;
	background: var(--wdz-gate-primary);
}
.wdz-gate-sticky__btn {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	border: 0;
	background: transparent;
	color: #fff;
	font-size: 14px;
	font-weight: 600;
	padding: 11px 18px;
	cursor: pointer;
}
.wdz-gate-sticky__icon { font-size: 16px; }
.wdz-gate-sticky__label { flex: 1; text-align: left; }
.wdz-gate-sticky__change {
	color: var(--wdz-gate-accent);
	text-decoration: underline;
	font-weight: 700;
}

/* Mobile — full screen modal */
@media (max-width: 768px) {
	.wdz-gate__dialog {
		width: 100%;
		max-width: 100vw;
		max-height: 100vh;
		height: 100%;
		border-radius: 0;
		padding: 24px 20px;
	}
	.wdz-gate__headline { font-size: 21px; }
	.wdz-gate__footer { position: sticky; bottom: 0; background: #fff; padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.wdz-gate__dialog { animation: none; }
}

/* a11y (Phase 5) — visible focus + 44px touch targets */
.wdz-gate :focus-visible { outline: 3px solid var(--wdz-gate-accent); outline-offset: 2px; border-radius: 6px; }
@media (max-width: 768px) {
	.wdz-gate__btn, .wdz-gate__choice, .wdz-gate__close, .wdz-gate-sticky__btn { min-height: 44px; }
}
