@bigz-app/booking-widget 1.4.2 → 1.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2103,6 +2103,28 @@
2103
2103
  c = `0x${c.join("")}`;
2104
2104
  return [(c >> 16) & 255, (c >> 8) & 255, c & 255].join(",");
2105
2105
  };
2106
+ // Pick a readable text color (dark or light) for content sitting on top of
2107
+ // the given background color. Bright/neon highlights (teal, matrix green,
2108
+ // gold, etc.) need dark text — white text on them is unreadable.
2109
+ const getContrastingTextColor = (color, lightColor = "#ffffff", darkColor = "#0e1420") => {
2110
+ let rgb;
2111
+ if (color.startsWith("#")) {
2112
+ rgb = hexToRgb(color);
2113
+ }
2114
+ else if (color.startsWith("rgb")) {
2115
+ rgb = color.replace(/rgba?\(|\)/g, "").split(",").slice(0, 3).join(",");
2116
+ }
2117
+ else {
2118
+ return lightColor; // Can't parse (e.g. hsl/oklch/semantic) — keep existing default
2119
+ }
2120
+ const [r, g, b] = rgb.split(",").map((n) => parseInt(n, 10) / 255);
2121
+ if ([r, g, b].some((n) => Number.isNaN(n)))
2122
+ return lightColor;
2123
+ // Relative luminance (sRGB, WCAG)
2124
+ const toLinear = (n) => (n <= 0.03928 ? n / 12.92 : Math.pow((n + 0.055) / 1.055, 2.4));
2125
+ const luminance = 0.2126 * toLinear(r) + 0.7152 * toLinear(g) + 0.0722 * toLinear(b);
2126
+ return luminance > 0.45 ? darkColor : lightColor;
2127
+ };
2106
2128
  const colors = config.colors || {};
2107
2129
  const finalColors = {
2108
2130
  highlight: getCSSValue(colors.highlight, themeDefaults.highlight),
@@ -2122,7 +2144,7 @@
2122
2144
  "--bw-surface-color": finalColors.surface,
2123
2145
  "--bw-text-color": finalColors.text,
2124
2146
  "--bw-text-muted": addOpacity(finalColors.text, 0.7),
2125
- "--bw-button-text-color": themeDefaults.buttonTextColor || "#ffffff",
2147
+ "--bw-button-text-color": themeDefaults.buttonTextColor || getContrastingTextColor(finalColors.highlight),
2126
2148
  "--bw-border-color": finalColors.border,
2127
2149
  "--bw-success-color": finalColors.success,
2128
2150
  "--bw-warning-color": finalColors.warning,
@@ -2140,6 +2162,9 @@
2140
2162
  "--bw-highlight-muted": addOpacity(finalColors.highlight, 0.1),
2141
2163
  "--bw-highlight-subtle": addOpacity(finalColors.highlight, 0.05),
2142
2164
  "--bw-text-subtle": addOpacity(finalColors.text, 0.4),
2165
+ // Some themes (neon-brutalism) call for uppercased titles & buttons
2166
+ "--bw-text-transform": themeName === "dark-neon-brutalism" ? "uppercase" : "none",
2167
+ "--bw-letter-spacing": themeName === "dark-neon-brutalism" ? "0.04em" : "normal",
2143
2168
  colorScheme: (["navy-night", "green-deep", "green-matrix", "gold-luxury", "purple-electric", "dark-neon-brutalism", "amber-retro", "orange-raw"].includes(themeName) || themeName.startsWith("dark-")) ? "dark" : "light",
2144
2169
  };
2145
2170
  }, [
@@ -7367,6 +7392,8 @@
7367
7392
  fontSize: "16px",
7368
7393
  color: "var(--bw-text-color)",
7369
7394
  fontFamily: "var(--bw-font-family)",
7395
+ textTransform: "var(--bw-text-transform, none)",
7396
+ letterSpacing: "var(--bw-letter-spacing, normal)",
7370
7397
  flex: 1,
7371
7398
  paddingRight: "12px",
7372
7399
  minWidth: 0,
@@ -11544,6 +11571,8 @@
11544
11571
  transition: "all 0.2s ease",
11545
11572
  whiteSpace: "nowrap",
11546
11573
  border: "none",
11574
+ textTransform: "var(--bw-text-transform, none)",
11575
+ letterSpacing: "var(--bw-letter-spacing, normal)",
11547
11576
  };
11548
11577
  // CSS class name for button hover effects
11549
11578
  const buttonClassName = "bw-button-hover";
@@ -12952,19 +12981,21 @@
12952
12981
  textAlign: "right",
12953
12982
  }, children: u$2("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), isAvailable && (u$2("button", { onClick: handleBookingClick, style: {
12954
12983
  backgroundColor: "var(--bw-highlight-color)",
12955
- color: "#ffffff",
12984
+ color: "var(--bw-button-text-color, #ffffff)",
12956
12985
  padding: "14px 28px",
12957
12986
  border: "none",
12958
12987
  borderRadius: "var(--bw-border-radius)",
12959
12988
  fontSize: "16px",
12960
12989
  fontWeight: 600,
12961
12990
  fontFamily: "var(--bw-font-family)",
12991
+ textTransform: "var(--bw-text-transform, none)",
12992
+ letterSpacing: "var(--bw-letter-spacing, normal)",
12962
12993
  display: "flex",
12963
12994
  alignItems: "center",
12964
12995
  gap: "8px",
12965
12996
  cursor: "pointer",
12966
12997
  transition: "all 0.2s ease",
12967
- }, children: [u$2(IconWave, { size: 20, color: "white" }), t("button.bookNow")] }))] }), !isAvailable && (u$2("div", { style: {
12998
+ }, children: [u$2(IconWave, { size: 20, color: "var(--bw-button-text-color, #ffffff)" }), t("button.bookNow")] }))] }), !isAvailable && (u$2("div", { style: {
12968
12999
  position: "absolute",
12969
13000
  inset: 0,
12970
13001
  backgroundColor: "rgba(0, 0, 0, 0.3)",
@@ -14250,15 +14281,15 @@
14250
14281
  backgroundColor: isAvailable
14251
14282
  ? "var(--bw-success-color)"
14252
14283
  : "var(--bw-error-color)",
14253
- }, children: isAvailable ? t("events.spotsAvailable") : t("events.soldOut") }) }), u$2("div", { style: { position: "absolute", top: "16px", left: "16px", zIndex: 10 }, children: u$2("div", { style: {
14254
- fontSize: "13px",
14255
- color: "var(--bw-surface-color)",
14256
- fontWeight: 600,
14257
- backgroundColor: "var(--bw-highlight-color)",
14258
- padding: "2px 8px",
14259
- borderRadius: "var(--bw-border-radius)",
14260
- fontFamily: "var(--bw-font-family)",
14261
- }, children: eventType.category.name }) }), u$2("div", { className: "event-type-img", style: { position: "relative", width: "100%", height: "300px" }, children: u$2(ImageCarousel, { images: eventType.images, eventName: eventType.name }) }), u$2("div", { className: "event-type-content", style: {
14284
+ }, children: isAvailable ? t("events.spotsAvailable") : t("events.soldOut") }) }), eventType.images && eventType.images.length > 0 && (u$2(k$3, { children: [u$2("div", { style: { position: "absolute", top: "16px", left: "16px", zIndex: 10 }, children: u$2("div", { style: {
14285
+ fontSize: "13px",
14286
+ color: "var(--bw-surface-color)",
14287
+ fontWeight: 600,
14288
+ backgroundColor: "var(--bw-highlight-color)",
14289
+ padding: "2px 8px",
14290
+ borderRadius: "var(--bw-border-radius)",
14291
+ fontFamily: "var(--bw-font-family)",
14292
+ }, children: eventType.category.name }) }), u$2("div", { className: "event-type-img", style: { position: "relative", width: "100%", height: "300px" }, children: u$2(ImageCarousel, { images: eventType.images, eventName: eventType.name }) })] })), u$2("div", { className: "event-type-content", style: {
14262
14293
  padding: "12px 18px",
14263
14294
  display: "flex",
14264
14295
  flexDirection: "column",
@@ -14401,8 +14432,7 @@
14401
14432
  alignItems: "center",
14402
14433
  marginTop: "10px",
14403
14434
  gap: "12px",
14404
- }, children: [(eventType.description ||
14405
- (eventType.highlights && eventType.highlights.length > 0)) && (u$2("button", { onClick: (e) => {
14435
+ }, children: [eventType.description && (u$2("button", { onClick: (e) => {
14406
14436
  e.stopPropagation();
14407
14437
  handleShowDetails(eventType);
14408
14438
  }, style: {
@@ -14421,12 +14451,14 @@
14421
14451
  transition: "all 0.2s ease",
14422
14452
  }, children: t("button.moreDetails") })), isAvailable && (u$2("div", { style: {
14423
14453
  backgroundColor: "var(--bw-highlight-color)",
14424
- color: "var(--bw-surface-color)",
14454
+ color: "var(--bw-button-text-color, #ffffff)",
14425
14455
  padding: "12px 14px",
14426
14456
  borderRadius: "var(--bw-border-radius)",
14427
14457
  fontSize: "clamp(1rem, 2vw, 16px)",
14428
14458
  fontWeight: 600,
14429
14459
  fontFamily: "var(--bw-font-family)",
14460
+ textTransform: "var(--bw-text-transform, none)",
14461
+ letterSpacing: "var(--bw-letter-spacing, normal)",
14430
14462
  display: "flex",
14431
14463
  alignItems: "center",
14432
14464
  justifyContent: "center",
@@ -14435,7 +14467,7 @@
14435
14467
  border: "none",
14436
14468
  cursor: "pointer",
14437
14469
  transition: "all 0.2s ease",
14438
- }, children: [u$2(IconWave, { size: 15, color: "var(--bw-surface-color)" }), " ", t("button.bookNow")] }))] })] })] }), showVoucherAttachment && onVoucherClick && (u$2(VoucherAttachment, { onClick: () => onVoucherClick(eventType.id) })), !isAvailable && (u$2("div", { style: {
14470
+ }, children: [u$2(IconWave, { size: 15, color: "var(--bw-button-text-color, #ffffff)" }), " ", t("button.bookNow")] }))] })] })] }), showVoucherAttachment && onVoucherClick && (u$2(VoucherAttachment, { onClick: () => onVoucherClick(eventType.id) })), !isAvailable && (u$2("div", { style: {
14439
14471
  position: "absolute",
14440
14472
  inset: 0,
14441
14473
  backgroundColor: "rgba(0, 0, 0, 0.3)",
@@ -14858,7 +14890,7 @@
14858
14890
  }) })] }) }));
14859
14891
  }
14860
14892
 
14861
- function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText, showAllButton, isLoadingEventDetails = false, isLoadingShowAll = false, isLoading = false, }) {
14893
+ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText, showAllButton, isLoadingEventDetails = false, isLoadingShowAll = false, isLoading = false, count = 3, }) {
14862
14894
  const t = useTranslations();
14863
14895
  const { locale } = useLocale();
14864
14896
  const timezone = useTimezone();
@@ -14910,7 +14942,7 @@
14910
14942
  };
14911
14943
  // Show loading skeleton
14912
14944
  if (isLoading) {
14913
- return u$2(NextEventsSkeleton, { count: 3 });
14945
+ return u$2(NextEventsSkeleton, { count: count });
14914
14946
  }
14915
14947
  if (events.length === 0) {
14916
14948
  return (u$2("div", { style: { maxWidth: "500px", margin: "0 auto", padding: "16px" }, children: u$2("div", { style: {
@@ -14966,55 +14998,44 @@
14966
14998
  gap: "8px",
14967
14999
  }, children: [u$2("span", { style: { fontSize: "16px" }, children: "\uD83D\uDD04" }), t("common.reload")] })] }) }));
14968
15000
  }
15001
+ const today = new Date();
14969
15002
  return (u$2("div", { style: {
14970
15003
  maxWidth: "500px",
14971
15004
  margin: "0 auto",
14972
15005
  padding: "12px 16px",
14973
15006
  fontFamily: "var(--bw-font-family)",
14974
- }, children: [u$2("div", { style: { display: "flex", flexDirection: "column", gap: "4px", marginBottom: "10px" }, children: events.map((event) => {
15007
+ }, children: [u$2("div", { style: { display: "flex", flexDirection: "column", gap: "12px", marginBottom: "10px" }, children: events.map((event) => {
14975
15008
  const availableSpots = event.maxParticipants - event.participantCount;
14976
15009
  const isFullyBooked = availableSpots === 0;
14977
15010
  const startDate = new Date(event.startTime);
14978
- const today = new Date();
14979
15011
  const isPastEvent = today.toISOString() >= startDate.toISOString();
14980
- const isFullAvailability = availableSpots / event.maxParticipants >= 0.8;
14981
- const isHighAvailability = availableSpots / event.maxParticipants >= 0.5;
14982
- const isMediumAvailability = availableSpots / event.maxParticipants >= 0.3;
14983
- const isLowAvailability = availableSpots / event.maxParticipants >= 0.15;
14984
- const getAvailabilityColor = () => {
14985
- if (isFullAvailability)
14986
- return "var(--bw-success-color)";
14987
- if (isHighAvailability)
14988
- return "var(--bw-warning-color)";
14989
- if (isMediumAvailability)
14990
- return "var(--bw-availability-medium-color, #f97316)";
14991
- if (isLowAvailability)
14992
- return "var(--bw-availability-low-color, #8b5cf6)";
14993
- return "var(--bw-highlight-color)";
14994
- };
14995
15012
  const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
15013
+ const availabilityRatio = availableSpots / event.maxParticipants;
15014
+ const allocationBadge = (() => {
15015
+ if (availabilityRatio >= 0.6)
15016
+ return null;
15017
+ if (availabilityRatio === 0)
15018
+ return { text: t("events.soldOut"), backgroundColor: "#7f1d1d", textColor: "#fca5a5" };
15019
+ if (availabilityRatio <= 0.3)
15020
+ return { text: t("instances.almostSoldOut"), backgroundColor: "#7f1d1d", textColor: "#fca5a5" };
15021
+ return { text: t("instances.popularDate"), backgroundColor: "#b45309", textColor: "#fbbf24" };
15022
+ })();
15023
+ const sameDay = formatWeekday(event.startTime, timezone, locale) === formatWeekday(event.endTime, timezone, locale);
14996
15024
  return (u$2("div", { style: {
14997
15025
  position: "relative",
14998
- borderRadius: "var(--bw-border-radius-small)",
14999
- padding: "0 4px",
15026
+ border: "1px solid var(--bw-border-color)",
15027
+ backgroundColor: "var(--bw-surface-color)",
15028
+ borderRadius: "var(--bw-border-radius)",
15029
+ padding: "16px 10px",
15000
15030
  transition: "all 0.2s ease",
15001
- border: "1px solid transparent",
15002
15031
  fontFamily: "var(--bw-font-family)",
15003
15032
  opacity: isDisabled ? 0.3 : 1,
15004
- filter: isDisabled ? "grayscale(100%)" : "none",
15033
+ filter: isDisabled ? "grayscale(40%)" : "none",
15005
15034
  cursor: isDisabled ? "not-allowed" : "pointer",
15006
15035
  }, onClick: () => {
15007
15036
  if (!isDisabled) {
15008
15037
  handleEventSelect(event.id);
15009
15038
  }
15010
- }, onMouseEnter: (hoverEvent) => {
15011
- if (!isDisabled) {
15012
- hoverEvent.currentTarget.style.backgroundColor = "var(--bw-surface-color)";
15013
- hoverEvent.currentTarget.style.borderColor = getAvailabilityColor();
15014
- }
15015
- }, onMouseLeave: (hoverEvent) => {
15016
- hoverEvent.currentTarget.style.backgroundColor = "transparent";
15017
- hoverEvent.currentTarget.style.borderColor = "transparent";
15018
15039
  }, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (u$2("div", { style: {
15019
15040
  position: "absolute",
15020
15041
  inset: 0,
@@ -15023,37 +15044,71 @@
15023
15044
  justifyContent: "center",
15024
15045
  backgroundColor: "rgba(15, 23, 42, 0.8)",
15025
15046
  borderRadius: "var(--bw-border-radius)",
15026
- }, children: u$2("div", { style: {
15027
- width: "32px",
15028
- height: "32px",
15029
- color: "var(--bw-highlight-color)",
15030
- fontSize: "32px",
15031
- animation: "spin 1s linear infinite",
15032
- }, children: "\u27F3" }) })), u$2("div", { style: {
15033
- minHeight: "32px",
15034
- display: "grid",
15035
- gridTemplateColumns: "1fr auto 20px",
15036
- alignItems: "center",
15037
- gap: "8px",
15047
+ }, children: u$2("div", { style: { width: "32px", height: "32px", color: "var(--bw-highlight-color)", opacity: 0.8, fontSize: "32px" }, children: "\u27F3" }) })), u$2("div", { style: {
15048
+ display: "flex",
15049
+ marginLeft: "auto",
15050
+ marginTop: "-20px",
15051
+ marginBottom: "4px",
15052
+ borderRadius: "var(--bw-border-radius-small)",
15053
+ fontFamily: "var(--bw-font-family)",
15054
+ zIndex: 50,
15055
+ whiteSpace: "nowrap",
15056
+ width: "fit-content",
15057
+ fontSize: "11px",
15058
+ fontWeight: 700,
15059
+ padding: "2px 8px",
15060
+ backgroundColor: allocationBadge?.backgroundColor || "transparent",
15061
+ color: allocationBadge?.textColor || "transparent",
15062
+ }, children: allocationBadge?.text || " - " }), u$2("div", { style: {
15063
+ display: "flex",
15064
+ justifyContent: "space-between",
15038
15065
  width: "100%",
15039
- fontSize: "13px",
15040
- color: "var(--bw-text-muted)",
15041
- }, children: [u$2("span", { style: {
15042
- whiteSpace: "nowrap",
15043
- display: "flex",
15044
- alignItems: "center",
15045
- gap: "3px",
15046
- overflow: "hidden",
15047
- textOverflow: "ellipsis",
15048
- textTransform: "capitalize",
15049
- }, children: [formatWeekday(event.startTime, timezone, locale), " ", formatDate(event.startTime, timezone, locale)] }), u$2("span", { style: {
15050
- display: "flex",
15051
- alignItems: "center",
15052
- gap: "4px",
15053
- whiteSpace: "nowrap",
15054
- fontWeight: 700,
15055
- color: "var(--bw-text-color)",
15056
- }, children: event.price !== null ? formatCurrency(event.price) : t("nextEvents.priceOnRequest") }), event.notes ? u$2(InfoBadge, { text: event.notes }) : u$2("span", {})] })] }, event.id));
15066
+ alignItems: "flex-start",
15067
+ gap: "12px",
15068
+ marginBottom: "4px",
15069
+ }, children: [u$2("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [u$2("div", { style: {
15070
+ fontSize: "16px",
15071
+ transition: "all 0.2s ease",
15072
+ borderRadius: "var(--bw-border-radius-small)",
15073
+ borderTop: "4px solid var(--bw-border-color)",
15074
+ border: "1px solid var(--bw-border-color)",
15075
+ width: "40px",
15076
+ height: "40px",
15077
+ display: "flex",
15078
+ alignItems: "center",
15079
+ justifyContent: "center",
15080
+ fontWeight: 700,
15081
+ color: "var(--bw-text-color)",
15082
+ backgroundColor: "var(--bw-background-color)",
15083
+ }, children: startDate.getDate() }), u$2("div", { style: {
15084
+ fontSize: "16px",
15085
+ color: "var(--bw-text-color)",
15086
+ display: "flex",
15087
+ flexDirection: "column",
15088
+ alignItems: "flex-start",
15089
+ justifyContent: "flex-start",
15090
+ lineHeight: 1.25,
15091
+ }, children: [u$2("div", { children: [u$2("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), !sameDay && (u$2(k$3, { children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), u$2("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.endTime, timezone, locale) })] }))] }), u$2("div", { children: sameDay ? (u$2(k$3, { children: [u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) }), u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.endTime, timezone, locale) })] })) : (u$2("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: [formatTime(event.startTime, timezone, locale), " ", t("instances.oclock")] })) })] }), u$2("span", { style: {
15092
+ fontSize: "12px",
15093
+ fontWeight: 400,
15094
+ color: "var(--bw-text-muted)",
15095
+ marginLeft: "6px",
15096
+ backgroundColor: "rgba(0, 0, 0, 0.05)",
15097
+ whiteSpace: "nowrap",
15098
+ padding: "2px 6px",
15099
+ borderRadius: "var(--bw-border-radius-small)",
15100
+ }, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), u$2("div", { style: { textAlign: "right", display: "flex", flexDirection: "column", alignItems: "flex-end", gap: "4px" }, children: [u$2("span", { style: {
15101
+ display: "inline-flex",
15102
+ alignItems: "center",
15103
+ fontSize: "16px",
15104
+ fontWeight: 600,
15105
+ padding: "2px 8px",
15106
+ borderRadius: "var(--bw-border-radius-small)",
15107
+ fontFamily: "var(--bw-font-family)",
15108
+ backgroundColor: "var(--bw-background-color)",
15109
+ color: "var(--bw-text-color)",
15110
+ border: "1px solid var(--bw-border-color)",
15111
+ }, children: event.price !== null ? formatCurrency(event.price) : t("nextEvents.priceOnRequest") }), event.notes && u$2(InfoBadge, { text: event.notes })] })] })] }, event.id));
15057
15112
  }) }), showAllButton && (u$2("div", { style: { textAlign: "center" }, children: u$2("button", { type: "button", disabled: isLoadingShowAll, style: {
15058
15113
  display: "inline-flex",
15059
15114
  alignItems: "center",
@@ -15874,6 +15929,8 @@
15874
15929
  const [isSuccess, setIsSuccess] = d$1(false);
15875
15930
  const [successPaymentId, setSuccessPaymentId] = d$1(null);
15876
15931
  const [systemConfig, setSystemConfig] = d$1(null);
15932
+ // When true, loadEventInstances skips the single-instance auto-select (used by handleShowAllEvents)
15933
+ const skipInstanceAutoSelectRef = A$2(false);
15877
15934
  // PERFORMANCE OPTIMIZATION: Lazy component loading
15878
15935
  const [shouldRenderInstanceSelection, setShouldRenderInstanceSelection] = d$1(false);
15879
15936
  const [shouldRenderUpsells, setShouldRenderUpsells] = d$1(false);
@@ -16369,7 +16426,7 @@
16369
16426
  }
16370
16427
  setStripePromise(loadStripe(data.stripePublishableKey, stripeOptions));
16371
16428
  }
16372
- if (data.eventInstances.length === 1) {
16429
+ if (!skipInstanceAutoSelectRef.current && data.eventInstances.length === 1) {
16373
16430
  setSelectedEventInstance(data.eventInstances[0]);
16374
16431
  setCurrentStep("booking");
16375
16432
  await loadEventDetails(data.eventInstances[0].id);
@@ -16764,12 +16821,30 @@
16764
16821
  const handleShowAllEvents = async () => {
16765
16822
  setIsLoadingShowAll(true);
16766
16823
  try {
16767
- if (isSingleEventTypeMode && selectedEventType) {
16824
+ if (isSingleEventTypeMode) {
16825
+ // Lock in the correct render branch before any async work so no
16826
+ // intermediate state can accidentally show the cards view.
16768
16827
  setShouldRenderInstanceSelection(true);
16769
- setIsLoadingEventInstances(true);
16770
- await loadEventInstances(selectedEventType.id);
16771
16828
  setCurrentStep("eventInstances");
16772
16829
  setShowingPreview(false);
16830
+ setIsLoadingEventInstances(true);
16831
+ // Suppress the single-instance auto-select inside loadEventInstances
16832
+ // so it doesn't override currentStep to "booking" mid-flight.
16833
+ skipInstanceAutoSelectRef.current = true;
16834
+ try {
16835
+ if (selectedEventType) {
16836
+ await loadEventInstances(selectedEventType.id);
16837
+ }
16838
+ else {
16839
+ // next-events mode skips event type loading on init.
16840
+ // loadEventTypes sets selectedEventType (for the sidebar title)
16841
+ // and internally calls loadEventInstances (auto-select suppressed).
16842
+ await loadEventTypes();
16843
+ }
16844
+ }
16845
+ finally {
16846
+ skipInstanceAutoSelectRef.current = false;
16847
+ }
16773
16848
  setIsLoadingEventInstances(false);
16774
16849
  }
16775
16850
  else {
@@ -16874,7 +16949,7 @@
16874
16949
  }
16875
16950
  // Main view based on view mode
16876
16951
  if (viewMode === "next-events" && showingPreview) {
16877
- return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, children: [u$2(NextEventsPreview, { events: upcomingEvents, onEventSelect: handleUpcomingEventSelect, onShowAll: handleShowAllEvents, showAllButtonText: nextEventsSettings.showAllButtonText, showAllButton: nextEventsSettings.showAllButton, isLoadingEventDetails: isLoadingEventDetails, isLoadingShowAll: isLoadingShowAll, isLoading: isLoading }), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: handleBackFromBooking, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16952
+ return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, children: [u$2(NextEventsPreview, { events: upcomingEvents, onEventSelect: handleUpcomingEventSelect, onShowAll: handleShowAllEvents, showAllButtonText: nextEventsSettings.showAllButtonText, showAllButton: nextEventsSettings.showAllButton, isLoadingEventDetails: isLoadingEventDetails, isLoadingShowAll: isLoadingShowAll, isLoading: isLoading, count: nextEventsSettings.count }), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: handleBackFromBooking, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16878
16953
  setIsSuccess(false);
16879
16954
  setCurrentStep("eventTypes");
16880
16955
  setShowingPreview(true);
@@ -16909,7 +16984,7 @@
16909
16984
  }, config: config, googleAdsConfig: googleAdsConfig, onError: setError, paymentIntentId: successPaymentId })] }), showPromoDialog && config.promo && (u$2(PromoDialog, { config: config.promo, onClose: handlePromoDialogClose, onCtaClick: handlePromoCtaClick }))] }));
16910
16985
  }
16911
16986
  if (viewMode === "next-events" && !showingPreview && currentStep === "eventInstances") {
16912
- return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, children: [shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => {
16987
+ return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, children: [u$2(NextEventsPreview, { events: upcomingEvents, onEventSelect: handleUpcomingEventSelect, onShowAll: handleShowAllEvents, showAllButtonText: nextEventsSettings.showAllButtonText, showAllButton: nextEventsSettings.showAllButton, isLoadingEventDetails: isLoadingEventDetails, isLoadingShowAll: isLoadingShowAll, isLoading: isLoading, count: nextEventsSettings.count }), shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => {
16913
16988
  setShowingPreview(true);
16914
16989
  setCurrentStep("eventTypes");
16915
16990
  }, isOpen: currentStep === "eventInstances", onClose: () => {
@@ -16932,22 +17007,34 @@
16932
17007
  }, config: config, googleAdsConfig: googleAdsConfig, onError: setError, paymentIntentId: successPaymentId })] }), showPromoDialog && config.promo && (u$2(PromoDialog, { config: config.promo, onClose: handlePromoDialogClose, onCtaClick: handlePromoCtaClick }))] }));
16933
17008
  }
16934
17009
  if (viewMode === "button" && (isSingleEventTypeMode || isDirectInstanceMode)) {
17010
+ // Busy only while genuinely loading. Note: we intentionally do NOT key off
17011
+ // `shouldRenderInstanceSelection && !sidebarOpen` — that flag stays true after the
17012
+ // sidebar is closed (only `sidebarOpen` resets), which left the spinner stuck on.
17013
+ const isButtonBusy = (isDirectInstanceMode && isLoadingEventDetails) ||
17014
+ (!isDirectInstanceMode && isLoadingEventInstances);
16935
17015
  return (u$2(StyleProvider, { config: config, children: [u$2("div", { ref: setWidgetContainerRef, style: {
16936
17016
  display: "flex",
16937
17017
  justifyContent: "center",
16938
17018
  alignItems: "center",
16939
17019
  minHeight: "120px",
16940
- }, children: [u$2("button", { type: "button", style: {
17020
+ }, children: [u$2("button", { type: "button", disabled: isButtonBusy, style: {
17021
+ display: "inline-flex",
17022
+ alignItems: "center",
17023
+ gap: "10px",
16941
17024
  backgroundColor: "var(--bw-highlight-color)",
16942
- color: "white",
17025
+ color: "var(--bw-button-text-color, #ffffff)",
16943
17026
  padding: "16px 32px",
16944
17027
  border: "none",
16945
17028
  borderRadius: "var(--bw-border-radius)",
16946
17029
  fontSize: "18px",
16947
17030
  fontWeight: 600,
16948
17031
  fontFamily: "var(--bw-font-family)",
17032
+ textTransform: "var(--bw-text-transform, none)",
17033
+ letterSpacing: "var(--bw-letter-spacing, normal)",
16949
17034
  boxShadow: "var(--bw-shadow-md)",
16950
- cursor: "pointer",
17035
+ cursor: isButtonBusy ? "default" : "pointer",
17036
+ opacity: isButtonBusy ? 0.85 : 1,
17037
+ transition: "opacity 0.2s ease",
16951
17038
  }, onClick: () => {
16952
17039
  if (isDirectInstanceMode) {
16953
17040
  setCurrentStep("booking");
@@ -16958,8 +17045,8 @@
16958
17045
  setSidebarOpen(true);
16959
17046
  setShouldRenderInstanceSelection(true);
16960
17047
  }
16961
- }, children: config.buttonText ||
16962
- (isDirectInstanceMode ? t("button.bookNow") : t("button.viewDates")) }), shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: handleBackFromBooking, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
17048
+ }, children: [isButtonBusy && u$2(Spinner, { size: 20, borderColor: "var(--bw-button-text-color, #ffffff)" }), config.buttonText ||
17049
+ (isDirectInstanceMode ? t("button.bookNow") : t("button.viewDates"))] }), shouldRenderInstanceSelection && (u$2(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (u$2(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (u$2(BookingForm, { config: config, eventDetails: eventDetails, stripePromise: stripePromise, onSuccess: handleBookingSuccess, onError: handleBookingError, isOpen: currentStep === "booking" && !!eventDetails, onClose: handleBackFromBooking, systemConfig: systemConfig, selectedUpsells: selectedUpsells, upsells: upsells, persistedState: bookingPersistedState, onPersistedStateChange: setBookingPersistedState })), u$2(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16963
17050
  setIsSuccess(false);
16964
17051
  setCurrentStep("eventTypes");
16965
17052
  setSidebarOpen(false);
@@ -17089,7 +17176,7 @@
17089
17176
  }
17090
17177
  }
17091
17178
 
17092
- var css_248z = ".booking-widget-container{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;color:var(--bw-text-color,#1e293b);direction:ltr;display:block;font-family:var(--bw-font-family,system-ui,-apple-system,sans-serif);font-size:var(--bw-font-size,14px);isolation:isolate;line-height:1.5;position:relative;text-align:left}.booking-widget-container *,.booking-widget-container :after,.booking-widget-container :before{box-sizing:border-box;margin:0;padding:0}.booking-widget-container input,.booking-widget-container select,.booking-widget-container textarea{font-family:inherit;font-size:inherit;line-height:inherit}.booking-widget-container button{background:none;border:none;cursor:pointer;font-family:inherit;font-size:inherit}.booking-widget-container a{color:inherit;text-decoration:none}.booking-widget-container img{display:block;height:auto;max-width:100%;vertical-align:middle}.booking-widget-container ol,.booking-widget-container ul{list-style:none}.booking-widget-container h1,.booking-widget-container h2,.booking-widget-container h3,.booking-widget-container h4,.booking-widget-container h5,.booking-widget-container h6{font-size:inherit;font-weight:inherit}#booking-widget-portal{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:var(--bw-text-color,#1e293b);direction:ltr;font-family:var(--bw-font-family,system-ui,-apple-system,sans-serif);font-size:var(--bw-font-size,14px);isolation:isolate;line-height:1.5;text-align:left}#booking-widget-portal *,#booking-widget-portal :after,#booking-widget-portal :before{box-sizing:border-box}#booking-widget-portal-root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:var(--bw-text-color,#1e293b);font-family:var(--bw-font-family,system-ui,-apple-system,sans-serif);font-size:var(--bw-font-size,14px);line-height:1.5}:root{--bw-highlight-color:#00b1aa;--bw-highlight-color-rgb:0,177,170;--bw-background-color:#f8fdfe;--bw-surface-color:#fff;--bw-text-color:#0e7490;--bw-text-muted:rgba(14,116,144,.7);--bw-border-color:#bae6fd;--bw-success-color:#38bdf8;--bw-warning-color:#fbbf24;--bw-error-color:#f43f5e;--bw-border-radius:18px;--bw-border-radius-small:calc(var(--bw-border-radius)*0.8);--bw-spacing:16px;--bw-spacing-large:24px;--bw-font-family:\"Inter\",system-ui,sans-serif;--bw-font-size:14px;--bw-font-size-large:18px;--bw-font-size-small:12px;--bw-shadow-md:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);--bw-shadow-lg:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);--bw-highlight-muted:rgba(0,177,170,.1);--bw-highlight-subtle:rgba(0,177,170,.05);--bw-text-subtle:rgba(14,116,144,.4)}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes shimmer{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}@keyframes slide-in-right{0%{opacity:0;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out-right{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(100%)}}@keyframes slide-in-up{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes scale-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-spin{animation:spin 1s linear infinite}.animate-shimmer{animation:shimmer 2s infinite}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-fade-in{animation:fade-in .2s ease-out}.animate-slide-in-up{animation:slide-in-up .3s ease-out}.animate-scale-in{animation:scale-in .2s ease-out}.skeleton-shimmer{overflow:hidden;position:relative}.skeleton-shimmer:after{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,transparent,hsla(0,0%,100%,.3),transparent);content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}.bw-btn{transition:all .2s ease!important}.bw-btn:hover:not(:disabled):not([disabled]){box-shadow:0 4px 12px rgba(0,0,0,.15);transform:translateY(-1px)}.bw-btn:active:not(:disabled):not([disabled]){box-shadow:0 2px 4px rgba(0,0,0,.1)}.bw-btn-primary:hover:not(:disabled):not([disabled]){background-color:var(--bw-highlight-color);filter:brightness(1.1)}.bw-btn-secondary:hover:not(:disabled):not([disabled]){background-color:var(--bw-surface-color);border-color:var(--bw-highlight-color);color:var(--bw-highlight-color)}.bw-btn-ghost:hover:not(:disabled):not([disabled]){background-color:var(--bw-highlight-muted)}.bw-btn-outline:hover:not(:disabled):not([disabled]){background-color:var(--bw-highlight-color);color:var(--bw-button-text-color,#fff)}.bw-btn:disabled,.bw-btn[disabled]{cursor:not-allowed!important;opacity:.5!important}button[class*=bw-btn],button[style*=transition]{transition:all .2s ease!important}button[data-variant=primary]:hover:not(:disabled),button[style*=\"--bw-highlight-color\"]:hover:not(:disabled){box-shadow:0 4px 12px rgba(0,0,0,.15);filter:brightness(1.1);transform:translateY(-1px)}button[data-variant=secondary]:hover:not(:disabled){border-color:var(--bw-highlight-color)!important;color:var(--bw-highlight-color)!important}button[data-variant=ghost]:hover:not(:disabled){background-color:var(--bw-highlight-muted)!important}button[data-variant=outline]:hover:not(:disabled){background-color:var(--bw-highlight-color)!important;color:var(--bw-button-text-color,#fff)!important}.bw-button-hover:hover:not(:disabled){box-shadow:0 4px 12px rgba(0,0,0,.15);transform:translateY(-1px)}.bw-button-hover:active:not(:disabled){box-shadow:0 2px 4px rgba(0,0,0,.1);transform:translateY(0)}@media (max-width:768px){.sidebar-mobile{border-radius:0!important;max-width:100%!important;width:100%!important}}@media (max-width:600px){.event-type-list{gap:12px!important;padding:8px!important}.event-type-card{flex:1 1 100%!important;max-width:100%!important;padding:0!important}.event-type-img{height:160px!important}.event-type-title{font-size:1.1rem!important}.event-type-desc{font-size:.8rem!important;max-height:100px!important;min-height:100px!important}.event-type-content{padding:16px 24px!important}}.event-type-markdown{overflow:visible!important}.event-type-markdown p{color:var(--bw-text-muted);font-family:var(--bw-font-family);line-height:1.6;margin:0 0 8px}.event-type-markdown p:last-child{margin-bottom:0}.event-type-markdown h2{font-size:18px!important;font-weight:700!important;margin:12px 0 6px!important}.event-type-markdown h2,.event-type-markdown h3{color:var(--bw-text-color)!important;line-height:1.3!important}.event-type-markdown h3{font-size:16px!important;font-weight:600!important;margin:10px 0 4px!important}.event-type-markdown strong{color:var(--bw-text-color);font-weight:600}.event-type-markdown em{font-style:italic}.event-type-markdown u{text-decoration:underline}.event-type-markdown ul{list-style:none!important;margin:6px 0!important;padding:0 0 0 24px!important;position:relative!important}.event-type-markdown ul li{color:var(--bw-text-muted)!important;font-family:var(--bw-font-family)!important;margin-bottom:2px!important;padding-left:0!important;position:relative!important}.event-type-markdown ul li:before{color:var(--bw-text-color)!important;content:\"•\"!important;font-weight:700!important;left:-16px!important;position:absolute!important;top:0!important}.event-type-markdown ol{counter-reset:list-counter!important;list-style:none!important;margin:6px 0!important;padding:0 0 0 24px!important;position:relative!important}.event-type-markdown ol li{color:var(--bw-text-muted)!important;counter-increment:list-counter!important;font-family:var(--bw-font-family)!important;margin-bottom:2px!important;padding-left:0!important;position:relative!important}.event-type-markdown ol li:before{color:var(--bw-text-color)!important;content:counter(list-counter) \".\"!important;font-weight:700!important;left:-20px!important;position:absolute!important;top:0!important}.event-type-markdown blockquote{border-left:2px solid var(--bw-border-color);color:var(--bw-text-muted);font-style:italic;margin:4px 0;padding-left:12px}.event-type-markdown a{color:var(--bw-highlight-color);text-decoration:underline}.markdown-content h1,.markdown-content h2,.markdown-content h3,.markdown-content h4,.markdown-content h5,.markdown-content h6{color:var(--bw-text-color);font-weight:600;margin-bottom:.5em}.markdown-content h1{font-size:1.5em}.markdown-content h2{font-size:1.25em}.markdown-content h3{font-size:1.1em}.markdown-content p{line-height:1.6;margin-bottom:1em}.markdown-content ol,.markdown-content ul{margin-bottom:1em;padding-left:1.5em}.markdown-content ul{list-style-type:disc}.markdown-content ol{list-style-type:decimal}.markdown-content li{margin-bottom:.25em}.markdown-content a{color:var(--bw-highlight-color);text-decoration:underline}.markdown-content a:hover{opacity:.8}.markdown-content strong{font-weight:600}.markdown-content em{font-style:italic}.markdown-content code{background:var(--bw-highlight-subtle);border-radius:4px;font-family:monospace;font-size:.9em;padding:.125em .25em}.markdown-content blockquote{border-left:3px solid var(--bw-highlight-color);color:var(--bw-text-muted);margin:1em 0;padding-left:1em}.print-only{display:none}.print-hidden{display:block}@media print{.print-only{display:block}.print-hidden{display:none!important}.print-booking-header{border-bottom:2px solid #000;display:block;margin-bottom:24px;padding-bottom:16px;text-align:center}.print-booking-header h1{font-size:24px;margin:0 0 8px}.print-booking-header .subtitle{color:#666;font-size:14px}.print-booking-card{border:1px solid #ccc;border-radius:8px;margin-bottom:16px;padding:16px;page-break-inside:avoid}.print-section-title{border-bottom:1px solid #ddd;display:block;font-size:16px;font-weight:600;margin-bottom:12px;padding-bottom:8px}.print-detail-grid{display:grid;gap:12px;grid-template-columns:1fr 1fr}.print-detail-item{margin-bottom:8px}.print-detail-label{color:#666;font-size:12px;margin-bottom:4px}.print-detail-value{font-size:14px;font-weight:600}.print-status-badge{border-radius:9999px;display:inline-block;font-size:12px;font-weight:600;padding:4px 12px}.print-status-paid{background-color:#dcfce7;color:#166534;display:inline-block}.print-participant{align-items:center;background-color:#f9fafb;border-radius:4px;display:flex;justify-content:space-between;margin-bottom:8px;padding:8px}.print-participant-name{font-weight:600}.print-participant-age{color:#666;font-size:12px}.print-payment-summary{display:block}.print-payment-row{border-bottom:1px solid #eee;display:flex;justify-content:space-between;padding:4px 0}.print-payment-row:last-child{border-bottom:none;font-weight:600}.print-footer{border-top:1px solid #ddd;color:#666;display:block;font-size:12px;margin-top:24px;padding-top:16px;text-align:center}.print-footer p{margin:4px 0}}";
17179
+ var css_248z = ".booking-widget-container{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;box-sizing:border-box;color:var(--bw-text-color,#1e293b);direction:ltr;display:block;font-family:var(--bw-font-family,system-ui,-apple-system,sans-serif);font-size:var(--bw-font-size,14px);isolation:isolate;line-height:1.5;position:relative;text-align:left}.booking-widget-container *,.booking-widget-container :after,.booking-widget-container :before{box-sizing:border-box;margin:0;padding:0}.booking-widget-container input,.booking-widget-container select,.booking-widget-container textarea{font-family:inherit;font-size:inherit;line-height:inherit}.booking-widget-container button{background:none;border:none;cursor:pointer;font-family:inherit;font-size:inherit}.booking-widget-container a{color:inherit;text-decoration:none}.booking-widget-container img{display:block;height:auto;max-width:100%;vertical-align:middle}.booking-widget-container ol,.booking-widget-container ul{list-style:none}.booking-widget-container h1,.booking-widget-container h2,.booking-widget-container h3,.booking-widget-container h4,.booking-widget-container h5,.booking-widget-container h6{font-size:inherit;font-weight:inherit}#booking-widget-portal{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:var(--bw-text-color,#1e293b);direction:ltr;font-family:var(--bw-font-family,system-ui,-apple-system,sans-serif);font-size:var(--bw-font-size,14px);isolation:isolate;line-height:1.5;text-align:left}#booking-widget-portal *,#booking-widget-portal :after,#booking-widget-portal :before{box-sizing:border-box}#booking-widget-portal-root{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;color:var(--bw-text-color,#1e293b);font-family:var(--bw-font-family,system-ui,-apple-system,sans-serif);font-size:var(--bw-font-size,14px);line-height:1.5}:root{--bw-highlight-color:#00b1aa;--bw-highlight-color-rgb:0,177,170;--bw-background-color:#f8fdfe;--bw-surface-color:#fff;--bw-text-color:#0e7490;--bw-text-muted:rgba(14,116,144,.7);--bw-border-color:#bae6fd;--bw-success-color:#38bdf8;--bw-warning-color:#fbbf24;--bw-error-color:#f43f5e;--bw-border-radius:18px;--bw-border-radius-small:calc(var(--bw-border-radius)*0.8);--bw-spacing:16px;--bw-spacing-large:24px;--bw-font-family:\"Inter\",system-ui,sans-serif;--bw-font-size:14px;--bw-font-size-large:18px;--bw-font-size-small:12px;--bw-shadow-md:0 4px 6px -1px rgba(0,0,0,.1),0 2px 4px -1px rgba(0,0,0,.06);--bw-shadow-lg:0 10px 15px -3px rgba(0,0,0,.1),0 4px 6px -2px rgba(0,0,0,.05);--bw-highlight-muted:rgba(0,177,170,.1);--bw-highlight-subtle:rgba(0,177,170,.05);--bw-text-subtle:rgba(14,116,144,.4)}@keyframes spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}@keyframes shimmer{0%{transform:translateX(-100%)}to{transform:translateX(100%)}}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{0%{opacity:1}to{opacity:0}}@keyframes slide-in-right{0%{opacity:0;transform:translateX(100%)}to{opacity:1;transform:translateX(0)}}@keyframes slide-out-right{0%{opacity:1;transform:translateX(0)}to{opacity:0;transform:translateX(100%)}}@keyframes slide-in-up{0%{opacity:0;transform:translateY(20px)}to{opacity:1;transform:translateY(0)}}@keyframes scale-in{0%{opacity:0;transform:scale(.95)}to{opacity:1;transform:scale(1)}}@keyframes pulse{0%,to{opacity:1}50%{opacity:.5}}.animate-spin{animation:spin 1s linear infinite}.animate-shimmer{animation:shimmer 2s infinite}.animate-pulse{animation:pulse 2s cubic-bezier(.4,0,.6,1) infinite}.animate-fade-in{animation:fade-in .2s ease-out}.animate-slide-in-up{animation:slide-in-up .3s ease-out}.animate-scale-in{animation:scale-in .2s ease-out}.skeleton-shimmer{overflow:hidden;position:relative}.skeleton-shimmer:after{animation:shimmer 1.5s infinite;background:linear-gradient(90deg,transparent,hsla(0,0%,100%,.3),transparent);content:\"\";height:100%;left:0;position:absolute;top:0;width:100%}.bw-btn{letter-spacing:var(--bw-letter-spacing,normal);text-transform:var(--bw-text-transform,none);transition:all .2s ease!important}.bw-btn:hover:not(:disabled):not([disabled]){box-shadow:0 4px 12px rgba(0,0,0,.15);transform:translateY(-1px)}.bw-btn:active:not(:disabled):not([disabled]){box-shadow:0 2px 4px rgba(0,0,0,.1)}.bw-btn-primary:hover:not(:disabled):not([disabled]){background-color:var(--bw-highlight-color);filter:brightness(1.1)}.bw-btn-secondary:hover:not(:disabled):not([disabled]){background-color:var(--bw-surface-color);border-color:var(--bw-highlight-color);color:var(--bw-highlight-color)}.bw-btn-ghost:hover:not(:disabled):not([disabled]){background-color:var(--bw-highlight-muted)}.bw-btn-outline:hover:not(:disabled):not([disabled]){background-color:var(--bw-highlight-color);color:var(--bw-button-text-color,#fff)}.bw-btn:disabled,.bw-btn[disabled]{cursor:not-allowed!important;opacity:.5!important}button[class*=bw-btn],button[style*=transition]{transition:all .2s ease!important}button[data-variant=primary]:hover:not(:disabled),button[style*=\"--bw-highlight-color\"]:hover:not(:disabled){box-shadow:0 4px 12px rgba(0,0,0,.15);filter:brightness(1.1);transform:translateY(-1px)}button[data-variant=secondary]:hover:not(:disabled){border-color:var(--bw-highlight-color)!important;color:var(--bw-highlight-color)!important}button[data-variant=ghost]:hover:not(:disabled){background-color:var(--bw-highlight-muted)!important}button[data-variant=outline]:hover:not(:disabled){background-color:var(--bw-highlight-color)!important;color:var(--bw-button-text-color,#fff)!important}.bw-button-hover:hover:not(:disabled){box-shadow:0 4px 12px rgba(0,0,0,.15);transform:translateY(-1px)}.bw-button-hover:active:not(:disabled){box-shadow:0 2px 4px rgba(0,0,0,.1);transform:translateY(0)}@media (max-width:768px){.sidebar-mobile{border-radius:0!important;max-width:100%!important;width:100%!important}}@media (max-width:600px){.event-type-list{gap:12px!important;padding:8px!important}.event-type-card{flex:1 1 100%!important;max-width:100%!important;padding:0!important}.event-type-img{height:160px!important}.event-type-title{font-size:1.1rem!important}.event-type-desc{font-size:.8rem!important;max-height:100px!important;min-height:100px!important}.event-type-content{padding:16px 24px!important}}.event-type-markdown{overflow:visible!important}.event-type-markdown p{color:var(--bw-text-muted);font-family:var(--bw-font-family);line-height:1.6;margin:0 0 8px}.event-type-markdown p:last-child{margin-bottom:0}.event-type-markdown h2{font-size:18px!important;font-weight:700!important;margin:12px 0 6px!important}.event-type-markdown h2,.event-type-markdown h3{color:var(--bw-text-color)!important;line-height:1.3!important}.event-type-markdown h3{font-size:16px!important;font-weight:600!important;margin:10px 0 4px!important}.event-type-markdown strong{color:var(--bw-text-color);font-weight:600}.event-type-markdown em{font-style:italic}.event-type-markdown u{text-decoration:underline}.event-type-markdown ul{list-style:none!important;margin:6px 0!important;padding:0 0 0 24px!important;position:relative!important}.event-type-markdown ul li{color:var(--bw-text-muted)!important;font-family:var(--bw-font-family)!important;margin-bottom:2px!important;padding-left:0!important;position:relative!important}.event-type-markdown ul li:before{color:var(--bw-text-color)!important;content:\"•\"!important;font-weight:700!important;left:-16px!important;position:absolute!important;top:0!important}.event-type-markdown ol{counter-reset:list-counter!important;list-style:none!important;margin:6px 0!important;padding:0 0 0 24px!important;position:relative!important}.event-type-markdown ol li{color:var(--bw-text-muted)!important;counter-increment:list-counter!important;font-family:var(--bw-font-family)!important;margin-bottom:2px!important;padding-left:0!important;position:relative!important}.event-type-markdown ol li:before{color:var(--bw-text-color)!important;content:counter(list-counter) \".\"!important;font-weight:700!important;left:-20px!important;position:absolute!important;top:0!important}.event-type-markdown blockquote{border-left:2px solid var(--bw-border-color);color:var(--bw-text-muted);font-style:italic;margin:4px 0;padding-left:12px}.event-type-markdown a{color:var(--bw-highlight-color);text-decoration:underline}.markdown-content h1,.markdown-content h2,.markdown-content h3,.markdown-content h4,.markdown-content h5,.markdown-content h6{color:var(--bw-text-color);font-weight:600;margin-bottom:.5em}.markdown-content h1{font-size:1.5em}.markdown-content h2{font-size:1.25em}.markdown-content h3{font-size:1.1em}.markdown-content p{line-height:1.6;margin-bottom:1em}.markdown-content ol,.markdown-content ul{margin-bottom:1em;padding-left:1.5em}.markdown-content ul{list-style-type:disc}.markdown-content ol{list-style-type:decimal}.markdown-content li{margin-bottom:.25em}.markdown-content a{color:var(--bw-highlight-color);text-decoration:underline}.markdown-content a:hover{opacity:.8}.markdown-content strong{font-weight:600}.markdown-content em{font-style:italic}.markdown-content code{background:var(--bw-highlight-subtle);border-radius:4px;font-family:monospace;font-size:.9em;padding:.125em .25em}.markdown-content blockquote{border-left:3px solid var(--bw-highlight-color);color:var(--bw-text-muted);margin:1em 0;padding-left:1em}.print-only{display:none}.print-hidden{display:block}@media print{.print-only{display:block}.print-hidden{display:none!important}.print-booking-header{border-bottom:2px solid #000;display:block;margin-bottom:24px;padding-bottom:16px;text-align:center}.print-booking-header h1{font-size:24px;margin:0 0 8px}.print-booking-header .subtitle{color:#666;font-size:14px}.print-booking-card{border:1px solid #ccc;border-radius:8px;margin-bottom:16px;padding:16px;page-break-inside:avoid}.print-section-title{border-bottom:1px solid #ddd;display:block;font-size:16px;font-weight:600;margin-bottom:12px;padding-bottom:8px}.print-detail-grid{display:grid;gap:12px;grid-template-columns:1fr 1fr}.print-detail-item{margin-bottom:8px}.print-detail-label{color:#666;font-size:12px;margin-bottom:4px}.print-detail-value{font-size:14px;font-weight:600}.print-status-badge{border-radius:9999px;display:inline-block;font-size:12px;font-weight:600;padding:4px 12px}.print-status-paid{background-color:#dcfce7;color:#166534;display:inline-block}.print-participant{align-items:center;background-color:#f9fafb;border-radius:4px;display:flex;justify-content:space-between;margin-bottom:8px;padding:8px}.print-participant-name{font-weight:600}.print-participant-age{color:#666;font-size:12px}.print-payment-summary{display:block}.print-payment-row{border-bottom:1px solid #eee;display:flex;justify-content:space-between;padding:4px 0}.print-payment-row:last-child{border-bottom:none;font-weight:600}.print-footer{border-top:1px solid #ddd;color:#666;display:block;font-size:12px;margin-top:24px;padding-top:16px;text-align:center}.print-footer p{margin:4px 0}}";
17093
17180
  styleInject(css_248z);
17094
17181
 
17095
17182
  // Export init function for vanilla JS usage with Preact