.btfc-game-wrap {
  box-sizing: border-box;
  display: block;
  position: relative;
  width: min(100%, 1280px);
  max-width: 1280px;
  margin: 0 auto !important;
  overflow: hidden;
  border-radius: 8px;
  background: #060b12;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.28);
  line-height: 0;
}

.btfc-game-frame {
  display: block;
  width: 100%;
  height: min(var(--btfc-height, 720px), calc(100dvh - 40px));
  min-height: 0;
  border: 0;
  background: #060b12;
}

.elementor-widget-shortcode .btfc-game-wrap,
.elementor-shortcode .btfc-game-wrap {
  margin-right: auto !important;
  margin-left: auto !important;
}

.elementor-popup-modal:has(.btfc-game-wrap) {
  align-items: center !important;
  justify-content: center !important;
}

.elementor-popup-modal:has(.btfc-game-wrap) .dialog-widget-content {
  display: flex !important;
  justify-content: center !important;
  width: min(1280px, calc(100vw - 32px)) !important;
  max-width: calc(100vw - 32px) !important;
  max-height: calc(100dvh - 16px) !important;
  margin: auto !important;
  inset: auto !important;
  overflow: auto !important;
}

.elementor-popup-modal:has(.btfc-game-wrap) .dialog-message {
  width: 100% !important;
  display: flex !important;
  justify-content: center !important;
  max-height: none !important;
  overflow: visible !important;
}

.elementor-popup-modal:has(.btfc-game-wrap) .elementor-section,
.elementor-popup-modal:has(.btfc-game-wrap) .elementor-container,
.elementor-popup-modal:has(.btfc-game-wrap) .elementor-column,
.elementor-popup-modal:has(.btfc-game-wrap) .elementor-widget-wrap,
.elementor-popup-modal:has(.btfc-game-wrap) .elementor-widget-shortcode,
.elementor-popup-modal:has(.btfc-game-wrap) .elementor-shortcode {
  width: 100% !important;
  max-width: 100% !important;
}

@media (max-height: 760px) and (min-width: 721px) {
  .btfc-game-frame {
    height: calc(100dvh - 32px);
  }
}

@media (max-height: 660px) and (min-width: 721px) {
  .btfc-game-frame {
    height: calc(100dvh - 24px);
  }
}

@media (max-width: 720px) {
  .btfc-game-wrap {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    border-radius: 8px;
  }

  .btfc-game-frame {
    height: calc(100dvh - 74px);
    min-height: 560px;
    max-height: 820px;
  }

  .elementor-popup-modal:has(.btfc-game-wrap) .dialog-widget-content {
    width: calc(100vw - 12px) !important;
    max-width: calc(100vw - 12px) !important;
    max-height: calc(100dvh - 12px) !important;
  }
}

@media (max-width: 420px) {
  .btfc-game-frame {
    height: calc(100dvh - 54px);
    min-height: 540px;
  }
}
