/* Email Subscription Popup Styles */
.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  /* min-height: 700px; */
  background: rgba(0, 0, 0, 0.7);
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  /* padding: 20px; */
  box-sizing: border-box;
  overflow: auto; /* Allow the overlay to scroll if needed */
}
.bold {
  font-weight: bold;
}

.popup-overlay.active {
  display: flex;
}

.email-popup {
  background: var(--yellow-color, #fff200);
  position: relative;
  width: 100%;
  max-width: 1200px;
  height: 80vh;
  max-height: 750px;
  min-height: 700px;
  border: 4px solid #000000;
  overflow-y: auto; /* Changed from scroll to auto for better mobile behavior */
  -webkit-overflow-scrolling: touch; /* For smooth scrolling on iOS */
  /* box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); */
  animation: popupSlideIn 0.3s ease-out;
}

.email-popup:after {
  content: "";
  position: absolute;
  bottom: 0;
  /* left: -22px; */
  /* left: -26%;
  width: 73%;
  height: 40%; */
  width: 380px;
  height: 260px;
  background-image: url("../images/popup-subscribe-bg.svg");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  /* z-index: -1; */
}
@media (min-width: 769px) {
  .email-popup:after {
    left: -75px;
    width: 410px;
    height: 300px;
    /* left: -34%;
    width: 103%;
    height: 66%; */
  }
}
@keyframes popupSlideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.popup-close {
  position: absolute;
  top: 15px;
  right: 20px;
  background: none;
  border: none;
  font-size: 28px;
  /* font-weight: bold; */
  cursor: pointer;
  color: #000000;
  z-index: 10;
  width: 35px;
  height: 35px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s ease;
}

.popup-close:hover {
  background: #f0f0f0;
  color: #333;
}

.popup-content {
  padding: 40px 30px 30px 30px;
  text-align: center;
}

.popup-content h3 {
  margin: 70px 0px 50px 80px;
  color: #000;
  font-size: 3rem;
  font-weight: 600;
  text-align: left;
}

.popup-content p {
  margin: 0 0 25px 0;
  color: #000;
  line-height: 1.5;
}
.popup-content .popup-text {
  /* width: 417px; */
  margin: 20px auto;
  padding-left: 21px;
  font-size: 1rem;
  text-align: left;
}
.popup-content .popup-note {
  font-size: 1rem;
}
/* Contact Form 7 Styling within Popup */
.wpcf7 {
  display: flex;
  justify-content: center;
}
.email-popup .wpcf7-form {
  margin: 0;
  max-width: fit-content;
}

.email-popup .wpcf7-form label {
  display: block;
  text-align: left;
  margin-bottom: 15px;
  font-weight: 500;
  color: #000;
}
/* .input {
  border-bottom: 2px solid #000000;
  border-top: none;
  border-left: none;
  border-right: none;
  background: transparent;
} */
.email-popup .wpcf7-form input[type="email"] {
  width: 100%;
  padding: 12px 15px;
  font-size: 1rem;
  margin-top: 5px;
  transition: border-color 0.3s ease;
  box-sizing: border-box;
  border-bottom: 2px solid #000000;
  border-top: none;
  border-left: none;
  border-right: none;
  background: transparent;
}

.email-popup .wpcf7-form input[type="email"]:focus {
  outline: none;
  border-color: none;
  /* box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1); */
}

.email-popup .wpcf7-form input[type="submit"] {
  background: #000000;
  color: white;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 15px;
  transition: background 0.3s ease;
  width: 100%;
}

.email-popup .wpcf7-form input[type="submit"]:hover {
  background: #fff200;
  color: #000000;
  border: 2px solid #000000;
}

/* Response messages */
.email-popup .wpcf7-response-output {
  margin: 15px 0 0 0 !important;
  padding: 65px 90px 65px 55px !important;
  width: 380px;
  top: 0;
  border-radius: 12px;
  border: 4px solid #000000 !important;
  font-size: 24px;
  font-weight: 600;
  position: absolute;
  text-align: left;
  background-color: orange;
}
.email-popup .wpcf7-response-output:after {
  content: "";
  position: absolute;
  top: 50%;
  right: 40px;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  background-image: url("../images/popup-icon-success.svg");
  background-size: contain;
  background-repeat: no-repeat;
}
.email-popup .wpcf7-mail-sent-ok {
  background: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.email-popup .wpcf7-validation-errors {
  background: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* reCAPTCHA Styling within Email Popup */
.email-popup .wpcf7-form .wpcf7-recaptcha {
  margin: 15px 0;
  text-align: center;
}

/* reCAPTCHA v2 widget */
.email-popup .g-recaptcha {
  margin: 15px auto;
  display: inline-block;
  transform-origin: center;
}

/* reCAPTCHA v3 (invisible) - no additional styling needed */
.email-popup .wpcf7-form .wpcf7-recaptcha-v3 {
  margin: 0;
}

/* Loading state for reCAPTCHA */
/* .email-popup .wpcf7-spinner {
  margin: 10px auto;
  display: block;
} */
/* Customize reCAPTCHA badge position (optional) */
.grecaptcha-badge {
  visibility: hidden;
}

/* Hide on mobile only */
@media (max-width: 768px) {
  .grecaptcha-badge {
    display: none;
  }
  .email-popup:after {
    left: -35px;
  }
}
/* Privacy notice styling */
.email-popup .privacy-notice {
  font-size: 0.75rem;
  color: #000;
  margin-top: -15px;
  width: 150px;
  margin: -35px auto;
  line-height: 1.4;
}

.email-popup .privacy-notice a {
  color: #0073aa;
  text-decoration: none;
  border: none;
}

.email-popup .privacy-notice a:hover {
  text-decoration: underline;
}
/* Mobile Styles */
@media (max-width: 768px) {
  .popup-overlay {
    padding: 0;
    align-items: flex-start; /* Align to top instead of center for better scrolling */
    overflow-y: auto; /* Ensure overlay can scroll on mobile */
  }

  .email-popup {
    max-width: 100%;
    height: auto; /* Let height be determined by content */
    min-height: 650px; /* Maintain minimum height requirement */
    max-height: none; /* Remove max height constraint on mobile */
    border-width: 3px; /* Slightly thinner border on mobile */
  }
  .email-popup:after {
    left: -70px;
  }
  .popup-content {
    padding: 35px 25px 25px 25px;
  }

  .popup-content h3 {
    font-size: 1.5rem;
    margin: 10% 0px 7% 20px; /* Adjusted margins for mobile */
  }

  .popup-content p {
    font-size: 0.9rem;
  }

  .popup-close {
    top: 12px;
    right: 15px;
    font-size: 24px;
  }

  /* Ensure the popup is scrollable container */
  .email-popup-scrollable {
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    max-height: calc(100vh - 30px); /* Viewport height minus margins */
  }
}

@media (max-width: 480px) {
  .popup-overlay {
    padding: 0;
  }

  .popup-content {
    padding: 30px 20px 20px 20px;
  }

  .popup-content h3 {
    font-size: 1.5rem;
    margin: 10% 0px 10% 20px;
  }

  .email-popup .wpcf7-form input[type="email"] {
    padding: 10px 12px;
    font-size: 0.9rem;
  }

  .email-popup .wpcf7-form input[type="submit"] {
    padding: 10px 25px;
    font-size: 0.9rem;
  }

  .email-popup .g-recaptcha {
    transform: scale(0.77);
    transform-origin: center;
    margin: 10px auto;
  }

  /* Adjust popup width if needed for reCAPTCHA */
  .email-popup {
    /* max-width: 95vw */
    max-width: 100%;
  }

  /* Background image adjustments for small screens */
  .email-popup:after {
    /* width: 70%;
      height: 36%; */
    left: -35px;
    width: 300px;
    height: 240px;
  }
}
/* PDF Viewing Link Styles */
.pdf-download-link,
.popup-pdf-link {
  color: #0073aa;
  text-decoration: none;
  font-weight: 600;
  transition: all 0.3s ease;
  background: transparent;
}

.pdf-download-link:hover,
.popup-pdf-link:hover {
  /* background:rgb(6, 80, 114); */
  color: white;
  text-decoration: none;
  transform: translateY(-1px);
  /* box-shadow: 0 4px 8px rgba(0, 115, 170, 0.2); */
}

/* View indicator instead of download indicator */
/* .pdf-download-link::after,
.popup-pdf-link::after {
  content: "👁️";
  font-size: 0.9em;
  opacity: 0.8;
  margin-left: 4px;
} */

/* Alternative text indicator */
.pdf-download-link::before {
  content: "VIEW ";
  font-size: 0.7em;
  opacity: 0.7;
  font-weight: normal;
}
@media (min-width: 769px) {
  .popup-content .popup-text {
    width: 417px;
  }
  .popup-close {
    font-size: 38px;
  }
}
.subscription-form-container {
  position: relative;
  z-index: 10;
}
@media (min-width: 1020px) {
  .email-popup:after {
    width: 480px;
    height: 350px;
  }
  .popup-close {
    top: 130px;
    right: 30px;
    font-size: 38px;
  }
}
