/* ============================================= */
/* =        Custom Promotional Popup Styles      = */
/* ============================================= */

/* This is the main wrapper for the box AND the mascot */
/* It's fixed to the bottom right of the screen */
.promo-popup-wrapper {
  position: fixed;
  bottom: 0px;
  right: 50px;
  z-index: 9999;
  display: flex;
  align-items: flex-end; /* Aligns mascot and box at their bottoms */

  /* -- ANIMATION -- */
  /* Define the 'visible' state */
  transform: translateY(0);
  opacity: 1;
  visibility: visible;
  /* Define the animation speed and easing */
  transition: transform 0.5s ease-out, opacity 0.5s ease-out, visibility 0s 0s;
}

/* This class will be added by JavaScript to hide the popup */
.promo-popup-wrapper.is-hidden {
  /* -- ANIMATION -- */
  /* Define the 'hidden' state */
  opacity: 0;
  visibility: hidden;
  /* Move it 100px down (off-screen) */
  transform: translateY(100px);
  /* Delay 'visibility: hidden' until the animation is over */
  transition: transform 0.5s ease-out, opacity 0.5s ease-out, visibility 0s 0.5s;
}

/* This is the main content box */
.promo-popup-box {
  position: relative;
  width: 400px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  margin-bottom: 20px; /* Lifts the box up from the bottom */
}

/* Container for the top graphic */
.popup-graphic-container img {
  width: 100%;
  height: auto;
  display: block; /* Removes any bottom spacing */
}

/* Container for the text content */
.popup-content-container {
  padding: 24px;
  text-align: center;
}

.popup-headline {
  font-size: 22px;
  font-weight: bold;
  color: #333;
  margin: 0 0 10px 0;
}

.popup-body-text {
  font-size: 16px;
  color: #555;
  /* margin: 0 0 20px 0; */
}

/* This styles your ACF Link field as a button */
.popup-button {
  display: inline-block;
  padding: 10px 12px;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 5px;
  color: #fff;
  background-color: #ed3e43;
  transition: all 0.3s ease;
}

.popup-button:hover {
  opacity: 0.85;
  color: white;
}

/* This is the "X" close button */
.promo-popup-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  font-size: 22px;
  font-weight: bold;
  color: #777777;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid #eee;
  border-radius: 50%;
  cursor: pointer;
  line-height: 28px;
  text-align: center;
  padding: 0;
  z-index: 10;
  transition: all 0.2s ease;
}

.promo-popup-close:hover {
  color: #000000;
  background: #ffffff;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

/* This is the "Val Graphic", positioned outside the box */
.promo-popup-mascot {
  width: 250px;
}

.promo-popup-mascot img {
  width: 100%;
  height: auto;
  display: block;
}

/* ============================================= */
/* =        Popup Overlay Styles                 = */
/* ============================================= */

/* This is the overlay for the dark/blur effect */
#promo-popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  z-index: 9998;

  /* -- ANIMATION -- */
  /* Define the 'visible' state */
  opacity: 1;
  visibility: visible;
  /* Define the animation speed */
  transition: opacity 0.5s ease-out, visibility 0s 0s;
}

/* This class will be added by JavaScript to hide the overlay */
#promo-popup-overlay.is-hidden {
  /* -- ANIMATION -- */
  /* Define the 'hidden' state */
  opacity: 0;
  visibility: hidden;
  /* Delay 'visibility: hidden' until the fade-out is over */
  transition: opacity 0.5s ease-out, visibility 0s 0.5s;
}

/* == Mobile Responsive (Optional, but recommended) == */
@media (max-width: 600px) {
  /* On small screens, hide the mascot */
  .promo-popup-mascot {
    display: none;
  }

  /* Make the popup box simpler */
  .promo-popup-wrapper {
    bottom: 10px;
    right: 10px;
    left: 10px;
    width: auto;
    /* Reset margin for the box on mobile */
    margin-bottom: 0;
  }

  .promo-popup-box {
    width: 100%;
    /* Reset margin for the box on mobile */
    margin-bottom: 0;
  }
}
