/*
 * Event Ticket Bookings: front end
 * Everything is scoped to .etb so it sits safely inside any theme or page builder.
 * The plugin inherits the site's font; colours come from --etb-accent (Settings).
 */

.etb {
	--etb-accent: #2b4cff;
	--etb-accent-rgb: 43, 76, 255;
	--etb-on-accent: #fff;
	--etb-ink: #1b1f2a;
	--etb-muted: #5b6272;
	--etb-faint: #8a90a0;
	--etb-line: #e3e6ec;
	--etb-paper: #fff;
	--etb-wash: #f4f5f8;
	--etb-danger: #c62f3b;
	--etb-success: #128a4f;
	--etb-radius: 16px;
	--etb-notch: 12px;
	--etb-ease: cubic-bezier(.2, .7, .2, 1);

	max-width: 100%;
	min-width: 0;
	color: var(--etb-ink);
	font-family: inherit;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.etb *,
.etb *::before,
.etb *::after { box-sizing: border-box; }

/*
 * Natural width for the plugin output. Containers (container-type) report a
 * natural width of 0, so builders that size children by their natural width
 * (Elementor containers set to wrap) laid the event out 0px wide and it became
 * thousands of pixels tall. This invisible, zero-height line of breakable
 * spaces gives the wrapper a natural width equal to the screen width (160 em
 * spaces at 1/160 of the viewport) while still letting it shrink to any column,
 * like an ordinary paragraph. It can never ask for more than the screen.
 */
.etb-fit { display: block; min-width: 0; max-width: 100%; }
.etb-fit::before {
	content: "\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B\2003\200B";
	display: block;
	height: 0;
	overflow: hidden;
	visibility: hidden;
	font-size: 10px;
	font-size: calc(100vw / 160);
	line-height: 0;
	white-space: normal;
	pointer-events: none;
}

/* Themes often give buttons and labels a display value; keep [hidden] working. */
.etb [hidden]:not(.etb-mobilebar),
dialog.etb [hidden] { display: none !important; }

.etb .etb-icon { flex: none; display: inline-block; vertical-align: middle; }
.etb img { max-width: 100%; }

.etb-sr,
.etb .etb-sr {
	position: absolute !important;
	width: 1px; height: 1px;
	padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}

/* ---------- Buttons ---------- */

.etb .etb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 0 22px;
	border: 1.5px solid transparent;
	border-radius: 12px;
	font: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.1;
	letter-spacing: 0;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	box-shadow: none;
	transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
.etb .etb-btn:active { transform: translateY(1px); }
.etb .etb-btn--primary { background: var(--etb-accent); color: var(--etb-on-accent); }
.etb .etb-btn--primary:hover { background: rgba(var(--etb-accent-rgb), .88); color: var(--etb-on-accent); }
.etb .etb-btn--ghost { background: transparent; border-color: var(--etb-line); color: var(--etb-ink); }
.etb .etb-btn--ghost:hover { border-color: var(--etb-ink); background: transparent; color: var(--etb-ink); }
.etb .etb-btn--block { width: 100%; }
.etb .etb-btn[disabled] { opacity: .55; cursor: progress; }

.etb .etb-btn:focus-visible,
.etb .etb-iconbtn:focus-visible,
.etb .etb-copy:focus-visible,
.etb .etb-linkbtn:focus-visible,
.etb a:focus-visible,
.etb summary:focus-visible {
	outline: 3px solid rgba(var(--etb-accent-rgb), .45);
	outline-offset: 2px;
}

/* ---------- Ticket grid ---------- */

.etb-tickets {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 28px;
}
.etb-listing { container-type: inline-size; }
@container (min-width: 600px) {
	.etb-tickets--grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@container (min-width: 940px) {
	.etb-tickets--grid { grid-template-columns: repeat(var(--etb-cols, 3), minmax(0, 1fr)); }
}

/*
 * The ticket. Two notches are punched out where the stub tears off, using a
 * mask on the paper so the cut-outs show whatever background the page has.
 * The shadow sits on the outer element so it follows the cut shape.
 */
.etb-ticket {
	--stub-h: 96px;
	position: relative;
	display: flex;
	min-width: 0;
	max-width: 100%;
	filter: drop-shadow(0 0 0.5px rgba(27, 31, 42, .28)) drop-shadow(0 8px 18px rgba(27, 31, 42, .09));
}
.etb-ticket__paper {
	position: relative;
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	background: var(--etb-paper);
	border-radius: var(--etb-radius);
	-webkit-mask:
		radial-gradient(circle var(--etb-notch) at 0 calc(100% - var(--stub-h)), #0000 97%, #000) 0 0 / 51% 100% no-repeat,
		radial-gradient(circle var(--etb-notch) at 100% calc(100% - var(--stub-h)), #0000 97%, #000) 100% 0 / 51% 100% no-repeat;
	mask:
		radial-gradient(circle var(--etb-notch) at 0 calc(100% - var(--stub-h)), #0000 97%, #000) 0 0 / 51% 100% no-repeat,
		radial-gradient(circle var(--etb-notch) at 100% calc(100% - var(--stub-h)), #0000 97%, #000) 100% 0 / 51% 100% no-repeat;
}

.etb-ticket__face { display: flex; flex-direction: column; flex: 1; min-width: 0; }

.etb-ticket__media {
	position: relative;
	aspect-ratio: 16 / 9;
	margin: 10px 10px 0;
	border-radius: calc(var(--etb-radius) - 6px);
	overflow: hidden;
	background: rgba(var(--etb-accent-rgb), .08);
}
/*
 * The photo always fills the whole image box. Pinned to all four sides, with a
 * stronger selector than page builders' general rules (Elementor sets
 * ".elementor img { height: auto }", which used to win and left a light band
 * under photos that are not exactly 16:9, most visibly on phones).
 */
.etb .etb-ticket__media img {
	position: absolute;
	inset: 0;
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	object-fit: cover;
	object-position: center;
	margin: 0;
	border: 0;
	transition: transform .5s var(--etb-ease);
}
.etb-ticket__placeholder {
	position: absolute; inset: 0;
	display: grid; place-items: center;
	color: rgba(var(--etb-accent-rgb), .55);
	background:
		repeating-linear-gradient(135deg, rgba(var(--etb-accent-rgb), .06) 0 10px, transparent 10px 20px);
}

.etb-flag {
	position: absolute;
	left: 10px; top: 10px;
	padding: 5px 10px;
	border-radius: 999px;
	background: var(--etb-paper);
	color: var(--etb-ink);
	font-size: 13px;
	font-weight: 600;
	line-height: 1.2;
}
.etb-flag--open { background: var(--etb-accent); color: var(--etb-on-accent); }

.etb-ticket__body { padding: 18px 22px 20px; display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }

.etb .etb-ticket__title {
	margin: 0;
	font-size: 21px;
	line-height: 1.22;
	font-weight: 700;
	letter-spacing: -0.01em;
	text-wrap: balance;
	overflow-wrap: anywhere;
}
.etb .etb-ticket__link { color: inherit; text-decoration: none; }
/* whole ticket is clickable */
.etb .etb-ticket__link::after { content: ""; position: absolute; inset: 0; z-index: 2; border-radius: var(--etb-radius); }
.etb .etb-ticket__link:focus-visible { outline: none; }
.etb .etb-ticket__link:focus-visible::after { outline: 3px solid rgba(var(--etb-accent-rgb), .5); outline-offset: -3px; }

.etb .etb-ticket__summary {
	margin: 0;
	color: var(--etb-muted);
	font-size: 15px;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.etb .etb-meta { list-style: none; margin: auto 0 0; padding: 4px 0 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.etb .etb-meta li { margin: 0; display: flex; align-items: flex-start; gap: 6px; color: var(--etb-muted); font-size: 14px; line-height: 1.35; min-width: 0; max-width: 100%; }
.etb .etb-meta li .etb-icon { margin-top: 1px; }
.etb .etb-meta li span { min-width: 0; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* perforation */
.etb .etb-ticket__tear {
	height: 0;
	margin: 0 calc(var(--etb-notch) + 8px);
	border-top: 2px dashed var(--etb-line);
}

.etb-ticket__stub {
	height: var(--stub-h);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 0 22px;
	transition: transform .25s var(--etb-ease);
}

/* date block: big day numeral beside month/year and weekday */
.etb .etb-date { display: flex; align-items: center; gap: 10px; line-height: 1; }
.etb .etb-date__day {
	font-size: 44px;
	font-weight: 800;
	letter-spacing: -0.04em;
	color: var(--etb-accent);
	font-variant-numeric: tabular-nums lining-nums;
}
.etb .etb-date__rest { display: flex; flex-direction: column; gap: 5px; font-size: 14px; font-weight: 600; }
.etb .etb-date__rest span:last-child { color: var(--etb-muted); font-weight: 500; }

.etb .etb-ticket__price { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.etb .etb-ticket__amount { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
@media (max-width: 380px) {
	.etb-ticket__stub { padding: 0 16px; gap: 10px; }
	.etb-ticket__body { padding: 16px 16px 18px; }
	.etb .etb-date__day { font-size: 38px; }
	.etb .etb-ticket__amount { font-size: 20px; }
}
.etb .etb-ticket__cta { font-size: 14px; font-weight: 600; color: var(--etb-accent); text-decoration: underline; text-decoration-thickness: 1.5px; text-underline-offset: 3px; text-decoration-color: rgba(var(--etb-accent-rgb), .35); }

@media (hover: hover) {
	.etb-ticket:hover .etb-ticket__media img { transform: scale(1.03); }
	.etb-ticket:hover .etb-ticket__cta { text-decoration-color: currentColor; }
	.etb-ticket--open:hover .etb-ticket__stub { transform: translateY(3px) rotate(-.6deg); }
}

.etb-ticket--past,
.etb-ticket--closed,
.etb-ticket--full { --etb-accent: #6d7383; --etb-accent-rgb: 109, 115, 131; }
.etb-ticket--past .etb-ticket__media img { filter: grayscale(1); opacity: .8; }

/* List layout: image | details | stub, with a vertical perforation */
@container (min-width: 720px) {
	.etb-tickets--list .etb-ticket { --stub-w: 210px; }
	.etb-tickets--list .etb-ticket__paper {
		flex-direction: row;
		-webkit-mask:
			radial-gradient(circle var(--etb-notch) at calc(100% - var(--stub-w)) 0, #0000 97%, #000) 0 0 / 100% 51% no-repeat,
			radial-gradient(circle var(--etb-notch) at calc(100% - var(--stub-w)) 100%, #0000 97%, #000) 0 100% / 100% 51% no-repeat;
		mask:
			radial-gradient(circle var(--etb-notch) at calc(100% - var(--stub-w)) 0, #0000 97%, #000) 0 0 / 100% 51% no-repeat,
			radial-gradient(circle var(--etb-notch) at calc(100% - var(--stub-w)) 100%, #0000 97%, #000) 0 100% / 100% 51% no-repeat;
	}
	.etb-tickets--list .etb-ticket__face { flex-direction: row; min-width: 0; }
	.etb-tickets--list .etb-ticket__media { flex: 0 0 34%; aspect-ratio: auto; min-height: 170px; margin: 10px 0 10px 10px; }
	.etb-tickets--list .etb-ticket__body { padding: 22px 26px; }
	.etb-tickets--list .etb-ticket__tear { height: auto; margin: calc(var(--etb-notch) + 8px) 0; border-top: 0; border-left: 2px dashed var(--etb-line); }
	.etb-tickets--list .etb-ticket__stub {
		flex: 0 0 var(--stub-w);
		height: auto;
		flex-direction: column;
		justify-content: center;
		align-items: flex-start;
		gap: 14px;
		padding: 20px 24px;
	}
	.etb-tickets--list .etb-ticket__price { align-items: flex-start; text-align: left; }
}

.etb-empty,
.etb-notice {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 12px;
	padding: 28px;
	border: 2px dashed var(--etb-line);
	border-radius: var(--etb-radius);
	color: var(--etb-muted);
}
.etb-empty p, .etb-notice p { margin: 0; font-size: 16px; }

/* ---------- Single event ---------- */

.etb-single { container-type: inline-size; }

.etb .etb-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 18px;
	color: var(--etb-muted);
	font-size: 15px;
	font-weight: 600;
	text-decoration: none;
}
.etb .etb-back:hover { color: var(--etb-ink); }

.etb-single__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	grid-template-areas: "head" "aside" "body";
	gap: 26px;
}
.etb-single__head { grid-area: head; min-width: 0; }
.etb-single__aside { grid-area: aside; display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-content: start; min-width: 0; }
.etb-single__body { grid-area: body; min-width: 0; }

@container (min-width: 860px) {
	.etb-single__layout {
		grid-template-columns: minmax(0, 1fr) 340px;
		grid-template-areas: "head aside" "body aside";
		column-gap: 48px;
		row-gap: 30px;
	}
	.etb-single__aside {
		align-self: start;
		position: -webkit-sticky;
		position: sticky;
		top: var(--etb-sticky-top, calc(var(--wp-admin--admin-bar--height, 0px) + 24px));
		z-index: 2;
	}
}

.etb .etb-single__title {
	margin: 0 0 22px;
	font-size: clamp(30px, 5.2cqi, 50px);
	line-height: 1.06;
	font-weight: 800;
	letter-spacing: -0.025em;
	text-wrap: balance;
	overflow-wrap: anywhere;
}
/*
 * Featured image: always shown whole, never cropped. It keeps its own shape,
 * fills the column width where it can, and is capped at 80% of the screen
 * height so tall (portrait) photos still fit on screen in full. The template
 * passes the photo's shape as --etb-img-ratio (width / height).
 */
.etb .etb-single__media { margin: 0; display: flex; justify-content: center; }
.etb .etb-single__media img {
	display: block;
	width: min(100%, calc(80vh * var(--etb-img-ratio, 1.7778)));
	width: min(100%, calc(80svh * var(--etb-img-ratio, 1.7778)));
	height: auto;
	max-width: 100%;
	max-height: 80vh;
	max-height: 80svh;
	object-fit: contain;
	margin: 0;
	border-radius: var(--etb-radius);
}

.etb .etb-prose { font-size: 17px; line-height: 1.65; max-width: 68ch; overflow-wrap: break-word; }
.etb .etb-prose img, .etb .etb-prose iframe, .etb .etb-prose video { max-width: 100%; height: auto; }
.etb .etb-prose table { display: block; max-width: 100%; overflow-x: auto; }
.etb .etb-prose > :first-child { margin-top: 0; }
.etb .etb-prose p { margin: 0 0 1em; }
.etb .etb-prose h2, .etb .etb-prose h3, .etb .etb-prose h4 { margin: 1.6em 0 .5em; line-height: 1.25; }
.etb .etb-prose ul, .etb .etb-prose ol { margin: 0 0 1em 1.25em; padding: 0; }
.etb .etb-prose a { color: var(--etb-accent); }

.etb .etb-goodtoknow {
	margin-top: 32px;
	padding: 22px 24px;
	background: var(--etb-wash);
	border-radius: var(--etb-radius);
	max-width: 68ch;
}
.etb .etb-goodtoknow h3 { margin: 0 0 8px; font-size: 17px; font-weight: 700; }
.etb .etb-goodtoknow p { margin: 0 0 6px; font-size: 15px; color: var(--etb-muted); }
.etb .etb-goodtoknow p:last-child { margin: 0; }
.etb .etb-goodtoknow a { color: var(--etb-ink); font-weight: 600; }

/* The pass: the booking panel, cut like a ticket with the price on the stub */
.etb-pass {
	--stub-h: 168px;
	filter: drop-shadow(0 0 0.5px rgba(27, 31, 42, .28)) drop-shadow(0 10px 24px rgba(27, 31, 42, .10));
}
.etb-pass__paper {
	position: relative;
	background: var(--etb-paper);
	border-radius: var(--etb-radius);
	-webkit-mask:
		radial-gradient(circle var(--etb-notch) at 0 calc(100% - var(--stub-h)), #0000 97%, #000) 0 0 / 51% 100% no-repeat,
		radial-gradient(circle var(--etb-notch) at 100% calc(100% - var(--stub-h)), #0000 97%, #000) 100% 0 / 51% 100% no-repeat;
	mask:
		radial-gradient(circle var(--etb-notch) at 0 calc(100% - var(--stub-h)), #0000 97%, #000) 0 0 / 51% 100% no-repeat,
		radial-gradient(circle var(--etb-notch) at 100% calc(100% - var(--stub-h)), #0000 97%, #000) 100% 0 / 51% 100% no-repeat;
}
.etb-pass__top { padding: 24px 24px 22px; }
.etb .etb-date--lg .etb-date__day { font-size: 64px; }
.etb .etb-date--lg .etb-date__rest { font-size: 16px; }

.etb .etb-facts { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 12px; }
.etb .etb-facts li { margin: 0; display: grid; grid-template-columns: 20px minmax(0, 1fr); overflow-wrap: anywhere; gap: 10px; align-items: start; font-size: 15px; line-height: 1.4; }
.etb .etb-facts .etb-icon { color: var(--etb-accent); margin-top: 1px; }

.etb-pass__stub {
	min-height: var(--stub-h);
	padding: 20px 24px 24px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	gap: 12px;
}
.etb .etb-pass__price { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.etb .etb-pass__amount { font-size: 34px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; line-height: 1; }
.etb .etb-pass__per { color: var(--etb-muted); font-size: 15px; }
.etb .etb-pass__note { margin: 0; font-size: 13.5px; color: var(--etb-muted); line-height: 1.45; }
.etb .etb-pass__note a { color: var(--etb-ink); }
.etb .etb-pass__closed {
	margin: 0;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--etb-wash);
	font-weight: 600;
	font-size: 15px;
}

/* Banking details on the event page */
.etb .etb-bankcard {
	padding: 20px 20px 18px;
	border-radius: var(--etb-radius);
	background: var(--etb-wash);
}
.etb .etb-bankcard__title { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; font-size: 18px; font-weight: 750; letter-spacing: -0.01em; }
.etb .etb-bankcard__title .etb-icon { color: var(--etb-accent); }
.etb .etb-bankcard__lead { margin: 0 0 14px; font-size: 14.5px; line-height: 1.5; color: var(--etb-muted); }
.etb .etb-bankcard .etb-pay { margin: 0; background: var(--etb-paper); }

/* Holder at the end of <body> for the booking dialog and phone bar: takes no room. */
.etb.etb-portal { position: static; display: block; height: 0; margin: 0; padding: 0; overflow: visible; }

/* Mobile booking bar */
.etb-mobilebar {
	position: fixed;
	left: 12px; right: 12px; bottom: 12px;
	z-index: 9990;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 10px 10px 18px;
	background: var(--etb-ink);
	color: #fff;
	border-radius: 16px;
	box-shadow: 0 12px 30px rgba(27, 31, 42, .3);
	transform: translateY(0);
	transition: transform .25s var(--etb-ease), opacity .25s;
}
.etb-mobilebar[hidden] { display: flex; transform: translateY(140%); opacity: 0; pointer-events: none; }
.etb-mobilebar div { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.etb-mobilebar .etb-btn { flex: none; }
.etb-mobilebar strong { font-size: 18px; }
.etb-mobilebar span { font-size: 13px; opacity: .75; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etb-mobilebar .etb-btn { min-height: 44px; }
@media (min-width: 860px) { .etb-mobilebar { display: none !important; } }

/* ---------- Booking dialog ---------- */

html.etb-lock { overflow: hidden; }

dialog.etb-modal {
	width: min(640px, calc(100vw - 32px));
	max-width: none;
	max-height: min(860px, calc(100dvh - 48px));
	margin: auto;
	padding: 0;
	border: 0;
	border-radius: 20px;
	background: var(--etb-paper);
	color: var(--etb-ink);
	box-shadow: 0 30px 80px rgba(14, 17, 26, .35);
	overflow: hidden;
}
dialog.etb-modal:not([open]) { display: none !important; }
dialog.etb-modal[open] {
	display: flex;
	position: fixed;
	inset: 0;
	z-index: 100000;
	visibility: visible;
	opacity: 1;
	animation: etb-in .28s var(--etb-ease);
}
dialog.etb-modal::backdrop { background: rgba(14, 17, 26, .55); backdrop-filter: blur(3px); }
@keyframes etb-in { from { opacity: 0; transform: translateY(14px) scale(.985); } to { opacity: 1; transform: none; } }

.etb-form { display: flex; flex-direction: column; width: 100%; max-height: inherit; margin: 0; }

.etb-modal__head {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 14px 16px;
	padding: 22px 24px 18px;
	border-bottom: 1px solid var(--etb-line);
}
.etb .etb-modal__kicker { margin: 0 0 4px; font-size: 14px; color: var(--etb-muted); font-weight: 600; }
.etb .etb-modal__title { overflow-wrap: anywhere; margin: 0; font-size: 22px; line-height: 1.2; font-weight: 750; letter-spacing: -0.015em; }

.etb .etb-iconbtn {
	width: 40px; height: 40px;
	display: grid; place-items: center;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: var(--etb-wash);
	color: var(--etb-ink);
	cursor: pointer;
}
.etb .etb-iconbtn:hover { background: var(--etb-line); }

.etb .etb-steps { grid-column: 1 / -1; list-style: none; margin: 0; padding: 0; display: flex; gap: 8px; }
.etb .etb-steps li {
	flex: 1;
	margin: 0;
	display: flex;
	align-items: center;
	gap: 8px;
	padding-top: 10px;
	border-top: 3px solid var(--etb-line);
	color: var(--etb-faint);
	font-size: 14px;
	font-weight: 600;
	transition: border-color .2s, color .2s;
}
.etb .etb-steps__n {
	width: 22px; height: 22px;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--etb-wash);
	font-size: 12px;
	font-variant-numeric: tabular-nums;
}
.etb .etb-steps li.is-current,
.etb .etb-steps li.is-done { border-color: var(--etb-accent); color: var(--etb-ink); }
.etb .etb-steps li.is-current .etb-steps__n,
.etb .etb-steps li.is-done .etb-steps__n { background: var(--etb-accent); color: var(--etb-on-accent); }

.etb-modal__body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 22px 24px 8px; }

.etb-modal__foot {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	padding: 14px 24px 18px;
	border-top: 1px solid var(--etb-line);
	background: var(--etb-paper);
}
.etb-modal__foot [data-etb-back] { margin-right: auto; }
.etb-modal.is-done .etb-modal__foot,
.etb-modal.is-done .etb-steps { display: none; }

.etb-progress { flex: 1; height: 6px; border-radius: 6px; background: var(--etb-wash); overflow: hidden; }
.etb-progress span { display: block; height: 100%; width: 0; background: var(--etb-accent); transition: width .2s; }

/* Fields */
.etb-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 16px; }
.etb-field { margin: 0; min-width: 0; border: 0; padding: 0; }
.etb-field--wide { grid-column: 1 / -1; }
@media (max-width: 560px) { .etb-grid { grid-template-columns: minmax(0, 1fr); } }

.etb .etb-label { display: block; margin: 0 0 6px; padding: 0; font-size: 15px; font-weight: 600; color: var(--etb-ink); }
.etb .etb-optional { font-weight: 400; color: var(--etb-faint); }
.etb .etb-help { margin: -2px 0 8px; font-size: 13.5px; color: var(--etb-muted); line-height: 1.4; }

.etb .etb-input {
	display: block;
	width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 11px 14px;
	border: 1.5px solid #cfd3dc;
	border-radius: 11px;
	background: #fff;
	color: var(--etb-ink);
	font: inherit;
	font-size: 16px; /* stops iOS zoom */
	line-height: 1.4;
	box-shadow: none;
	transition: border-color .15s, box-shadow .15s;
}
.etb textarea.etb-input { min-height: 84px; resize: vertical; }
.etb .etb-input::placeholder { color: #a1a6b3; }
.etb .etb-input:hover { border-color: #b4b9c5; }
.etb .etb-input:focus { outline: none; border-color: var(--etb-accent); box-shadow: 0 0 0 4px rgba(var(--etb-accent-rgb), .14); }
.etb .is-invalid .etb-input,
.etb .etb-input[aria-invalid="true"] { border-color: var(--etb-danger); }
.etb .is-invalid .etb-input:focus { box-shadow: 0 0 0 4px rgba(198, 47, 59, .12); }

.etb .etb-error { margin: 6px 0 0; font-size: 13.5px; font-weight: 500; color: var(--etb-danger); }

/* T-shirt chips */
.etb .etb-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.etb .etb-chip { position: relative; margin: 0; cursor: pointer; }
.etb .etb-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.etb .etb-chip span {
	display: grid;
	place-items: center;
	min-width: 54px;
	height: 44px;
	padding: 0 12px;
	border: 1.5px solid #cfd3dc;
	border-radius: 10px;
	font-weight: 600;
	font-size: 15px;
	transition: all .15s;
}
.etb .etb-chip:hover span { border-color: #9da3b0; }
.etb .etb-chip input:checked + span { background: var(--etb-ink); border-color: var(--etb-ink); color: #fff; }
.etb .etb-chip input:focus-visible + span { box-shadow: 0 0 0 4px rgba(var(--etb-accent-rgb), .25); }
.etb .is-invalid .etb-chip span { border-color: var(--etb-danger); }

/* Checkbox */
.etb .etb-check { display: grid; grid-template-columns: 24px 1fr; gap: 12px; align-items: start; margin: 0; font-size: 15px; line-height: 1.45; cursor: pointer; }
.etb .etb-check input { position: absolute; opacity: 0; width: 24px; height: 24px; margin: 0; }
.etb .etb-check__box {
	width: 24px; height: 24px;
	display: grid; place-items: center;
	border: 1.5px solid #b9bec9;
	border-radius: 7px;
	background: #fff;
	color: transparent;
	transition: all .15s;
}
.etb .etb-check input:checked + .etb-check__box { background: var(--etb-accent); border-color: var(--etb-accent); color: var(--etb-on-accent); }
.etb .etb-check input:focus-visible + .etb-check__box { box-shadow: 0 0 0 4px rgba(var(--etb-accent-rgb), .25); }
.etb .is-invalid .etb-check__box { border-color: var(--etb-danger); }

.etb .etb-terms { margin: 10px 0 0 36px; font-size: 14px; color: var(--etb-muted); }
.etb .etb-terms summary { cursor: pointer; color: var(--etb-ink); font-weight: 600; width: max-content; max-width: 100%; }
.etb .etb-terms p { margin: 8px 0 0; line-height: 1.5; }

/* Payment */
.etb-pay { margin: 0 0 22px; border: 1.5px solid var(--etb-line); border-radius: 14px; overflow: hidden; container-type: inline-size; }
.etb .etb-pay__due {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 16px 18px;
	background: rgba(var(--etb-accent-rgb), .07);
	font-size: 15px;
	font-weight: 600;
}
.etb .etb-pay__due strong { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.etb .etb-bank { margin: 0; padding: 6px 18px; }
.etb .etb-bank__row { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--etb-line); }
.etb .etb-bank__row:last-child { border-bottom: 0; }
.etb .etb-bank dt { margin: 0; font-size: 14px; color: var(--etb-muted); }
.etb .etb-bank dd { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 600; font-size: 15px; font-variant-numeric: tabular-nums; min-width: 0; }
.etb .etb-bank dd > span { overflow-wrap: anywhere; }
.etb .etb-bank__row--ref dd > span { color: var(--etb-accent); }
@container (max-width: 440px) {
	.etb .etb-bank__row,
	.etb .etb-bankcard .etb-bank__row { grid-template-columns: minmax(0, 1fr); gap: 1px; padding: 8px 0; }
	.etb .etb-bank dt { font-size: 12.5px; }
	.etb .etb-pay__due strong { font-size: 22px; }
}

.etb .etb-copy {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 5px;
	min-height: 32px;
	padding: 0 10px;
	border: 1px solid var(--etb-line);
	border-radius: 8px;
	background: #fff;
	color: var(--etb-ink);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.etb .etb-copy:hover { border-color: var(--etb-ink); }
.etb .etb-copy.is-copied { border-color: var(--etb-success); color: var(--etb-success); }

.etb .etb-pay__note { display: flex; gap: 8px; align-items: flex-start; margin: 0; padding: 12px 18px 14px; font-size: 14px; color: var(--etb-muted); border-top: 1px solid var(--etb-line); }
.etb .etb-pay__note .etb-icon { margin-top: 2px; }

/* Pay step */
.etb .etb-paynow {
	display: grid;
	grid-template-columns: 44px 1fr;
	gap: 14px;
	align-items: start;
	margin: 0 0 18px;
	padding: 16px 18px;
	border-radius: 14px;
	background: var(--etb-accent);
	color: var(--etb-on-accent);
}
.etb .etb-paynow__icon { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .16); }
.etb .etb-paynow__title { margin: 2px 0 4px; font-size: 18px; font-weight: 750; line-height: 1.25; color: inherit; letter-spacing: -0.01em; }
.etb .etb-paynow__text { margin: 0; font-size: 15px; line-height: 1.45; opacity: .92; }
.etb .etb-paynow__text strong { opacity: 1; font-weight: 800; }
.etb .etb-pay__app { margin: 14px 0 6px; font-size: 13.5px; color: var(--etb-muted); }
.etb .etb-pay__missing { margin: 0; padding: 14px 18px; font-size: 14.5px; color: var(--etb-muted); }
.etb .etb-step[data-step="2"] .etb-pay { margin-bottom: 0; }
.etb .etb-bank__row--ref dd > span { font-weight: 700; }

.etb .etb-paidline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 6px 14px;
	margin: 0 0 18px;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--etb-wash);
	font-size: 14.5px;
}

/* Upload */
.etb .etb-drop {
	position: relative;
	display: grid;
	grid-template-columns: auto minmax(0, 1fr);
	grid-template-areas: "icon text" "icon hint";
	column-gap: 14px;
	row-gap: 2px;
	align-items: center;
	padding: 18px;
	border: 2px dashed #c6cbd6;
	border-radius: 14px;
	background: var(--etb-wash);
	cursor: pointer;
	transition: border-color .15s, background-color .15s;
}
.etb .etb-drop:hover,
.etb .etb-drop.is-over { border-color: var(--etb-accent); background: rgba(var(--etb-accent-rgb), .06); }
.etb .etb-drop:focus-within { border-color: var(--etb-accent); box-shadow: 0 0 0 4px rgba(var(--etb-accent-rgb), .14); }
.etb .is-invalid .etb-drop { border-color: var(--etb-danger); }
.etb .etb-drop__icon { grid-area: icon; width: 46px; height: 46px; display: grid; place-items: center; border-radius: 12px; background: #fff; color: var(--etb-accent); }
.etb .etb-drop__text { grid-area: text; font-size: 15px; }
.etb .etb-drop__text strong { color: var(--etb-accent); }
.etb .etb-drop__or { color: var(--etb-muted); }
.etb .etb-drop__hint { grid-area: hint; font-size: 13px; color: var(--etb-faint); }

.etb .etb-file { display: flex; align-items: center; gap: 12px; padding: 12px; border: 1.5px solid var(--etb-line); border-radius: 14px; }
.etb .etb-file[hidden] { display: none; }
.etb .etb-file__thumb { width: 52px; height: 52px; flex: none; display: grid; place-items: center; border-radius: 10px; border: 1px solid var(--etb-line); background: var(--etb-wash); color: var(--etb-muted); overflow: hidden; }
.etb .etb-file__thumb img { width: 100%; height: 100%; object-fit: cover; margin: 0; }
.etb .etb-file__meta { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.etb .etb-file__name { font-weight: 600; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.etb .etb-file__size { font-size: 13px; color: var(--etb-muted); }
.etb .etb-linkbtn { border: 0; background: none; padding: 6px; color: var(--etb-accent); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

.etb-pay + .etb-field { margin-bottom: 20px; }

/* Alerts */
.etb .etb-alert { margin: 0 0 18px; padding: 12px 14px; border-radius: 11px; background: #fdecee; color: #8e1f2a; font-size: 15px; font-weight: 500; }

/* Done */
.etb .etb-done { text-align: center; padding: 18px 4px 26px; outline: none; }
.etb .etb-done__mark {
	width: 68px; height: 68px;
	margin: 0 auto 16px;
	display: grid; place-items: center;
	border-radius: 50%;
	background: var(--etb-accent);
	color: var(--etb-on-accent);
	animation: etb-pop .45s var(--etb-ease);
}
@keyframes etb-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
.etb .etb-done__title { margin: 0 0 8px; font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }
.etb .etb-done__ref { margin: 0 0 14px; font-size: 16px; color: var(--etb-muted); }
.etb .etb-done__ref strong { color: var(--etb-ink); font-variant-numeric: tabular-nums; padding: 3px 8px; border-radius: 7px; background: var(--etb-wash); }
.etb .etb-done__text { margin: 0 auto 22px; max-width: 42ch; font-size: 15.5px; color: var(--etb-muted); }
.etb .etb-done__text strong { color: var(--etb-ink); }
.etb .etb-done__actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }

.etb .etb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Phone: the dialog becomes a full-height sheet */
@media (max-width: 600px) {
	dialog.etb-modal {
		width: 100vw;
		max-width: 100vw;
		height: 100vh;
		height: 100dvh;
		max-height: 100vh;
		max-height: 100dvh;
		margin: 0;
		border-radius: 0;
	}
	.etb-modal__head { padding: 16px 18px 14px; }
	.etb .etb-modal__title { font-size: 19px; }
	.etb .etb-steps li { font-size: 13px; gap: 6px; white-space: nowrap; }
	.etb .etb-steps__n { width: 20px; height: 20px; font-size: 11px; }
	.etb .etb-paynow { grid-template-columns: minmax(0, 1fr); gap: 10px; }
	.etb .etb-paynow__icon { display: none; }
	.etb-modal__body { padding: 18px 18px 8px; }
	.etb-modal__foot { padding: 12px 18px calc(14px + env(safe-area-inset-bottom)); }
	.etb-modal__foot .etb-btn--primary { flex: 1; }
	.etb .etb-date--lg .etb-date__day { font-size: 54px; }
}

@media (prefers-reduced-motion: reduce) {
	.etb *, .etb *::before, .etb *::after, dialog.etb-modal[open] { animation: none !important; transition: none !important; }
}
.etb .etb-step[data-step="3"] .etb-field[data-field="pop"] { margin-bottom: 20px; }
