/**
 * BOT VFX Dynamic Popup Styles (Strictly Scoped)
 */

.botvfx-dyn-mfp-wrap .mfp-bg,
.mfp-bg.botvfx-dyn-mfp-wrap {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999998 !important;
  background: rgba(0, 0, 0, 0.84) !important;
  backdrop-filter: blur(6px) !important;
  -webkit-backdrop-filter: blur(6px) !important;
  opacity: 0 !important;
  transition: opacity 0.25s ease !important;
}

.mfp-bg.botvfx-dyn-mfp-wrap.mfp-ready {
  opacity: 1 !important;
}

.mfp-bg.botvfx-dyn-mfp-wrap.mfp-removing {
  opacity: 0 !important;
}

.mfp-wrap.botvfx-dyn-mfp-wrap {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  z-index: 99999999 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
}

.botvfx-dyn-mfp-wrap .mfp-container {
  display: flex !important;
  justify-content: center !important;
  align-items: center !important;
  width: 100% !important;
  min-height: 100% !important;
  height: auto !important;
  padding: 24px 16px !important;
  box-sizing: border-box !important;
}

.botvfx-dyn-mfp-wrap .mfp-container:before {
  display: none !important;
  content: none !important;
}

.botvfx-dyn-mfp-wrap .mfp-content {
  width: 100%;
  max-width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.botvfx-dyn-popup-box {
  position: relative;
  width: min(92vw, var(--botvfx-dp-width, 760px));
  max-height: 90vh;
  margin: 0 auto;
  border-radius: 12px;
  box-sizing: border-box;
  transform: translateY(14px) scale(0.97);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.25s ease;
}

.botvfx-dyn-mfp-wrap.mfp-ready .botvfx-dyn-popup-box {
  transform: translateY(0) scale(1);
  opacity: 1;
}

.botvfx-dyn-mfp-wrap.mfp-removing .botvfx-dyn-popup-box {
  transform: translateY(10px) scale(0.98);
  opacity: 0;
}

/* Themes */
.botvfx-dyn-popup-theme-dark {
  background-color: #1f1f1f;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.65);
  padding: 36px 28px 28px;
}

.botvfx-dyn-popup-theme-light {
  background-color: #ffffff;
  color: #111111;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
  padding: 28px;
}

.botvfx-dyn-popup-theme-transparent {
  background-color: transparent;
  color: #ffffff;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Hide Magnific default X inside our scoped wrapper since we provide a dedicated button */
.botvfx-dyn-mfp-wrap .botvfx-dyn-popup-box button.mfp-close {
  display: none !important;
}

/* Close button */
.botvfx-dyn-popup-close {
  position: absolute;
  top: 12px;
  right: 14px;
  z-index: 20;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: #b5b5b5;
  font-size: 24px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  transition: color 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.botvfx-dyn-popup-theme-light .botvfx-dyn-popup-close {
  color: #444444;
}

.botvfx-dyn-popup-close:hover {
  background: rgba(223, 31, 38, 0.18);
  color: #ffffff;
  transform: rotate(90deg);
}

.botvfx-dyn-popup-theme-light .botvfx-dyn-popup-close:hover {
  background: #df1f26;
  color: #ffffff;
}

/* Inner scrollable content */
.botvfx-dyn-popup-content {
  max-height: calc(90vh - 64px);
  overflow-y: auto;
  overflow-x: hidden;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.22) transparent;
}

.botvfx-dyn-popup-content::-webkit-scrollbar {
  width: 6px;
}

.botvfx-dyn-popup-content::-webkit-scrollbar-track {
  background: transparent;
}

.botvfx-dyn-popup-content::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.22);
  border-radius: 999px;
}

.botvfx-dyn-popup-theme-transparent .botvfx-dyn-popup-content {
  max-height: 88vh;
}

/* Custom Text Content */
.botvfx-dyn-popup-title {
  margin: 0 36px 14px 0;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 700;
}

.botvfx-dyn-popup-body {
  font-size: 16px;
  line-height: 1.65;
}

.botvfx-dyn-popup-body p:last-child {
  margin-bottom: 0;
}

.botvfx-dyn-popup-empty {
  padding: 20px;
  text-align: center;
  opacity: 0.8;
  font-size: 15px;
}

/* Responsive Image */
.botvfx-dyn-popup-media {
  display: flex;
  justify-content: center;
  align-items: center;
}

.botvfx-dyn-popup-media img {
  max-width: 100%;
  max-height: 80vh;
  width: auto;
  height: auto;
  border-radius: 8px;
  display: block;
}

/* Responsive Video (16:9) */
.botvfx-dyn-popup-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000000;
  border-radius: 8px;
  overflow: hidden;
}

.botvfx-dyn-popup-video iframe,
.botvfx-dyn-popup-video video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: contain;
}

/* Contact Form 7 inside dynamic popup (zero-specificity defaults so custom CF7 layouts/styles always win) */
:where(.botvfx-dyn-popup-form .wpcf7-form p) {
  margin: 0 0 12px 0;
}

:where(.botvfx-dyn-popup-form .wpcf7-form label) {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
}

:where(.botvfx-dyn-popup-theme-dark .botvfx-dyn-popup-form .wpcf7-form label) {
  color: #e5e5e5;
}

:where(.botvfx-dyn-popup-form .wpcf7-form-control:not([type="submit"]):not([type="radio"]):not([type="checkbox"])) {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 14px;
  border-radius: 6px;
  font-size: 15px;
  outline: none;
  transition: border-color 0.2s ease;
}

:where(.botvfx-dyn-popup-theme-dark .botvfx-dyn-popup-form .wpcf7-form-control:not([type="submit"]):not([type="radio"]):not([type="checkbox"])) {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #ffffff;
}

:where(.botvfx-dyn-popup-theme-light .botvfx-dyn-popup-form .wpcf7-form-control:not([type="submit"]):not([type="radio"]):not([type="checkbox"])) {
  background: #f7f7f8;
  border: 1px solid rgba(0, 0, 0, 0.14);
  color: #111111;
}

:where(.botvfx-dyn-popup-form .wpcf7-form-control:not([type="submit"]):focus) {
  border-color: #df1f26;
}

:where(.botvfx-dyn-popup-form .wpcf7-submit) {
  background: #df1f26;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 12px 28px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

:where(.botvfx-dyn-popup-form .wpcf7-submit:hover) {
  opacity: 0.92;
  transform: translateY(-1px);
}

/* Scoped Bootstrap-style grid support inside dynamic CF7 popups */
.botvfx-dyn-popup-box:has(.playing-cards-form) {
  width: min(92vw, max(920px, var(--botvfx-dp-width, 760px)));
}

.botvfx-dyn-popup-form .row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: stretch;
  margin: 0;
}

.botvfx-dyn-popup-form .col-md-6 {
  flex: 1 1 calc(50% - 12px);
  min-width: 0;
  box-sizing: border-box;
}

.botvfx-dyn-popup-form .col-md-12 {
  flex: 1 1 100%;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

.botvfx-dyn-popup-form .text-center {
  text-align: center;
}

/* Playing Cards ("Drop Your Easter Eggs") Contact Form 7 Design */
.botvfx-dyn-popup-form .playing-cards-form .col-md-6:first-child > p {
  margin: 0;
  height: 100%;
}

.botvfx-dyn-popup-form .playing-cards-form .col-md-6:first-child img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  max-height: 520px;
  object-fit: cover;
  border-radius: 4px;
  display: block;
}

.botvfx-dyn-popup-form .playing-card-form-org {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.botvfx-dyn-popup-form .playing-card-form-org .botfolio-title {
  font-family: "Tanker", "IBM Plex Sans", sans-serif;
  font-size: 36px;
  line-height: 1.05;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #ffffff;
  margin: 0 0 14px 0;
  padding-right: 28px;
}

.botvfx-dyn-popup-form .playing-card-form-org .botfolio-title .red-color {
  color: #df1f26;
}

.botvfx-dyn-popup-form .playing-card-form-org .fields-form {
  margin-bottom: 10px;
}

.botvfx-dyn-popup-form .playing-card-form-org .fields-form p {
  margin: 0;
}

.botvfx-dyn-popup-form .playing-card-form-org .wpcf7-form-control:not([type="submit"]) {
  width: 100%;
  box-sizing: border-box;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  color: #ffffff;
  font-size: 14px;
  padding: 11px 14px;
}

.botvfx-dyn-popup-form .playing-card-form-org .wpcf7-form-control::placeholder {
  color: rgba(255, 255, 255, 0.55);
}

.botvfx-dyn-popup-form .playing-card-form-org .egg-found-1-area {
  height: 145px;
  min-height: 120px;
  resize: vertical;
}

.botvfx-dyn-popup-form .playing-card-form-org .captcha-form {
  margin-bottom: 8px;
}

.botvfx-dyn-popup-form .playing-card-form-org > p:last-of-type {
  margin: 6px 0 0 0;
}

.botvfx-dyn-popup-form .playingcards-submit-btn {
  width: 100%;
  background: #c81017;
  color: #ffffff;
  border: none;
  border-radius: 6px;
  padding: 12px 20px;
  font-size: 14px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.botvfx-dyn-popup-form .playingcards-submit-btn:hover {
  background: #df1f26;
  transform: translateY(-1px);
}

@media (max-width: 767px) {
  .botvfx-dyn-popup-form .row {
    gap: 16px;
  }

  .botvfx-dyn-popup-form .col-md-6 {
    flex: 1 1 100%;
  }

  .botvfx-dyn-popup-form .playing-cards-form .col-md-6:first-child img {
    min-height: 220px;
    max-height: 280px;
  }

  .botvfx-dyn-popup-form .playing-card-form-org .botfolio-title {
    font-size: 28px;
    padding-right: 0;
  }

  .botvfx-dyn-popup-theme-dark,
  .botvfx-dyn-popup-theme-light {
    padding: 20px 16px;
  }

  .botvfx-dyn-popup-title {
    font-size: 21px;
  }
}
