/* ===== Fancybox base ===== */
/* Optional: reserve scrollbar space (redundant when hideScrollbar: false). */
html {
    scrollbar-gutter: stable !important;
}

.fancybox__slide{position:relative;opacity:0;}
.fancybox__caption{
  display:none;font-family:"Roboto",open sans,Helvetica,Arial,sans-serif;
  font-size:18px;font-weight:bold;color:#fff;position:absolute;top:-48px;left:0;
}

/* Dark background only behind the demo iframe itself */
.fancybox__content {
  background:#000 !important;
}

/* Let Fancybox use its normal dimmed overlay */
.fancybox__container,
.fancybox__slide {
  background:transparent !important;
}

.fancybox__content{width:100%;height:100%;aspect-ratio:16/9!important;padding:0;}
.fancybox__content.mobile{position:absolute;bottom:0;height:calc(100dvh - 30px)!important;}
.fb-controls{position:absolute;right:-38px;top:0;}
.fancybox__content.mobile .fb-controls{position:relative;top:-32px;right:4px;}
#mobile-fb-close-button{display:none !important;width:auto;font-size:18px;}
.fancybox__content.mobile .fb-controls{display:none !important;}
.fancybox__content iframe{
  aspect-ratio:16/9!important;display:inline;position:absolute;top:0;left:0;
}
.f-button.is-close-btn{
  position:absolute;top:0!important;right:-1px!important;
  --f-button-width:34px;--f-button-height:34px;--f-button-border-radius:4px;
  --f-button-color:var(--fancybox-color,#fff);--f-button-hover-color:var(--fancybox-color,#fff);
  --f-button-bg:transparent;--f-button-hover-bg:transparent;--f-button-active-bg:transparent;
  --f-button-svg-width:22px;--f-button-svg-height:22px;opacity:.75;color:#fff;
}
.f-button.fullscreen-demo{
  position:absolute;top:32px;right:0;
  --f-button-width:34px;--f-button-height:34px;--f-button-border-radius:4px;
  --f-button-color:var(--fancybox-color,#fff);--f-button-hover-color:var(--fancybox-color,#fff);
  --f-button-bg:transparent;--f-button-hover-bg:transparent;--f-button-active-bg:transparent;
  --f-button-svg-width:22px;--f-button-svg-height:22px;opacity:.75;color:#fff;
}

/* Lock page scroll while game demo is open (iOS: stops background scrolling behind Fancybox). */
html.bwb-game-demo-open,
html.bwb-game-demo-open body{
  overflow: hidden !important;
  overscroll-behavior: none;
}

/* ===== Mobile: game demo only (.bwb-game-demo-fb set in JS on reveal) ===== */
@media only screen and (max-width:780px){
  /* Fallback when visualViewport is missing; JS sets top/left/width/height inline (no !important) so it can override this. */
  .fancybox__container.bwb-game-demo-fb{
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    min-height: 100dvh;
    box-sizing: border-box;
  }
  /* JS pins .bwb-game-demo-fb to window.visualViewport (iOS toolbar / scroll). Inner tree fills that box. */
  .fancybox__container.bwb-game-demo-fb .fancybox__carousel,
  .fancybox__container.bwb-game-demo-fb .fancybox__viewport,
  .fancybox__container.bwb-game-demo-fb .fancybox__track,
  .fancybox__container.bwb-game-demo-fb .fancybox__slide{
    min-height: 100% !important;
    height: 100% !important;
  }
  /* absolute = fill slide; avoid fixed inside transformed carousel */
  .fancybox__container.bwb-game-demo-fb .fancybox__content,
  .fancybox__container.bwb-game-demo-fb .fancybox__content.mobile{
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    max-height: none !important;
    padding: 0 !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    aspect-ratio: unset !important;
  }
  .fancybox__container.bwb-game-demo-fb .fancybox__content iframe,
  .fancybox__container.bwb-game-demo-fb .fancybox__content.mobile iframe{
    width: 100% !important;
    height: 100% !important;
    left: 0 !important;
    right: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    aspect-ratio: unset !important;
  }
  /* On body: Fancybox does not delegate data-fancybox-close outside the modal; top/right updated from visualViewport in JS */
  body > .bwb-demo-mobile-close{
    position: fixed !important;
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(0,0,0,.65);
    color: #fff;
    border: 1px solid rgba(255,255,255,.25);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font: 700 22px/1 system-ui;
    cursor: pointer;
    z-index: 2147483000;
    padding: 0;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }
  body > .bwb-demo-mobile-close:hover{
    filter: brightness(1.1);
  }
  /* Hide original controls bar on mobile */
  .fb-controls{ display: none !important; }
}

/* ===== Container to scope all plugin styles ===== */
.bwb-demo{isolation:isolate;}

/* ===== Game demo / no-demo block ===== */
.iframe-bwb{
  position:relative;overflow:hidden;border-radius:10px;background-color:#171515ff;
  -webkit-transform:translateZ(0);transform:translateZ(0);
  -webkit-backface-visibility:hidden;backface-visibility:hidden;
}
.iframe-bwb__bg-image{
  position:relative;overflow:hidden;
  height:var(--iframe-h,500px);
  background-position:center;background-repeat:no-repeat;background-size:cover;
  filter:brightness(50%) blur(6px);
}
.iframe-bwb__bg-image::before{
  content:"";position:absolute;inset:-1px;background:inherit;
  background-size:inherit;background-position:inherit;background-repeat:inherit;pointer-events:none;
}
.iframe-bwb__content{
  position:absolute;inset:0;z-index:100;display:flex;align-items:center;justify-content:center;pointer-events:none;
}
.iframe-bwb__button{
  position:absolute;top:50%;left:50%;z-index:200;transform:translate(-50%,-50%);
  font-size:1.5em;color:#fff;background-color:#4fb95e;line-height:48px;border-radius:6px;
  width:10em;border:0;margin:0;box-shadow:none;cursor:pointer;white-space:nowrap;text-align:center;max-width:99%;
  pointer-events:auto;
}
.iframe-bwb__button:hover{text-decoration:underline;background-color:#999;}
.iframe-bwb--nodemo .iframe-bwb__button.is-disabled{
  background-color:#ccc;color:#323232;cursor:not-allowed;pointer-events:none;border:none;
}
.iframe-bwb--nodemo .iframe-bwb__button.is-disabled:hover{filter:none;}

/* ===== CTA row under the block ===== */
.bwb-demo .iframe-bwb__cta{
  display:flex;
  align-items:center;            /* vertical align */
  justify-content:space-between; /* title left, button right */
  margin-top:4px;
  gap:12px;
}

/* ===== NEW, theme-agnostic CTA button =====
   Single class: .bwb-cta
   Explicitly define all states to beat theme link rules. */
.bwb-demo .bwb-cta,
.bwb-demo .bwb-cta:link,
.bwb-demo .bwb-cta:visited{
  display:inline-flex;
  align-items:center;
  gap:6px;

  background:#f04737;
  color:#fff;

  /* thinner */
  padding:2px 10px;
  line-height:1.5;

  border-radius:4px;
  border:0;
  box-shadow:none;

  font-weight:700;
  text-decoration:none;
  cursor:pointer;

  text-transform:none;
  letter-spacing:normal;
}

.bwb-demo .bwb-cta:hover,
.bwb-demo .bwb-cta:active{
  /* keep strong contrast while text stays white */
  background:#b8b8b8;
  color:#fff;
  text-decoration:none;
}

.bwb-demo .bwb-cta:focus-visible{
  outline:2px solid #e0e0e0;
  outline-offset:2px;
}

/* ===== UK Age Gate Overlay (Relax + UK only) ===== */
.bwb-age-gate-overlay{
  position:absolute;
  inset:0;
  z-index:1000000000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:16px;
  background:rgba(0,0,0,0.9);
}

.bwb-age-gate-panel{
  max-width:440px;
  width:100%;
  background:#f5f6fa;
  border-radius:18px;
  padding:22px 22px 24px;
  box-shadow:0 18px 45px rgba(0,0,0,0.45);
  text-align:center;
  font-family:"Roboto", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* top row: brand + 18+ badge */
.bwb-age-gate-header-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:10px;
}

.bwb-age-gate-site{
  font-size:12px;
  font-weight:600;
  letter-spacing:0.04em;
  text-transform:uppercase;
  color:#6a6f7b;
}

.bwb-age-gate-18{
  width:30px;
  height:30px;
  border-radius:50%;
  border:2px solid #ff4b4b;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:700;
  color:#ff4b4b;
  background:#fff;
}

.bwb-age-gate-title{
  margin:0 0 10px;
  font-size:22px;
  font-weight:700;
  color:#222;
}

.bwb-age-gate-text{
  margin:0 0 18px;
  font-size:14px;
  line-height:1.6;
  color:#444;
}

.bwb-age-gate-button{
  display:inline-block;
  padding:11px 26px;
  border-radius:6px;
  border:none;
  background:#2d6cf3;
  color:#fff;
  font-size:15px;
  font-weight:600;
  cursor:pointer;
  transition:background 0.15s ease, transform 0.1s ease, box-shadow 0.1s ease;
  box-shadow:0 6px 16px rgba(45,108,243,0.45);
  text-transform:uppercase;
}

.bwb-age-gate-button:hover{
  background:#2456c0;
  transform:translateY(-1px);
  box-shadow:0 8px 22px rgba(36,86,192,0.6);
}

.bwb-age-gate-footer{
  margin:12px 0 0;
  font-size:11px;
  color:#777;
}

@media (max-width:600px){
  .bwb-age-gate-panel{
    padding:18px 16px 20px;
    border-radius:14px;
  }
  .bwb-age-gate-title{
    font-size:19px;
  }
  .bwb-age-gate-text{
    font-size:13px;
  }
  .bwb-age-gate-button{
    width:100%;
  }
}

.bwb-demo .bwb-demo-heading{
  font-size:16px;
  font-weight:800;
  line-height:1.1;
  margin:0;
  text-align:left;
  color:#cfcfcf;
}
.bwb-demo .iframe-bwb__cta{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
}

/* Title: allow wrapping */
.bwb-demo .bwb-demo-heading{
  flex:1 1 auto;
  margin:0;
  line-height:1.2;
}

/* Button: never wrap or shrink */
.bwb-demo .iframe-bwb__cta .bwb-cta{
  flex:0 0 auto;
  white-space:nowrap;
}

/* Mobile: smaller heading under demo block; preview height on narrow screens */
@media (max-width: 780px) {
  .bwb-demo .bwb-demo-heading {
    font-size: 13px !important;
  }
  .bwb-demo .iframe-bwb__bg-image {
    height: 500px !important;
  }
}