/* JB Tickets – event page laid out as a theme product page (the layout, price, quantity −/+ and
   "Add to cart" come from the theme/WooCommerce product styles); here: dates/location lines,
   places left and the participants popup. */

.jbt-event-page {
	--jbt-ink: #111418;
	--jbt-muted: #6b7079;
	--jbt-line: #e6e1da;
	--jbt-field: #d9d3ca;
}

/* Dates / location under the price */
.jbt-event__facts { margin: 0 0 14px; }
.jbt-event__facts p { margin: 0 0 4px; }
.jbt-event__label {
	display: inline-block;
	min-width: 84px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--jbt-muted);
}

.jbt-event-page .summary p.stock { margin: 0 0 6px; font-size: 14px; color: var(--jbt-muted); }
.jbt-event-page .summary p.stock.out-of-stock { color: #e9234b; font-weight: 700; }
.jbt-event-page .jbt__ticket + .jbt__ticket { margin-top: 12px; }
/* One ticket type: quantity and "Add to cart" on one line, exactly like a product page. */
.jbt-event-page form.cart.jbt__form > .jbt__ticket:only-of-type { display: contents; }
.jbt-event-page .jbt__ticket.is-closed { opacity: 0.6; }
.jbt-event-page .jbt__ticket-name { margin: 0 0 4px; }

/* Participants popup */
.jbt-dialog {
	width: min(560px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	margin: auto;
	padding: 0;
	border: 0;
	background: #fff;
	color: var(--jbt-ink);
	box-shadow: 0 30px 80px -20px rgba(0, 0, 0, 0.45);
	overflow: auto;
}
.jbt-dialog::backdrop { background: rgba(10, 12, 15, 0.55); }
.jbt-dialog__inner { position: relative; padding: 32px 28px 24px; }
.jbt-dialog__close {
	position: absolute;
	top: 10px;
	right: 12px;
	width: 40px;
	height: 40px;
	padding: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--jbt-ink) !important;
	font-size: 28px !important;
	line-height: 1 !important;
	cursor: pointer;
	box-shadow: none !important;
}
.jbt-dialog__title { margin: 0 0 6px !important; padding-right: 40px; }
.jbt-dialog__lead { margin: 0 0 20px; color: var(--jbt-muted); font-size: 15px; }
.jbt-dialog__group-title { margin: 18px 0 10px !important; font-size: 16px !important; }

.jbt-dialog .jbt__person {
	margin: 0 0 16px !important;
	padding: 16px 0 0 !important;
	border: 0 !important;
	border-top: 1px solid var(--jbt-line) !important;
	min-width: 0;
}
.jbt-dialog .jbt__person[hidden],
.jbt-dialog .jbt-dialog__group[hidden] { display: none !important; }
.jbt-dialog .jbt__person-title {
	float: left;
	width: 100%;
	margin: 0 0 10px !important;
	padding: 0 !important;
	font-size: 13px !important;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--jbt-ink) !important;
}
.jbt-dialog .jbt__person-fields {
	clear: both;
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}
.jbt-dialog .form-row { margin: 0 !important; padding: 0 !important; width: auto !important; float: none !important; }
.jbt-dialog .form-row label { display: block; margin: 0 0 4px; font-size: 13px; }
.jbt-dialog .form-row .required { color: #e9234b; text-decoration: none; border: 0; }
.jbt-dialog .form-row input {
	width: 100% !important;
	min-height: 46px;
	margin: 0 !important;
	padding: 10px 14px !important;
	border: 1px solid var(--jbt-field) !important;
	background: #fff !important;
	color: var(--jbt-ink) !important;
	font-size: 16px !important;
	box-shadow: none !important;
}
.jbt-dialog .form-row input:focus { outline: none !important; border-color: var(--jbt-ink) !important; }
.jbt-dialog .form-row input:user-invalid { border-color: #c9372c !important; }

.jbt-dialog__actions {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-top: 22px;
}
.jbt-dialog__back {
	padding: 0 !important;
	border: 0 !important;
	background: none !important;
	color: var(--jbt-ink) !important;
	text-decoration: underline;
	cursor: pointer;
	box-shadow: none !important;
}
.jbt-dialog .jbt__buy { margin: 0 !important; }

@media (max-width: 600px) {
	.jbt-dialog__inner { padding: 28px 18px 20px; }
	.jbt-dialog .jbt__person-fields { grid-template-columns: 1fr; }
	.jbt-dialog__actions { flex-direction: column-reverse; align-items: stretch; }
	.jbt-dialog .jbt__buy { width: 100%; }
	.jbt-dialog__back { align-self: center; }
}

/* "Other JB Trainings": 3D coverflow */
.jbt-others { clear: both; padding-top: 24px; }
.jbt-others > h2 { text-align: center; }
.jbt-cf {
	--jbt-card-w: 260px;
	position: relative;
	margin: 10px 0 0;
	padding: 0 0 8px;
	user-select: none;
}
.jbt-cf__stage {
	position: relative;
	height: calc(var(--jbt-card-w) * 1.25 + 120px);
	perspective: 1100px;
	perspective-origin: 50% 40%;
	transform-style: preserve-3d;
	overflow: hidden;
	touch-action: pan-y;
	cursor: grab;
}
.jbt-cf.is-dragging .jbt-cf__stage { cursor: grabbing; }
.jbt-cf__card {
	position: absolute;
	top: 46%;
	left: 50%;
	display: block;
	width: var(--jbt-card-w);
	color: #fff !important;
	text-decoration: none !important;
	border-radius: 18px;
	transform-style: preserve-3d;
	transition: transform 0.7s cubic-bezier(0.22, 0.8, 0.2, 1), opacity 0.5s ease, box-shadow 0.5s ease;
	will-change: transform;
	box-shadow: 0 18px 40px -18px rgba(0, 0, 0, 0.55);
	-webkit-box-reflect: below 10px linear-gradient(transparent 70%, rgba(255, 255, 255, 0.18));
}
.jbt-cf.is-dragging .jbt-cf__card { transition: none; }
.jbt-cf__card.is-active { box-shadow: 0 34px 70px -24px rgba(0, 0, 0, 0.7); }
.jbt-cf__img {
	display: block;
	aspect-ratio: 4 / 5;
	border-radius: 18px;
	overflow: hidden;
	background: #1b1e22;
}
.jbt-cf__img img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	object-fit: cover;
	transform: scale(1.02);
	transition: transform 0.9s cubic-bezier(0.22, 0.8, 0.2, 1);
	pointer-events: none;
}
.jbt-cf__card.is-active:hover .jbt-cf__img img { transform: scale(1.08); }
.jbt-cf__info {
	position: absolute;
	inset: auto 0 0 0;
	display: block;
	padding: 48px 16px 16px;
	border-radius: 0 0 18px 18px;
	background: linear-gradient(to top, rgba(8, 10, 12, 0.88), rgba(8, 10, 12, 0));
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}
.jbt-cf__card.is-active .jbt-cf__info { opacity: 1; transform: none; }
.jbt-cf__title {
	display: block;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: 0.01em;
	text-transform: uppercase;
}
.jbt-cf__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 6px; font-size: 13px; }
.jbt-cf__price, .jbt-cf__price * { color: #fff !important; font-weight: 700; }
.jbt-cf__state {
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	font-size: 12px;
}
.jbt-cf__state.is-out { background: #e9234b; }

.jbt-cf__dots { display: flex; justify-content: center; gap: 8px; margin-top: 4px; }
.jbt-cf__dot {
	width: 8px;
	height: 8px;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 999px !important;
	background: #d9d3ca !important;
	cursor: pointer;
	transition: width 0.3s ease, background-color 0.3s ease;
}
.jbt-cf__dot.is-active { width: 26px; background: #111418 !important; }
.jbt-cf.is-single .jbt-cf__dots { display: none; }

/* Before the script runs (or without it): a simple scrolling row. */
.jbt-cf:not(.is-ready) .jbt-cf__stage { display: flex; gap: 16px; height: auto; overflow-x: auto; perspective: none; }
.jbt-cf:not(.is-ready) .jbt-cf__card { position: relative; top: auto; left: auto; flex: 0 0 var(--jbt-card-w); transform: none; }
.jbt-cf:not(.is-ready) .jbt-cf__info { opacity: 1; transform: none; }

@media (max-width: 600px) {
	.jbt-cf { --jbt-card-w: 210px; }

}
@media (prefers-reduced-motion: reduce) {
	.jbt-cf__card, .jbt-cf__img img, .jbt-cf__info { transition: none; }
	.jbt-cf__card { -webkit-box-reflect: unset; }
}

/* JB Trainings page: large coverflow in place of the Elementor flyer carousel */
/* PC: as large as possible while the whole card (4:5) still fits in the window height. */
.jbt-cf--large { --jbt-card-w: min(760px, 50vw, calc((100vh - 230px) * 0.8)); }
.jbt-cf--large .jbt-cf__stage { perspective: 1600px; height: calc(var(--jbt-card-w) * 1.25 + 90px); }
.jbt-cf--large .jbt-cf__title { font-size: 20px; }
.jbt-list-slot { width: 100%; }
.jbt-list-original.is-replaced { display: none !important; }
/* JB coupon packs: square cards; on PC they stand still, all visible */
/* As large as the trainings: square, so the height limit is the full card side. */
.jbt-cf--square { --jbt-card-w: min(720px, 46vw, calc(100vh - 230px)); }
.jbt-cf--square .jbt-cf__stage { perspective: 1600px; }
.jbt-cf--square .jbt-cf__img { aspect-ratio: 1 / 1; }
.jbt-cf--square .jbt-cf__stage { height: calc(var(--jbt-card-w) + 90px); }
.jbt-cf.is-static .jbt-cf__stage { cursor: default; touch-action: auto; }
.jbt-cf.is-static .jbt-cf__dots { display: none; }
.jbt-cf.is-static .jbt-cf__card { -webkit-box-reflect: unset; }
/* Two packs side by side (pack page): each card a little under half the row. */
.jbt-cf--square.is-pair { --jbt-card-w: min(460px, 36vw, calc(100vh - 230px)); }

@media (max-width: 600px) {
	.jbt-cf--large { --jbt-card-w: 82vw; }
	.jbt-cf--square { --jbt-card-w: 82vw; }
}
.jbt-list-empty { margin: 40px auto; text-align: center; font-family: "RethinkSansExtraBold", "Rethink Sans", sans-serif; font-size: 22px; text-transform: uppercase; color: #111418; }

/* Pack page: who the pack is for. */
.jbt-recipient{margin:0 0 18px;width:100%}
.jbt-recipient label{display:block;margin:0 0 6px;font-size:13px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.jbt-recipient input{width:100%;max-width:420px;height:48px;padding:0 16px;border:1px solid #111418;border-radius:800px;font-size:16px;background:#fff}
.jbt-recipient__hint{margin:6px 0 0;font-size:13px;line-height:1.45;color:#5f646d;max-width:460px}

/* SOLD OUT: two crossed "slope closed" tapes over the picture of a sold-out JB Training. */
.jbt-cf__img, .jbt-event-page .woocommerce-product-gallery__image { position: relative; }
.jbt-event-page .woocommerce-product-gallery__image { overflow: hidden; }
.jbt-soldout { position: absolute; inset: 0; z-index: 2; overflow: hidden; pointer-events: none; container-type: inline-size; }
.jbt-cf__img:has(.jbt-soldout) img,
.jbt-event-page .woocommerce-product-gallery__image:has(.jbt-soldout) img { filter: grayscale(0.4) brightness(0.85); }
.jbt-soldout__tape {
	position: absolute;
	left: -30%;
	right: -30%;
	height: 17cqw;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 5cqw;
	white-space: nowrap;
	background: repeating-linear-gradient(135deg, #e9234b 0 10cqw, #fff 10cqw 20cqw);
	box-shadow: 0 5px 14px rgba(0, 0, 0, 0.35);
}
.jbt-soldout__tape span {
	flex: none;
	background: #fff;
	color: #e9234b;
	border: max(2px, 0.8cqw) solid #e9234b;
	padding: 1cqw 3.5cqw;
	font-weight: 800;
	font-size: 7cqw;
	line-height: 1.15;
	letter-spacing: 0.12em;
}
.jbt-soldout__tape--1 { top: 37%; transform: rotate(-22deg); }
.jbt-soldout__tape--2 { top: 50%; transform: rotate(16deg); }

/* Last place: yellow strip with "1 place left" scrolling along the top of the poster (JB Trainings page only). */
.jbt-last {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	z-index: 2;
	height: 6cqw;
	min-height: 19px;
	display: flex;
	align-items: center;
	overflow: hidden;
	pointer-events: none;
	background: #ffcf2e;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.25);
}
.jbt-cf__img { container-type: inline-size; }
.jbt-last__track { display: flex; flex: none; width: max-content; animation: jbt-last-scroll 12s linear infinite; }
.jbt-last__group { display: flex; flex: none; }
.jbt-last__group span {
	flex: none;
	padding: 0 2.4cqw;
	font-weight: 900;
	font-size: max(9px, 2.8cqw);
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
	color: #111;
}
.jbt-last__group span::before { content: "\2744\FE0E  "; }
@keyframes jbt-last-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .jbt-last__track { animation: none; } }
