/* Baazi365 isolated iframe surface v5.0.0. Existing template pages are untouched. */
html[data-storefront-template="baazi365"] .baz365-iframe-stage,
.baz365-iframe-stage {
  width: 100%;
  min-width: 0;
  margin: 0;
  padding: 0 0 calc(76px + env(safe-area-inset-bottom));
  background: #f3f0e6;
  color: #111;
  overflow: visible;
}

html[data-storefront-template="baazi365"] .baz365-iframe-toolbar,
.baz365-iframe-toolbar {
  position: relative;
  display: grid;
  grid-template-columns: 54px 1fr 54px;
  align-items: center;
  height: 54px;
  margin: 0;
  background: #202020;
  border-bottom: 1px solid #000;
  color: #ffb80c;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .24);
  z-index: 2;
}

html[data-storefront-template="baazi365"] .baz365-iframe-toolbar h2,
.baz365-iframe-toolbar h2 {
  margin: 0;
  overflow: hidden;
  color: #ffb80c;
  font-size: clamp(18px, 4.2vw, 30px);
  font-weight: 800;
  line-height: 1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

html[data-storefront-template="baazi365"] .baz365-iframe-toolbar a,
html[data-storefront-template="baazi365"] .baz365-iframe-toolbar button,
.baz365-iframe-toolbar a,
.baz365-iframe-toolbar button {
  display: grid;
  width: 54px;
  height: 54px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 0;
  background: transparent;
  color: #ffb80c;
  font: 700 36px/1 Arial, sans-serif;
  text-decoration: none;
  cursor: pointer;
}

html[data-storefront-template="baazi365"] .baz365-iframe-toolbar button,
.baz365-iframe-toolbar button {
  font-size: 31px;
  border-left: 1px solid #3d3d3d;
}

html[data-storefront-template="baazi365"] .baz365-iframe-toolbar a,
.baz365-iframe-toolbar a {
  border-right: 1px solid #3d3d3d;
}

html[data-storefront-template="baazi365"] .baz365-iframe-shell,
.baz365-iframe-shell {
  position: relative;
  width: 100%;
  min-height: calc(100dvh - 170px);
  margin: 0;
  background: #f5f5f5;
  overflow: visible;
}

html[data-storefront-template="baazi365"] .baz365-iframe-stage.is-sports .baz365-iframe-shell,
.baz365-iframe-stage.is-sports .baz365-iframe-shell {
  min-height: 720px;
}

html[data-storefront-template="baazi365"] .baz365-iframe-shell iframe,
.baz365-iframe-shell iframe {
  display: block;
  width: 100%;
  height: calc(100dvh - 170px);
  min-height: 620px;
  margin: 0;
  border: 0;
  background: #f5f5f5;
}

html[data-storefront-template="baazi365"] .baz365-iframe-stage.is-sports .baz365-iframe-shell iframe,
.baz365-iframe-stage.is-sports .baz365-iframe-shell iframe {
  height: var(--baz365-iframe-height, 980px);
  min-height: 720px;
}

html[data-storefront-template="baazi365"] .baz365-iframe-loading,
.baz365-iframe-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #f3f0e6;
  color: #222;
  z-index: 1;
}

html[data-storefront-template="baazi365"] .baz365-iframe-loading.is-hidden,
.baz365-iframe-loading.is-hidden {
  display: none !important;
}

html[data-storefront-template="baazi365"] .baz365-iframe-loading span,
.baz365-iframe-loading span {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(201, 0, 45, .18);
  border-top-color: #c9002d;
  border-radius: 50%;
  animation: baz365-frame-spin .75s linear infinite;
}

html[data-storefront-template="baazi365"] .baz365-iframe-loading b,
.baz365-iframe-loading b {
  font-size: 15px;
}

html[data-storefront-template="baazi365"] .baz365-iframe-fallback,
.baz365-iframe-fallback {
  margin: 0;
  padding: 8px 12px 10px;
  background: #f3f0e6;
  color: #666;
  font-size: 12px;
  text-align: center;
}

html[data-storefront-template="baazi365"] .baz365-iframe-fallback a,
.baz365-iframe-fallback a {
  color: #8f001c;
  font-weight: 700;
}

html[data-storefront-template="baazi365"] .baz365-iframe-message,
.baz365-iframe-message {
  display: flex;
  min-height: calc(100dvh - 180px);
  padding: 32px 20px 110px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
}

html[data-storefront-template="baazi365"] .baz365-iframe-message strong,
.baz365-iframe-message strong {
  font-size: 26px;
  color: #222;
}

html[data-storefront-template="baazi365"] .baz365-iframe-message p,
.baz365-iframe-message p {
  max-width: 520px;
  margin: 12px 0 20px;
  color: #667;
  font-size: 16px;
}

html[data-storefront-template="baazi365"] .baz365-iframe-message a,
.baz365-iframe-message a {
  display: inline-grid;
  min-width: 180px;
  min-height: 48px;
  padding: 0 22px;
  place-items: center;
  border: 1px solid #7a0018;
  border-radius: 6px;
  background: linear-gradient(180deg, #df082a, #a90021);
  color: #fff;
  font-size: 17px;
  font-weight: 800;
  text-decoration: none;
}

@keyframes baz365-frame-spin {
  to { transform: rotate(360deg); }
}

@media(max-width: 600px) {
  html[data-storefront-template="baazi365"] .baz365-iframe-toolbar,
  .baz365-iframe-toolbar {
    height: 48px;
    grid-template-columns: 48px 1fr 48px;
  }
  html[data-storefront-template="baazi365"] .baz365-iframe-toolbar a,
  html[data-storefront-template="baazi365"] .baz365-iframe-toolbar button,
  .baz365-iframe-toolbar a,
  .baz365-iframe-toolbar button {
    width: 48px;
    height: 48px;
  }
  html[data-storefront-template="baazi365"] .baz365-iframe-shell,
  html[data-storefront-template="baazi365"] .baz365-iframe-shell iframe,
  .baz365-iframe-shell,
  .baz365-iframe-shell iframe {
    min-height: calc(100dvh - 148px);
    height: calc(100dvh - 148px);
  }
  html[data-storefront-template="baazi365"] .baz365-iframe-stage.is-sports .baz365-iframe-shell iframe,
  .baz365-iframe-stage.is-sports .baz365-iframe-shell iframe {
    min-height: 720px;
    height: var(--baz365-iframe-height, 980px);
  }
}

/* =========================================================================
   CASINO ONLY: FIT TO SCREEN & NO WINDOW SCROLLING
   Applied strictly to casino games (.is-game / .is-casino-fullscreen).
   Sports (.is-sports) remains completely untouched with normal document scroll.
   ========================================================================= */

html.baz365-casino-fullscreen-active,
body.baz365-casino-fullscreen-active {
  overflow: hidden !important;
  height: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  width: 100% !important;
  width: 100vw !important;
  margin: 0 !important;
  padding: 0 !important;
  position: fixed !important;
  inset: 0 !important;
}

body.baz365-casino-fullscreen-active .baz365-header,
body.baz365-casino-fullscreen-active .header,
body.baz365-casino-fullscreen-active .baz365-mobile-header,
body.baz365-casino-fullscreen-active .baz365-footer,
body.baz365-casino-fullscreen-active .footer,
body.baz365-casino-fullscreen-active .baz365-bottom-nav,
body.baz365-casino-fullscreen-active .baz365-slider,
body.baz365-casino-fullscreen-active .baz365-iframe-fallback,
body.baz365-casino-fullscreen-active footer,
body.baz365-casino-fullscreen-active .velki-wrap-footer,
body.baz365-casino-fullscreen-active .ticker {
  display: none !important;
}

html[data-storefront-template="baazi365"] .baz365-iframe-stage.is-game,
.baz365-iframe-stage.is-casino-fullscreen,
html.baz365-casino-fullscreen-active .baz365-iframe-stage {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  height: 100dvh !important;
  margin: 0 !important;
  padding: 0 !important;
  z-index: 999999 !important;
  display: flex !important;
  flex-direction: column !important;
  background: #0b0e14 !important;
  overflow: hidden !important;
}

html[data-storefront-template="baazi365"] .baz365-iframe-stage.is-game .baz365-iframe-toolbar,
.baz365-iframe-stage.is-casino-fullscreen .baz365-iframe-toolbar,
html.baz365-casino-fullscreen-active .baz365-iframe-toolbar {
  flex: 0 0 44px !important;
  height: 44px !important;
  min-height: 44px !important;
  max-height: 44px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 0 10px !important;
  background: #141722 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1) !important;
  color: #ffb80c !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5) !important;
  z-index: 10 !important;
}

html[data-storefront-template="baazi365"] .baz365-iframe-stage.is-game .baz365-iframe-toolbar h2,
.baz365-iframe-stage.is-casino-fullscreen .baz365-iframe-toolbar h2,
html.baz365-casino-fullscreen-active .baz365-iframe-toolbar h2 {
  font-size: 14.5px !important;
  font-weight: 700 !important;
  color: #f8fafc !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  flex: 1 !important;
  padding: 0 12px !important;
  margin: 0 !important;
}

html[data-storefront-template="baazi365"] .baz365-iframe-stage.is-game .baz365-iframe-toolbar a,
html[data-storefront-template="baazi365"] .baz365-iframe-stage.is-game .baz365-iframe-toolbar button,
.baz365-iframe-stage.is-casino-fullscreen .baz365-iframe-toolbar a,
.baz365-iframe-stage.is-casino-fullscreen .baz365-iframe-toolbar button,
html.baz365-casino-fullscreen-active .baz365-iframe-toolbar a,
html.baz365-casino-fullscreen-active .baz365-iframe-toolbar button {
  width: 34px !important;
  height: 34px !important;
  min-width: 34px !important;
  min-height: 34px !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  border: 0 !important;
  border-radius: 6px !important;
  background: rgba(255, 255, 255, 0.08) !important;
  color: #f8fafc !important;
  font-size: 17px !important;
  line-height: 1 !important;
  cursor: pointer !important;
  text-decoration: none !important;
  padding: 0 !important;
  margin: 0 !important;
  transition: background 0.15s ease, color 0.15s ease !important;
}

html[data-storefront-template="baazi365"] .baz365-iframe-stage.is-game .baz365-iframe-toolbar a.baz365-close-btn,
.baz365-iframe-stage.is-casino-fullscreen .baz365-iframe-toolbar a.baz365-close-btn,
html.baz365-casino-fullscreen-active .baz365-iframe-toolbar a.baz365-close-btn {
  background: rgba(239, 68, 68, 0.22) !important;
  color: #f87171 !important;
  font-size: 20px !important;
  font-weight: 700 !important;
}

html[data-storefront-template="baazi365"] .baz365-iframe-stage.is-game .baz365-iframe-toolbar a.baz365-close-btn:hover,
.baz365-iframe-stage.is-casino-fullscreen .baz365-iframe-toolbar a.baz365-close-btn:hover,
html.baz365-casino-fullscreen-active .baz365-iframe-toolbar a.baz365-close-btn:hover {
  background: #dc2626 !important;
  color: #fff !important;
}

html[data-storefront-template="baazi365"] .baz365-iframe-stage.is-game .baz365-iframe-toolbar button:hover,
.baz365-iframe-stage.is-casino-fullscreen .baz365-iframe-toolbar button:hover,
html.baz365-casino-fullscreen-active .baz365-iframe-toolbar button:hover {
  background: rgba(255, 255, 255, 0.18) !important;
  color: #ffb80c !important;
}

html[data-storefront-template="baazi365"] .baz365-iframe-stage.is-game .baz365-iframe-shell,
.baz365-iframe-stage.is-casino-fullscreen .baz365-iframe-shell,
html.baz365-casino-fullscreen-active .baz365-iframe-shell {
  flex: 1 1 0% !important;
  width: 100% !important;
  height: calc(100vh - 44px) !important;
  height: calc(100dvh - 44px) !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  background: #000 !important;
  position: relative !important;
  overflow: hidden !important;
}

html[data-storefront-template="baazi365"] .baz365-iframe-stage.is-game .baz365-iframe-shell iframe,
.baz365-iframe-stage.is-casino-fullscreen .baz365-iframe-shell iframe,
html.baz365-casino-fullscreen-active .baz365-iframe-shell iframe {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  display: block !important;
  background: #000 !important;
  overflow: hidden !important;
}

html.baz365-casino-fullscreen-active .baz365-iframe-loading {
  background: #0b0e14 !important;
  color: #fff !important;
}

html.baz365-casino-fullscreen-active .baz365-iframe-loading span {
  border-color: rgba(255, 184, 12, 0.2) !important;
  border-top-color: #ffb80c !important;
}
