@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.
package/dist/index.cjs CHANGED
@@ -2065,6 +2065,28 @@ const StyleProvider = ({ config, children, }) => {
2065
2065
  c = `0x${c.join("")}`;
2066
2066
  return [(c >> 16) & 255, (c >> 8) & 255, c & 255].join(",");
2067
2067
  };
2068
+ // Pick a readable text color (dark or light) for content sitting on top of
2069
+ // the given background color. Bright/neon highlights (teal, matrix green,
2070
+ // gold, etc.) need dark text — white text on them is unreadable.
2071
+ const getContrastingTextColor = (color, lightColor = "#ffffff", darkColor = "#0e1420") => {
2072
+ let rgb;
2073
+ if (color.startsWith("#")) {
2074
+ rgb = hexToRgb(color);
2075
+ }
2076
+ else if (color.startsWith("rgb")) {
2077
+ rgb = color.replace(/rgba?\(|\)/g, "").split(",").slice(0, 3).join(",");
2078
+ }
2079
+ else {
2080
+ return lightColor; // Can't parse (e.g. hsl/oklch/semantic) — keep existing default
2081
+ }
2082
+ const [r, g, b] = rgb.split(",").map((n) => parseInt(n, 10) / 255);
2083
+ if ([r, g, b].some((n) => Number.isNaN(n)))
2084
+ return lightColor;
2085
+ // Relative luminance (sRGB, WCAG)
2086
+ const toLinear = (n) => (n <= 0.03928 ? n / 12.92 : Math.pow((n + 0.055) / 1.055, 2.4));
2087
+ const luminance = 0.2126 * toLinear(r) + 0.7152 * toLinear(g) + 0.0722 * toLinear(b);
2088
+ return luminance > 0.45 ? darkColor : lightColor;
2089
+ };
2068
2090
  const colors = config.colors || {};
2069
2091
  const finalColors = {
2070
2092
  highlight: getCSSValue(colors.highlight, themeDefaults.highlight),
@@ -2084,7 +2106,7 @@ const StyleProvider = ({ config, children, }) => {
2084
2106
  "--bw-surface-color": finalColors.surface,
2085
2107
  "--bw-text-color": finalColors.text,
2086
2108
  "--bw-text-muted": addOpacity(finalColors.text, 0.7),
2087
- "--bw-button-text-color": themeDefaults.buttonTextColor || "#ffffff",
2109
+ "--bw-button-text-color": themeDefaults.buttonTextColor || getContrastingTextColor(finalColors.highlight),
2088
2110
  "--bw-border-color": finalColors.border,
2089
2111
  "--bw-success-color": finalColors.success,
2090
2112
  "--bw-warning-color": finalColors.warning,
@@ -2102,6 +2124,9 @@ const StyleProvider = ({ config, children, }) => {
2102
2124
  "--bw-highlight-muted": addOpacity(finalColors.highlight, 0.1),
2103
2125
  "--bw-highlight-subtle": addOpacity(finalColors.highlight, 0.05),
2104
2126
  "--bw-text-subtle": addOpacity(finalColors.text, 0.4),
2127
+ // Some themes (neon-brutalism) call for uppercased titles & buttons
2128
+ "--bw-text-transform": themeName === "dark-neon-brutalism" ? "uppercase" : "none",
2129
+ "--bw-letter-spacing": themeName === "dark-neon-brutalism" ? "0.04em" : "normal",
2105
2130
  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",
2106
2131
  };
2107
2132
  }, [
@@ -7261,6 +7286,8 @@ function Sidebar({ isOpen, onClose, title, children, width = "450px", footer, })
7261
7286
  fontSize: "16px",
7262
7287
  color: "var(--bw-text-color)",
7263
7288
  fontFamily: "var(--bw-font-family)",
7289
+ textTransform: "var(--bw-text-transform, none)",
7290
+ letterSpacing: "var(--bw-letter-spacing, normal)",
7264
7291
  flex: 1,
7265
7292
  paddingRight: "12px",
7266
7293
  minWidth: 0,
@@ -11438,6 +11465,8 @@ const buttonBase = {
11438
11465
  transition: "all 0.2s ease",
11439
11466
  whiteSpace: "nowrap",
11440
11467
  border: "none",
11468
+ textTransform: "var(--bw-text-transform, none)",
11469
+ letterSpacing: "var(--bw-letter-spacing, normal)",
11441
11470
  };
11442
11471
  // CSS class name for button hover effects
11443
11472
  const buttonClassName = "bw-button-hover";
@@ -12846,19 +12875,21 @@ function EventTypeDetailsDialog({ isOpen, onClose, eventType, onEventTypeSelect,
12846
12875
  textAlign: "right",
12847
12876
  }, children: jsxRuntime.jsxs("span", { children: [t("common.from"), " ", formatCurrency(eventType.minPrice)] }) })] }), isAvailable && (jsxRuntime.jsxs("button", { onClick: handleBookingClick, style: {
12848
12877
  backgroundColor: "var(--bw-highlight-color)",
12849
- color: "#ffffff",
12878
+ color: "var(--bw-button-text-color, #ffffff)",
12850
12879
  padding: "14px 28px",
12851
12880
  border: "none",
12852
12881
  borderRadius: "var(--bw-border-radius)",
12853
12882
  fontSize: "16px",
12854
12883
  fontWeight: 600,
12855
12884
  fontFamily: "var(--bw-font-family)",
12885
+ textTransform: "var(--bw-text-transform, none)",
12886
+ letterSpacing: "var(--bw-letter-spacing, normal)",
12856
12887
  display: "flex",
12857
12888
  alignItems: "center",
12858
12889
  gap: "8px",
12859
12890
  cursor: "pointer",
12860
12891
  transition: "all 0.2s ease",
12861
- }, children: [jsxRuntime.jsx(IconWave, { size: 20, color: "white" }), t("button.bookNow")] }))] }), !isAvailable && (jsxRuntime.jsx("div", { style: {
12892
+ }, children: [jsxRuntime.jsx(IconWave, { size: 20, color: "var(--bw-button-text-color, #ffffff)" }), t("button.bookNow")] }))] }), !isAvailable && (jsxRuntime.jsx("div", { style: {
12862
12893
  position: "absolute",
12863
12894
  inset: 0,
12864
12895
  backgroundColor: "rgba(0, 0, 0, 0.3)",
@@ -14144,15 +14175,15 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
14144
14175
  backgroundColor: isAvailable
14145
14176
  ? "var(--bw-success-color)"
14146
14177
  : "var(--bw-error-color)",
14147
- }, children: isAvailable ? t("events.spotsAvailable") : t("events.soldOut") }) }), jsxRuntime.jsx("div", { style: { position: "absolute", top: "16px", left: "16px", zIndex: 10 }, children: jsxRuntime.jsx("div", { style: {
14148
- fontSize: "13px",
14149
- color: "var(--bw-surface-color)",
14150
- fontWeight: 600,
14151
- backgroundColor: "var(--bw-highlight-color)",
14152
- padding: "2px 8px",
14153
- borderRadius: "var(--bw-border-radius)",
14154
- fontFamily: "var(--bw-font-family)",
14155
- }, children: eventType.category.name }) }), jsxRuntime.jsx("div", { className: "event-type-img", style: { position: "relative", width: "100%", height: "300px" }, children: jsxRuntime.jsx(ImageCarousel, { images: eventType.images, eventName: eventType.name }) }), jsxRuntime.jsxs("div", { className: "event-type-content", style: {
14178
+ }, children: isAvailable ? t("events.spotsAvailable") : t("events.soldOut") }) }), eventType.images && eventType.images.length > 0 && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { style: { position: "absolute", top: "16px", left: "16px", zIndex: 10 }, children: jsxRuntime.jsx("div", { style: {
14179
+ fontSize: "13px",
14180
+ color: "var(--bw-surface-color)",
14181
+ fontWeight: 600,
14182
+ backgroundColor: "var(--bw-highlight-color)",
14183
+ padding: "2px 8px",
14184
+ borderRadius: "var(--bw-border-radius)",
14185
+ fontFamily: "var(--bw-font-family)",
14186
+ }, children: eventType.category.name }) }), jsxRuntime.jsx("div", { className: "event-type-img", style: { position: "relative", width: "100%", height: "300px" }, children: jsxRuntime.jsx(ImageCarousel, { images: eventType.images, eventName: eventType.name }) })] })), jsxRuntime.jsxs("div", { className: "event-type-content", style: {
14156
14187
  padding: "12px 18px",
14157
14188
  display: "flex",
14158
14189
  flexDirection: "column",
@@ -14295,8 +14326,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
14295
14326
  alignItems: "center",
14296
14327
  marginTop: "10px",
14297
14328
  gap: "12px",
14298
- }, children: [(eventType.description ||
14299
- (eventType.highlights && eventType.highlights.length > 0)) && (jsxRuntime.jsx("button", { onClick: (e) => {
14329
+ }, children: [eventType.description && (jsxRuntime.jsx("button", { onClick: (e) => {
14300
14330
  e.stopPropagation();
14301
14331
  handleShowDetails(eventType);
14302
14332
  }, style: {
@@ -14315,12 +14345,14 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
14315
14345
  transition: "all 0.2s ease",
14316
14346
  }, children: t("button.moreDetails") })), isAvailable && (jsxRuntime.jsxs("div", { style: {
14317
14347
  backgroundColor: "var(--bw-highlight-color)",
14318
- color: "var(--bw-surface-color)",
14348
+ color: "var(--bw-button-text-color, #ffffff)",
14319
14349
  padding: "12px 14px",
14320
14350
  borderRadius: "var(--bw-border-radius)",
14321
14351
  fontSize: "clamp(1rem, 2vw, 16px)",
14322
14352
  fontWeight: 600,
14323
14353
  fontFamily: "var(--bw-font-family)",
14354
+ textTransform: "var(--bw-text-transform, none)",
14355
+ letterSpacing: "var(--bw-letter-spacing, normal)",
14324
14356
  display: "flex",
14325
14357
  alignItems: "center",
14326
14358
  justifyContent: "center",
@@ -14329,7 +14361,7 @@ function EventTypeSelection({ eventTypes, onEventTypeSelect, onInstancePreview,
14329
14361
  border: "none",
14330
14362
  cursor: "pointer",
14331
14363
  transition: "all 0.2s ease",
14332
- }, children: [jsxRuntime.jsx(IconWave, { size: 15, color: "var(--bw-surface-color)" }), " ", t("button.bookNow")] }))] })] })] }), showVoucherAttachment && onVoucherClick && (jsxRuntime.jsx(VoucherAttachment, { onClick: () => onVoucherClick(eventType.id) })), !isAvailable && (jsxRuntime.jsx("div", { style: {
14364
+ }, children: [jsxRuntime.jsx(IconWave, { size: 15, color: "var(--bw-button-text-color, #ffffff)" }), " ", t("button.bookNow")] }))] })] })] }), showVoucherAttachment && onVoucherClick && (jsxRuntime.jsx(VoucherAttachment, { onClick: () => onVoucherClick(eventType.id) })), !isAvailable && (jsxRuntime.jsx("div", { style: {
14333
14365
  position: "absolute",
14334
14366
  inset: 0,
14335
14367
  backgroundColor: "rgba(0, 0, 0, 0.3)",
@@ -14752,7 +14784,7 @@ function EventInstanceSelection({ eventInstances, selectedEventType, onEventInst
14752
14784
  }) })] }) }));
14753
14785
  }
14754
14786
 
14755
- function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText, showAllButton, isLoadingEventDetails = false, isLoadingShowAll = false, isLoading = false, }) {
14787
+ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText, showAllButton, isLoadingEventDetails = false, isLoadingShowAll = false, isLoading = false, count = 3, }) {
14756
14788
  const t = useTranslations();
14757
14789
  const { locale } = useLocale();
14758
14790
  const timezone = useTimezone();
@@ -14804,7 +14836,7 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14804
14836
  };
14805
14837
  // Show loading skeleton
14806
14838
  if (isLoading) {
14807
- return jsxRuntime.jsx(NextEventsSkeleton, { count: 3 });
14839
+ return jsxRuntime.jsx(NextEventsSkeleton, { count: count });
14808
14840
  }
14809
14841
  if (events.length === 0) {
14810
14842
  return (jsxRuntime.jsx("div", { style: { maxWidth: "500px", margin: "0 auto", padding: "16px" }, children: jsxRuntime.jsxs("div", { style: {
@@ -14860,55 +14892,44 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14860
14892
  gap: "8px",
14861
14893
  }, children: [jsxRuntime.jsx("span", { style: { fontSize: "16px" }, children: "\uD83D\uDD04" }), t("common.reload")] })] }) }));
14862
14894
  }
14895
+ const today = new Date();
14863
14896
  return (jsxRuntime.jsxs("div", { style: {
14864
14897
  maxWidth: "500px",
14865
14898
  margin: "0 auto",
14866
14899
  padding: "12px 16px",
14867
14900
  fontFamily: "var(--bw-font-family)",
14868
- }, children: [jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "4px", marginBottom: "10px" }, children: events.map((event) => {
14901
+ }, children: [jsxRuntime.jsx("div", { style: { display: "flex", flexDirection: "column", gap: "12px", marginBottom: "10px" }, children: events.map((event) => {
14869
14902
  const availableSpots = event.maxParticipants - event.participantCount;
14870
14903
  const isFullyBooked = availableSpots === 0;
14871
14904
  const startDate = new Date(event.startTime);
14872
- const today = new Date();
14873
14905
  const isPastEvent = today.toISOString() >= startDate.toISOString();
14874
- const isFullAvailability = availableSpots / event.maxParticipants >= 0.8;
14875
- const isHighAvailability = availableSpots / event.maxParticipants >= 0.5;
14876
- const isMediumAvailability = availableSpots / event.maxParticipants >= 0.3;
14877
- const isLowAvailability = availableSpots / event.maxParticipants >= 0.15;
14878
- const getAvailabilityColor = () => {
14879
- if (isFullAvailability)
14880
- return "var(--bw-success-color)";
14881
- if (isHighAvailability)
14882
- return "var(--bw-warning-color)";
14883
- if (isMediumAvailability)
14884
- return "var(--bw-availability-medium-color, #f97316)";
14885
- if (isLowAvailability)
14886
- return "var(--bw-availability-low-color, #8b5cf6)";
14887
- return "var(--bw-highlight-color)";
14888
- };
14889
14906
  const isDisabled = isFullyBooked || isPastEvent || !event.bookingOpen;
14907
+ const availabilityRatio = availableSpots / event.maxParticipants;
14908
+ const allocationBadge = (() => {
14909
+ if (availabilityRatio >= 0.6)
14910
+ return null;
14911
+ if (availabilityRatio === 0)
14912
+ return { text: t("events.soldOut"), backgroundColor: "#7f1d1d", textColor: "#fca5a5" };
14913
+ if (availabilityRatio <= 0.3)
14914
+ return { text: t("instances.almostSoldOut"), backgroundColor: "#7f1d1d", textColor: "#fca5a5" };
14915
+ return { text: t("instances.popularDate"), backgroundColor: "#b45309", textColor: "#fbbf24" };
14916
+ })();
14917
+ const sameDay = formatWeekday(event.startTime, timezone, locale) === formatWeekday(event.endTime, timezone, locale);
14890
14918
  return (jsxRuntime.jsxs("div", { style: {
14891
14919
  position: "relative",
14892
- borderRadius: "var(--bw-border-radius-small)",
14893
- padding: "0 4px",
14920
+ border: "1px solid var(--bw-border-color)",
14921
+ backgroundColor: "var(--bw-surface-color)",
14922
+ borderRadius: "var(--bw-border-radius)",
14923
+ padding: "16px 10px",
14894
14924
  transition: "all 0.2s ease",
14895
- border: "1px solid transparent",
14896
14925
  fontFamily: "var(--bw-font-family)",
14897
14926
  opacity: isDisabled ? 0.3 : 1,
14898
- filter: isDisabled ? "grayscale(100%)" : "none",
14927
+ filter: isDisabled ? "grayscale(40%)" : "none",
14899
14928
  cursor: isDisabled ? "not-allowed" : "pointer",
14900
14929
  }, onClick: () => {
14901
14930
  if (!isDisabled) {
14902
14931
  handleEventSelect(event.id);
14903
14932
  }
14904
- }, onMouseEnter: (hoverEvent) => {
14905
- if (!isDisabled) {
14906
- hoverEvent.currentTarget.style.backgroundColor = "var(--bw-surface-color)";
14907
- hoverEvent.currentTarget.style.borderColor = getAvailabilityColor();
14908
- }
14909
- }, onMouseLeave: (hoverEvent) => {
14910
- hoverEvent.currentTarget.style.backgroundColor = "transparent";
14911
- hoverEvent.currentTarget.style.borderColor = "transparent";
14912
14933
  }, children: [selectedEventInstanceId === event.id && isLoadingEventDetails && (jsxRuntime.jsx("div", { style: {
14913
14934
  position: "absolute",
14914
14935
  inset: 0,
@@ -14917,37 +14938,71 @@ function NextEventsPreview({ events, onEventSelect, onShowAll, showAllButtonText
14917
14938
  justifyContent: "center",
14918
14939
  backgroundColor: "rgba(15, 23, 42, 0.8)",
14919
14940
  borderRadius: "var(--bw-border-radius)",
14920
- }, children: jsxRuntime.jsx("div", { style: {
14921
- width: "32px",
14922
- height: "32px",
14923
- color: "var(--bw-highlight-color)",
14924
- fontSize: "32px",
14925
- animation: "spin 1s linear infinite",
14926
- }, children: "\u27F3" }) })), jsxRuntime.jsxs("div", { style: {
14927
- minHeight: "32px",
14928
- display: "grid",
14929
- gridTemplateColumns: "1fr auto 20px",
14930
- alignItems: "center",
14931
- gap: "8px",
14941
+ }, children: jsxRuntime.jsx("div", { style: { width: "32px", height: "32px", color: "var(--bw-highlight-color)", opacity: 0.8, fontSize: "32px" }, children: "\u27F3" }) })), jsxRuntime.jsx("div", { style: {
14942
+ display: "flex",
14943
+ marginLeft: "auto",
14944
+ marginTop: "-20px",
14945
+ marginBottom: "4px",
14946
+ borderRadius: "var(--bw-border-radius-small)",
14947
+ fontFamily: "var(--bw-font-family)",
14948
+ zIndex: 50,
14949
+ whiteSpace: "nowrap",
14950
+ width: "fit-content",
14951
+ fontSize: "11px",
14952
+ fontWeight: 700,
14953
+ padding: "2px 8px",
14954
+ backgroundColor: allocationBadge?.backgroundColor || "transparent",
14955
+ color: allocationBadge?.textColor || "transparent",
14956
+ }, children: allocationBadge?.text || " - " }), jsxRuntime.jsxs("div", { style: {
14957
+ display: "flex",
14958
+ justifyContent: "space-between",
14932
14959
  width: "100%",
14933
- fontSize: "13px",
14934
- color: "var(--bw-text-muted)",
14935
- }, children: [jsxRuntime.jsxs("span", { style: {
14936
- whiteSpace: "nowrap",
14937
- display: "flex",
14938
- alignItems: "center",
14939
- gap: "3px",
14940
- overflow: "hidden",
14941
- textOverflow: "ellipsis",
14942
- textTransform: "capitalize",
14943
- }, children: [formatWeekday(event.startTime, timezone, locale), " ", formatDate(event.startTime, timezone, locale)] }), jsxRuntime.jsx("span", { style: {
14944
- display: "flex",
14945
- alignItems: "center",
14946
- gap: "4px",
14947
- whiteSpace: "nowrap",
14948
- fontWeight: 700,
14949
- color: "var(--bw-text-color)",
14950
- }, children: event.price !== null ? formatCurrency(event.price) : t("nextEvents.priceOnRequest") }), event.notes ? jsxRuntime.jsx(InfoBadge, { text: event.notes }) : jsxRuntime.jsx("span", {})] })] }, event.id));
14960
+ alignItems: "flex-start",
14961
+ gap: "12px",
14962
+ marginBottom: "4px",
14963
+ }, children: [jsxRuntime.jsxs("div", { style: { display: "flex", alignItems: "flex-start", gap: "12px" }, children: [jsxRuntime.jsx("div", { style: {
14964
+ fontSize: "16px",
14965
+ transition: "all 0.2s ease",
14966
+ borderRadius: "var(--bw-border-radius-small)",
14967
+ borderTop: "4px solid var(--bw-border-color)",
14968
+ border: "1px solid var(--bw-border-color)",
14969
+ width: "40px",
14970
+ height: "40px",
14971
+ display: "flex",
14972
+ alignItems: "center",
14973
+ justifyContent: "center",
14974
+ fontWeight: 700,
14975
+ color: "var(--bw-text-color)",
14976
+ backgroundColor: "var(--bw-background-color)",
14977
+ }, children: startDate.getDate() }), jsxRuntime.jsxs("div", { style: {
14978
+ fontSize: "16px",
14979
+ color: "var(--bw-text-color)",
14980
+ display: "flex",
14981
+ flexDirection: "column",
14982
+ alignItems: "flex-start",
14983
+ justifyContent: "flex-start",
14984
+ lineHeight: 1.25,
14985
+ }, children: [jsxRuntime.jsxs("div", { children: [jsxRuntime.jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.startTime, timezone, locale) }), !sameDay && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsxRuntime.jsx("span", { style: { fontWeight: 600, marginBottom: "2px", textTransform: "capitalize" }, children: formatWeekday(event.endTime, timezone, locale) })] }))] }), jsxRuntime.jsx("div", { children: sameDay ? (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.startTime, timezone, locale) }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: " - " }), jsxRuntime.jsx("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: formatTime(event.endTime, timezone, locale) })] })) : (jsxRuntime.jsxs("span", { style: { color: "var(--bw-text-muted)", fontSize: "14px" }, children: [formatTime(event.startTime, timezone, locale), " ", t("instances.oclock")] })) })] }), jsxRuntime.jsxs("span", { style: {
14986
+ fontSize: "12px",
14987
+ fontWeight: 400,
14988
+ color: "var(--bw-text-muted)",
14989
+ marginLeft: "6px",
14990
+ backgroundColor: "rgba(0, 0, 0, 0.05)",
14991
+ whiteSpace: "nowrap",
14992
+ padding: "2px 6px",
14993
+ borderRadius: "var(--bw-border-radius-small)",
14994
+ }, children: [event.durationDays, " ", event.durationDays > 1 ? t("common.days") : t("common.day")] })] }), jsxRuntime.jsxs("div", { style: { textAlign: "right", display: "flex", flexDirection: "column", alignItems: "flex-end", gap: "4px" }, children: [jsxRuntime.jsx("span", { style: {
14995
+ display: "inline-flex",
14996
+ alignItems: "center",
14997
+ fontSize: "16px",
14998
+ fontWeight: 600,
14999
+ padding: "2px 8px",
15000
+ borderRadius: "var(--bw-border-radius-small)",
15001
+ fontFamily: "var(--bw-font-family)",
15002
+ backgroundColor: "var(--bw-background-color)",
15003
+ color: "var(--bw-text-color)",
15004
+ border: "1px solid var(--bw-border-color)",
15005
+ }, children: event.price !== null ? formatCurrency(event.price) : t("nextEvents.priceOnRequest") }), event.notes && jsxRuntime.jsx(InfoBadge, { text: event.notes })] })] })] }, event.id));
14951
15006
  }) }), showAllButton && (jsxRuntime.jsx("div", { style: { textAlign: "center" }, children: jsxRuntime.jsx("button", { type: "button", disabled: isLoadingShowAll, style: {
14952
15007
  display: "inline-flex",
14953
15008
  alignItems: "center",
@@ -15768,6 +15823,8 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
15768
15823
  const [isSuccess, setIsSuccess] = React.useState(false);
15769
15824
  const [successPaymentId, setSuccessPaymentId] = React.useState(null);
15770
15825
  const [systemConfig, setSystemConfig] = React.useState(null);
15826
+ // When true, loadEventInstances skips the single-instance auto-select (used by handleShowAllEvents)
15827
+ const skipInstanceAutoSelectRef = React.useRef(false);
15771
15828
  // PERFORMANCE OPTIMIZATION: Lazy component loading
15772
15829
  const [shouldRenderInstanceSelection, setShouldRenderInstanceSelection] = React.useState(false);
15773
15830
  const [shouldRenderUpsells, setShouldRenderUpsells] = React.useState(false);
@@ -16263,7 +16320,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16263
16320
  }
16264
16321
  setStripePromise(loadStripe(data.stripePublishableKey, stripeOptions));
16265
16322
  }
16266
- if (data.eventInstances.length === 1) {
16323
+ if (!skipInstanceAutoSelectRef.current && data.eventInstances.length === 1) {
16267
16324
  setSelectedEventInstance(data.eventInstances[0]);
16268
16325
  setCurrentStep("booking");
16269
16326
  await loadEventDetails(data.eventInstances[0].id);
@@ -16658,12 +16715,30 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16658
16715
  const handleShowAllEvents = async () => {
16659
16716
  setIsLoadingShowAll(true);
16660
16717
  try {
16661
- if (isSingleEventTypeMode && selectedEventType) {
16718
+ if (isSingleEventTypeMode) {
16719
+ // Lock in the correct render branch before any async work so no
16720
+ // intermediate state can accidentally show the cards view.
16662
16721
  setShouldRenderInstanceSelection(true);
16663
- setIsLoadingEventInstances(true);
16664
- await loadEventInstances(selectedEventType.id);
16665
16722
  setCurrentStep("eventInstances");
16666
16723
  setShowingPreview(false);
16724
+ setIsLoadingEventInstances(true);
16725
+ // Suppress the single-instance auto-select inside loadEventInstances
16726
+ // so it doesn't override currentStep to "booking" mid-flight.
16727
+ skipInstanceAutoSelectRef.current = true;
16728
+ try {
16729
+ if (selectedEventType) {
16730
+ await loadEventInstances(selectedEventType.id);
16731
+ }
16732
+ else {
16733
+ // next-events mode skips event type loading on init.
16734
+ // loadEventTypes sets selectedEventType (for the sidebar title)
16735
+ // and internally calls loadEventInstances (auto-select suppressed).
16736
+ await loadEventTypes();
16737
+ }
16738
+ }
16739
+ finally {
16740
+ skipInstanceAutoSelectRef.current = false;
16741
+ }
16667
16742
  setIsLoadingEventInstances(false);
16668
16743
  }
16669
16744
  else {
@@ -16768,7 +16843,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16768
16843
  }
16769
16844
  // Main view based on view mode
16770
16845
  if (viewMode === "next-events" && showingPreview) {
16771
- return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, children: [jsxRuntime.jsx(NextEventsPreview, { events: upcomingEvents, onEventSelect: handleUpcomingEventSelect, onShowAll: handleShowAllEvents, showAllButtonText: nextEventsSettings.showAllButtonText, showAllButton: nextEventsSettings.showAllButton, isLoadingEventDetails: isLoadingEventDetails, isLoadingShowAll: isLoadingShowAll, isLoading: isLoading }), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(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 })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16846
+ return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, children: [jsxRuntime.jsx(NextEventsPreview, { events: upcomingEvents, onEventSelect: handleUpcomingEventSelect, onShowAll: handleShowAllEvents, showAllButtonText: nextEventsSettings.showAllButtonText, showAllButton: nextEventsSettings.showAllButton, isLoadingEventDetails: isLoadingEventDetails, isLoadingShowAll: isLoadingShowAll, isLoading: isLoading, count: nextEventsSettings.count }), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(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 })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16772
16847
  setIsSuccess(false);
16773
16848
  setCurrentStep("eventTypes");
16774
16849
  setShowingPreview(true);
@@ -16803,7 +16878,7 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16803
16878
  }, config: config, googleAdsConfig: googleAdsConfig, onError: setError, paymentIntentId: successPaymentId })] }), showPromoDialog && config.promo && (jsxRuntime.jsx(PromoDialog, { config: config.promo, onClose: handlePromoDialogClose, onCtaClick: handlePromoCtaClick }))] }));
16804
16879
  }
16805
16880
  if (viewMode === "next-events" && !showingPreview && currentStep === "eventInstances") {
16806
- return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, children: [shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => {
16881
+ return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, children: [jsxRuntime.jsx(NextEventsPreview, { events: upcomingEvents, onEventSelect: handleUpcomingEventSelect, onShowAll: handleShowAllEvents, showAllButtonText: nextEventsSettings.showAllButtonText, showAllButton: nextEventsSettings.showAllButton, isLoadingEventDetails: isLoadingEventDetails, isLoadingShowAll: isLoadingShowAll, isLoading: isLoading, count: nextEventsSettings.count }), shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => {
16807
16882
  setShowingPreview(true);
16808
16883
  setCurrentStep("eventTypes");
16809
16884
  }, isOpen: currentStep === "eventInstances", onClose: () => {
@@ -16826,22 +16901,34 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16826
16901
  }, config: config, googleAdsConfig: googleAdsConfig, onError: setError, paymentIntentId: successPaymentId })] }), showPromoDialog && config.promo && (jsxRuntime.jsx(PromoDialog, { config: config.promo, onClose: handlePromoDialogClose, onCtaClick: handlePromoCtaClick }))] }));
16827
16902
  }
16828
16903
  if (viewMode === "button" && (isSingleEventTypeMode || isDirectInstanceMode)) {
16904
+ // Busy only while genuinely loading. Note: we intentionally do NOT key off
16905
+ // `shouldRenderInstanceSelection && !sidebarOpen` — that flag stays true after the
16906
+ // sidebar is closed (only `sidebarOpen` resets), which left the spinner stuck on.
16907
+ const isButtonBusy = (isDirectInstanceMode && isLoadingEventDetails) ||
16908
+ (!isDirectInstanceMode && isLoadingEventInstances);
16829
16909
  return (jsxRuntime.jsxs(StyleProvider, { config: config, children: [jsxRuntime.jsxs("div", { ref: setWidgetContainerRef, style: {
16830
16910
  display: "flex",
16831
16911
  justifyContent: "center",
16832
16912
  alignItems: "center",
16833
16913
  minHeight: "120px",
16834
- }, children: [jsxRuntime.jsx("button", { type: "button", style: {
16914
+ }, children: [jsxRuntime.jsxs("button", { type: "button", disabled: isButtonBusy, style: {
16915
+ display: "inline-flex",
16916
+ alignItems: "center",
16917
+ gap: "10px",
16835
16918
  backgroundColor: "var(--bw-highlight-color)",
16836
- color: "white",
16919
+ color: "var(--bw-button-text-color, #ffffff)",
16837
16920
  padding: "16px 32px",
16838
16921
  border: "none",
16839
16922
  borderRadius: "var(--bw-border-radius)",
16840
16923
  fontSize: "18px",
16841
16924
  fontWeight: 600,
16842
16925
  fontFamily: "var(--bw-font-family)",
16926
+ textTransform: "var(--bw-text-transform, none)",
16927
+ letterSpacing: "var(--bw-letter-spacing, normal)",
16843
16928
  boxShadow: "var(--bw-shadow-md)",
16844
- cursor: "pointer",
16929
+ cursor: isButtonBusy ? "default" : "pointer",
16930
+ opacity: isButtonBusy ? 0.85 : 1,
16931
+ transition: "opacity 0.2s ease",
16845
16932
  }, onClick: () => {
16846
16933
  if (isDirectInstanceMode) {
16847
16934
  setCurrentStep("booking");
@@ -16852,8 +16939,8 @@ function UniversalBookingWidgetInner({ config: baseConfig, onWidgetLanguage, onT
16852
16939
  setSidebarOpen(true);
16853
16940
  setShouldRenderInstanceSelection(true);
16854
16941
  }
16855
- }, children: config.buttonText ||
16856
- (isDirectInstanceMode ? t("button.bookNow") : t("button.viewDates")) }), shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (jsxRuntime.jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(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 })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16942
+ }, children: [isButtonBusy && jsxRuntime.jsx(Spinner, { size: 20, borderColor: "var(--bw-button-text-color, #ffffff)" }), config.buttonText ||
16943
+ (isDirectInstanceMode ? t("button.bookNow") : t("button.viewDates"))] }), shouldRenderInstanceSelection && (jsxRuntime.jsx(EventInstanceSelection, { eventInstances: eventInstances, selectedEventType: selectedEventType, onEventInstanceSelect: handleEventInstanceSelect, onBackToEventTypes: () => setSidebarOpen(false), isOpen: sidebarOpen && currentStep === "eventInstances", onClose: () => setSidebarOpen(false), isLoadingEventInstances: isLoadingEventInstances, isLoadingEventDetails: isLoadingEventDetails, hasUpsellsStep: hasUpsellsFlowStep })), shouldRenderUpsells && (jsxRuntime.jsx(UpsellsStep, { upsells: upsells, selectedUpsells: selectedUpsells, participantCount: tempParticipantCount, isLoading: isLoadingUpsells, isOpen: currentStep === "upsells", onClose: () => setCurrentStep("eventInstances"), onSelect: handleUpsellsSelect, onContinue: handleUpsellsContinue, onBack: handleUpsellsBack })), shouldRenderBookingForm && eventDetails && (jsxRuntime.jsx(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 })), jsxRuntime.jsx(BookingSuccessModal, { isOpen: isSuccess, onClose: () => {
16857
16944
  setIsSuccess(false);
16858
16945
  setCurrentStep("eventTypes");
16859
16946
  setSidebarOpen(false);
@@ -16978,7 +17065,7 @@ function styleInject(css, ref) {
16978
17065
  }
16979
17066
  }
16980
17067
 
16981
- 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}}";
17068
+ 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}}";
16982
17069
  styleInject(css_248z);
16983
17070
 
16984
17071
  // Export init function for vanilla JS usage