/**
 * @file
 * Exit Intent Popup Styles.
 * Merged from theme SCSS, favoring theme rules.
 */

/* Exit container base styles */
.exit-container {
  background: #000;
  max-height: 720px !important;
  max-width: 840px !important;
  width: 840px !important;
  margin: 0 auto !important;
}

.block-exit-popup {
  min-height: 400px; /* Set a minimum height for the block */
  max-height: 720px !important;
}

/* Hide exit intent popup by default */
.exit-intent-popup {
  display: none !important;
  visibility: hidden;
  opacity: 0;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 9999;
  background: #000;
}

/* Also hide blocks with the exit popup class immediately */
.block-exit-popup {
  display: none !important;
  visibility: hidden;
  opacity: 0;
}

/* Show exit intent popup when triggered */
.exit-intent-popup.show {
  display: block !important;
  visibility: visible;
  opacity: 1;
  background: #000;
}

/* Blur specific regions when popup is shown */
.blur-region {
  filter: blur(8px) !important;
  -webkit-filter: blur(8px) !important;
  transition: filter 0.3s ease;
}

/* Prevent body scrolling when popup is active */
body.popup-open {
  overflow: hidden !important;
  position: fixed !important;
  width: 100% !important;
  height: 100% !important;
  top: 0 !important;
  left: 0 !important;
}

/* Close button styling */
.exit-popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  z-index: 1000;
  background: transparent;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.exit-popup-close:hover {
  transform: scale(1.1);
}

.exit-popup-close:focus {
  outline: 2px solid #3B82F6;
  outline-offset: 2px;
}

.exit-popup-close svg {
  transition: transform 0.2s ease;
}

.exit-popup-close:hover svg {
  transform: rotate(90deg);
}

.exit-popup-image {
  width: 100%;
}

.exit-popup-image img {
  display: block;
  max-width: 100%;
  height: auto;
  object-fit: cover;
  margin: 0;
}

.exit-popup-body,
.exit-popup-webform {
  margin-bottom: 1.5rem;
}

@media (max-width: 767px) {
  .exit-popup-image,
  .exit-popup-body,
  .exit-popup-webform {
    padding: 1rem 0;
  }
}

.block-exit-popup .row.align-items-stretch {
  min-height: 100%;
  height: 100%;
}

.block-exit-popup .col-md-6 {
  height: 100%;
}

.block-exit-popup .col-md-6.bg-black {
  height: 100%;
  min-height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Optional: vertically center content */
}

.exit-popup-flex-row {
  min-height: 400px; /* Ensure flex row has height */
  width: 100%;
  display: flex;
  flex-wrap: wrap;
}

.exit-popup-image-col {
  flex: 0 0 50%;
  min-width: 0;
  max-width: 50%;
  display: flex;
  align-items: stretch;
  min-height: 400px; /* Ensure image column has height */
  align-self: stretch; /* Make column stretch to match tallest sibling */
}

@media (min-width: 768px) {
  .exit-popup-image-col {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 767px) {
  .exit-popup-image-col {
    display: none; /* Hide image column on mobile */
  }
}

.exit-popup-content-col {
  flex: 0 0 50%;
  min-width: 0;
  max-width: 50%;
  min-height: 400px; /* Ensure content column has height */
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: stretch;
  background: #000;
  color: #fff;
}

@media (min-width: 768px) {
  .exit-popup-content-col {
    flex: 0 0 50%;
    max-width: 50%;
  }
}

@media (max-width: 767px) {
  .exit-popup-content-col {
    flex: 1 1 100%; /* Take full width on mobile */
    max-width: 100%;
  }
}

.exit-popup-image {
  width: 100%;
  display: flex;
  align-items: stretch;
  min-height: 400px; /* Ensure image container has height */
  position: relative; /* For absolute positioning of image */
  overflow: hidden; /* Prevent image overflow */
  height: 100%; /* Take full height of parent column */
}

.exit-intent-popup.show .exit-popup-image {
  height: 100%;
  min-height: 100%;
}

.exit-popup-image img {
  width: 100% !important;
  max-width: 100% !important;
  height: 100% !important;
  min-height: 400px !important; /* Ensure image has minimum height */
  object-fit: cover;
  display: block;
  position: absolute; /* Position absolutely within parent */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.exit-intent-popup.show .exit-popup-image img {
  height: 100% !important;
  min-height: 100% !important;
  width: 100% !important;
  max-width: 100% !important;
  object-fit: cover;
  position: absolute; /* Position absolutely within parent */
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
}

.exit-container {
  max-width: 900px;
  margin: 0 auto;
  min-height: 400px; /* Ensure container has height */
  height: auto; /* Let height be determined by content */
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex; /* Make container a flex container */
  flex-direction: row; /* Horizontal layout */
}

/* Add max-height for medium screens and larger */
@media (min-width: 768px) {
  .exit-container {
    max-height: 730px;
    max-width: 840px !important;
    width: 840px !important;
    overflow-y: auto;
  }
}

/* Add max-height for small screens and below */
@media (max-width: 767px) {
  .exit-container {
    max-height: 700px;
    max-width: 95% !important;
    width: 95% !important;
    overflow-y: auto;
  }
}

.exit-intent-popup.show .exit-container {
  max-width: 900px !important;
  width: 900px !important;
  height: auto;
  margin: 0 auto !important;
  border-radius: 0 !important;
}

/* Override Bootstrap container class when popup is shown */
.exit-intent-popup.show .container.exit-container {
  max-width: 900px !important;
  width: 900px !important;
  margin: 0 auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Override Bootstrap responsive container rules when popup is shown */
@media (min-width: 36rem) {
  .exit-intent-popup.show .container.exit-container {
    max-width: 900px !important;
    width: 900px !important;
  }
}
@media (min-width: 48rem) {
  .exit-intent-popup.show .container.exit-container {
    max-width: 900px !important;
    width: 900px !important;
  }
}
@media (min-width: 62rem) {
  .exit-intent-popup.show .container.exit-container {
    max-width: 900px !important;
    width: 900px !important;
  }
}
@media (min-width: 75rem) {
  .exit-intent-popup.show .container.exit-container {
    max-width: 900px !important;
    width: 900px !important;
  }
}
@media (min-width: 87.5rem) {
  .exit-intent-popup.show .container.exit-container {
    max-width: 900px !important;
    width: 900px !important;
  }
}

.webform-submission-exit-form {
  background: none !important;
  padding: 0 !important;
}

/* Center the popup container */
.exit-intent-popup .exit-container {
  max-width: 900px !important;
  width: 900px !important;
  margin: 0 auto !important;
  position: relative;
}

/* Override Bootstrap container class specifically for exit popup */
.exit-intent-popup .container.exit-container {
  max-width: 900px !important;
  width: 900px !important;
  margin: 0 auto !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

/* Override Bootstrap responsive container rules for exit popup */
@media (min-width: 36rem) {
  .exit-intent-popup .container.exit-container {
    max-width: 900px !important;
    width: 900px !important;
  }
}
@media (min-width: 48rem) {
  .exit-intent-popup .container.exit-container {
    max-width: 900px !important;
    width: 900px !important;
  }
}
@media (min-width: 62rem) {
  .exit-intent-popup .container.exit-container {
    max-width: 900px !important;
    width: 900px !important;
  }
}
@media (min-width: 75rem) {
  .exit-intent-popup .container.exit-container {
    max-width: 900px !important;
    width: 900px !important;
  }
}
@media (min-width: 87.5rem) {
  .exit-intent-popup .container.exit-container {
    max-width: 900px !important;
    width: 900px !important;
  }
} 