/* Workshop badge widget */
.workshop-badge-widget {
  position: fixed;
  right: 20px;
  bottom: 15px;
  z-index: 9998;
  padding: 10px 20px;
  border-radius: 5px;
  cursor: pointer;
}

.workshop-badge-widget span {
  font-size: 12px;
}

.workshop-widget-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(31, 31, 31, 0.4);
  z-index: 2147483647;
  display: flex;
  justify-content: center;
  align-items: center;
}

.workshop-widget-popup {
  position: relative;
}

.workshop-widget-popup iframe {
  width: calc(100vw - 32px);
  max-width: 1000px;
  height: min(calc(100dvh - 32px), 760px);
  max-height: calc(100dvh - 32px);
  border-radius: 8px;
  overflow: hidden;
  background-color: #f7f6f3;
  position: relative;
  box-shadow:
    rgb(0 0 0 / 7%) 0px 0px 0px 1px,
    rgb(0 0 0 / 5%) 0px 2px 4px 0px,
    rgb(0 0 0 / 5%) 0px 12px 24px 0px;
}

/* Embed 2.0 popup — match the widget surface once loaded (paper mobile, frame desktop). */
.workshop-widget-overlay[data-overlay-signature] .workshop-widget-popup iframe {
  background-color: #f7f6f3;
}

@media (min-width: 736px) {
  .workshop-widget-overlay[data-overlay-signature] .workshop-widget-popup iframe {
    background-color: rgb(20, 24, 28);
  }
}

.workshop-inline-widget iframe {
  max-width: 1000px;
  height: 760px;
  min-height: 0;
  border-radius: 8px;
  overflow: hidden;
  background-color: #f7f6f3;
  position: relative;
  box-shadow:
    rgb(0 0 0 / 7%) 0px 0px 0px 1px,
    rgb(0 0 0 / 5%) 0px 2px 4px 0px,
    rgb(0 0 0 / 5%) 0px 12px 24px 0px;
}

/* Embed 2.0 inline — match the widget surface once loaded (paper mobile, frame desktop). */
.workshop-inline-widget[data-bb-widget-host-signature] iframe {
  background-color: #f7f6f3;
}

@media (min-width: 736px) {
  .workshop-inline-widget[data-bb-widget-host-signature] iframe {
    background-color: rgb(20, 24, 28);
  }
}

/*
 * Embed 2.0 inline shell (allowlisted orgs only). setupInlineFrame stamps
 * data-bb-widget-host-signature on the host element; the legacy inline path never does, so this
 * rule leaves legacy widgets on the fixed 760px above and only clamps the new widget.
 * Cap the shell to the viewport so the booking CTA never falls below the fold (760px design max).
 * Use svh (not dvh): the iframe is in normal flow, and dvh would resize it as the mobile URL bar
 * shows/hides and shove page content around. The popup keeps dvh because it is a fixed overlay.
 */
.workshop-inline-widget[data-bb-widget-host-signature] iframe {
  height: clamp(520px, calc(100svh - 32px), 760px);
}

.workshop-inline-widget {
  transition: none;
}

/* Clip the host boot shell to the same inline iframe radius as the loaded widget. */
.workshop-inline-widget[data-bb-widget-host-signature] .bb-widget-boot-shell {
  border-radius: 8px;
  overflow: hidden;
}

.workshop-inline-widget[data-bb-widget-host-signature] .bb-widget-boot-loader {
  border-radius: 8px;
}

@media (max-width: 735px) {
  .workshop-widget-popup iframe {
    max-width: 100%;
    width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden;
  }

  .workshop-inline-widget iframe {
    max-width: 100%;
  }

  .workshop-widget-popup {
    border-radius: 0px;
    position: relative;
    overflow: hidden;
    height: 100dvh;
  }

  .workshop-inline-widget {
    width: 100%;
    padding: 0 0px !important;
  }
}

/*
 * Embed 2.0 popup only (the signature dataset is never stamped by the legacy overlay builder).
 * The widget document flips to its mobile sheet below a 736px iframe, and the desktop popup
 * iframe is 100vw - 32px — so at viewports 736-767px the inner sheet went mobile while the host
 * kept desktop popup chrome. Go full-bleed at the exact viewport where the inner flips instead.
 */
@media (max-width: 767px) {
  .workshop-widget-overlay[data-overlay-signature] .workshop-widget-popup iframe {
    max-width: 100%;
    width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden;
  }

  .workshop-widget-overlay[data-overlay-signature] .workshop-widget-popup {
    border-radius: 0px;
    position: relative;
    overflow: hidden;
    height: 100dvh;
  }
}

.workshop-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  background-color: transparent;
  outline: 0;
  border: 0;
  margin: 0;
  padding: 8px;
  cursor: pointer;
  user-select: none;
  vertical-align: middle;
  appearance: none;
  text-decoration: none;
  color: #637381;
  text-align: center;
  flex: 0 0 auto;
  font-size: 1.5rem;
  border-radius: 6px !important;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
  top: 8px;
  right: 8px;
}

.workshop-close-button:hover {
  background-color: rgba(40, 51, 74, 0.08);
}

.workshop-widget-close {
  position: absolute;
  top: 10px;
  right: 10px;
  background: #ff0000;
  color: #fff;
  border: none;
  padding: 5px 10px;
  cursor: pointer;
}

.workshop-inline-widget {
  border: none;
  padding: 0 16px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.workshop-partner-inline-widget {
  border: none;
  padding: 0 16px;
  width: 100%;
  display: flex;
  justify-content: center;
  max-width: 1060px;
  transition: height 280ms cubic-bezier(0.2, 0, 0, 1);
}

.workshop-partner-inline-widget-iframe {
  max-width: 1000px;
  height: 760px;
  max-height: 760px;
  min-height: 0;
  border-radius: 8px;
  overflow: auto;
  background-color: white;
  position: relative;
  box-shadow:
    rgb(0 0 0 / 7%) 0px 0px 0px 1px,
    rgb(0 0 0 / 5%) 0px 2px 4px 0px,
    rgb(0 0 0 / 5%) 0px 12px 24px 0px;
  transition: height 280ms cubic-bezier(0.2, 0, 0, 1);
}

.workshop-partner-badge-widget {
  border: none;
  padding: 0 16px;
  width: 100%;
  display: flex;
  justify-content: center;
}

.workshop-partner-badge-widget span {
  font-size: 12px;
}

.workshop-partner-widget-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(31, 31, 31, 0.4);
  z-index: 2147483647;
  display: flex;
  justify-content: center;
  align-items: center;
}

.workshop-partner-close-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  background-color: transparent;
  outline: 0;
  border: 0;
  margin: 0;
  padding: 8px;
  cursor: pointer;
  user-select: none;
  vertical-align: middle;
  appearance: none;
  text-decoration: none;
  color: #637381;
  text-align: center;
  flex: 0 0 auto;
  font-size: 1.5rem;
  border-radius: 6px !important;
  transition: background-color 150ms cubic-bezier(0.4, 0, 0.2, 1) 0ms;
  position: absolute;
  top: 8px;
  right: 8px;
}

.workshop-partner-close-button:hover {
  background-color: rgba(40, 51, 74, 0.08);
}

.workshop-partner-widget-popup {
  position: relative;
}

.workshop-partner-widget-popup iframe {
  width: calc(100vw - 32px);
  max-width: 1000px;
  height: min(calc(100dvh - 32px), 760px);
  max-height: calc(100dvh - 32px);
  border-radius: 8px;
  overflow: hidden;
  background-color: white;
  position: relative;
  box-shadow:
    rgb(0 0 0 / 7%) 0px 0px 0px 1px,
    rgb(0 0 0 / 5%) 0px 2px 4px 0px,
    rgb(0 0 0 / 5%) 0px 12px 24px 0px;
}

@media (max-width: 735px) {
  .workshop-partner-widget-popup iframe {
    max-width: 100%;
    width: 100vw;
    max-height: 100dvh;
    height: 100dvh;
    border: none !important;
    border-radius: 0 !important;
    overflow: hidden;
  }

  .workshop-partner-inline-widget {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 0 0px !important;
  }

  .workshop-partner-badge-widget {
    width: 100%;
    max-height: calc(100vh - 24px);
    padding: 0 0px !important;
  }

  .workshop-partner-widget-overlay {
    position: fixed;
    top: 0;
    left: 0;
  }

  .workshop-partner-close-button {
    position: absolute;
    top: 10px;
    right: 10px;
  }

  .workshop-partner-widget-popup {
    border-radius: 0px;
    position: relative;
    overflow: hidden;
    height: 100dvh;
  }
}

@media (prefers-reduced-motion: reduce) {
  .workshop-inline-widget,
  .workshop-inline-widget iframe {
    transition: none;
  }

  .bb-widget-boot-loader__ring {
    animation: none;
  }

  .bb-widget-boot-loader--hidden {
    transition: none;
  }
}

/*
 * Host boot frame — full-bleed embed background with a centred Booting indicator.
 * No inner card: BookingFlowShell inside the iframe owns that chrome once loaded.
 */
.bb-widget-boot-shell {
  position: relative;
  width: 100%;
}

/* Do not set width here — it overrides `.workshop-widget-popup iframe` sizing and collapses popups. */
.bb-widget-boot-shell iframe {
  display: block;
}

/* Popup: boot shell wraps the iframe; inherit the same box the popup rules assign to the iframe. */
.workshop-widget-popup .bb-widget-boot-shell {
  max-width: 1000px;
  width: calc(100vw - 32px);
}

@media (max-width: 735px) {
  .workshop-widget-popup .bb-widget-boot-shell {
    height: 100dvh;
    max-width: 100%;
    width: 100vw;
  }
}

@media (max-width: 767px) {
  .workshop-widget-overlay[data-overlay-signature] .workshop-widget-popup .bb-widget-boot-shell {
    height: 100dvh;
    max-width: 100%;
    width: 100vw;
  }
}

.bb-widget-boot-loader {
  align-items: center;
  background: #f7f6f3;
  box-sizing: border-box;
  display: flex;
  inset: 0;
  justify-content: center;
  min-height: clamp(520px, calc(100svh - 32px), 760px);
  position: absolute;
  z-index: 2;
}

.bb-widget-boot-loader--hidden {
  opacity: 0;
  pointer-events: none;
  transition: opacity 260ms ease;
}

.bb-widget-boot-loader__ring {
  animation: bb-widget-boot-spin 0.85s linear infinite;
  border: 1.5px solid #e3e1da;
  border-radius: 999px;
  border-top-color: #706d66;
  box-sizing: border-box;
  flex-shrink: 0;
  height: 20px;
  user-select: none;
  width: 20px;
}

@keyframes bb-widget-boot-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (min-width: 736px) {
  .bb-widget-boot-loader {
    background: rgb(20, 24, 28);
  }

  .bb-widget-boot-loader__ring {
    border-color: rgb(255 255 255 / 0.14);
    border-top-color: rgb(255 255 255 / 0.72);
  }
}

.workshop-widget-overlay[data-overlay-signature] .bb-widget-boot-loader {
  border-radius: 8px;
  min-height: min(calc(100dvh - 32px), 760px);
}

@media (max-width: 767px) {
  .workshop-widget-overlay[data-overlay-signature] .bb-widget-boot-loader {
    border-radius: 0;
  }
}

/* Playground boot-shell previews — contain absolute loader within the preview slot. */
.bb-playground-boot-preview {
  isolation: isolate;
  overflow: hidden;
  position: relative;
}

.bb-playground-boot-preview .bb-widget-boot-shell {
  height: 100%;
  min-height: inherit;
  position: relative;
}

.bb-playground-boot-preview .bb-widget-boot-loader {
  height: 100%;
  inset: 0;
  min-height: 0;
  position: absolute;
}

.bb-playground-boot-preview-overlay {
  align-items: center;
  background-color: rgba(31, 31, 31, 0.4);
  display: flex;
  justify-content: center;
  overflow: hidden;
}

.bb-playground-boot-preview--desktop .bb-widget-boot-loader {
  background: rgb(20, 24, 28);
}

.bb-playground-boot-preview--desktop .bb-widget-boot-loader__ring {
  border-color: rgb(255 255 255 / 0.14);
  border-top-color: rgb(255 255 255 / 0.72);
}
