/* CF7 Exit Intent Popup Styles */

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cf7-exit-popup-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.75);
  z-index: 9999;
  justify-content: center;
  align-items: center;
  animation: fadeIn 0.3s ease-in-out;
}

.cf7-exit-popup-overlay.show {
  display: flex;
}

@keyframes slideUp {
  from {
    transform: translateY(50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cf7-exit-popup-modal {
  background-color: #ffffff;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  max-width: 800px;
  width: 95%;
  max-height: 95vh;
  overflow-y: auto;
  position: relative;
  animation: slideUp 0.3s ease-out;
}

.cf7-exit-popup-close {
  position: absolute;
  background: none;
  border: none;
  line-height: 1;
  cursor: pointer;
  color: #999;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: color 0.2s ease;
  z-index: 10;
  top: 10px;
  right: 10px;
  font-size: 28px;
  width: 35px;
  height: 35px;
}

.cf7-exit-popup-close:hover {
  color: #333;
}

.cf7-exit-popup-content {
  padding: 35px 20px 20px 20px;
}

.cf7-exit-popup-content h2 {
  margin-top: 0;
  margin-bottom: 15px;
  font-size: 24px;
  font-weight: 700;
  text-transform: none;
  letter-spacing: 0;
}

.cf7-exit-popup-content p {
  margin-bottom: 20px;
  font-size: 14px;
  line-height: 1.6;
}

.cf7-exit-popup-form {
  margin-top: 20px;
}

/* Contact Form 7 styling within popup */
.cf7-exit-popup-form .wpcf7 {
  width: 100%;
}

.cf7-exit-popup-form .wpcf7-form {
  width: 100%;
}

.cf7-exit-popup-form .wpcf7-form-control {
  margin-bottom: 12px;
}

.cf7-exit-popup-form input[type="text"],
.cf7-exit-popup-form input[type="email"],
.cf7-exit-popup-form input[type="tel"],
.cf7-exit-popup-form input[type="number"],
.cf7-exit-popup-form textarea,
.cf7-exit-popup-form select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 14px;
  transition: border-color 0.2s;
}

.cf7-exit-popup-form input[type="text"]:focus,
.cf7-exit-popup-form input[type="email"]:focus,
.cf7-exit-popup-form input[type="tel"]:focus,
.cf7-exit-popup-form input[type="number"]:focus,
.cf7-exit-popup-form textarea:focus,
.cf7-exit-popup-form select:focus {
  border-color: #0073aa;
  outline: none;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.cf7-exit-popup-form textarea {
  resize: vertical;
  min-height: 100px;
}

.cf7-exit-popup-modal .cf7-exit-popup-form input.wpcf7-submit:not([disabled]) {
  box-sizing: border-box;
  height: auto;
  padding: 8px;
  margin: 0 !important;
  width: 100%;
  background-color: #3f99a3;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s;
  text-align: center;
  font-weight: 700;
  font-family: "Open Sans", sans-serif;
}

.cf7-exit-popup-form .wpcf7-submit:hover {
  background-color: #005a87;
}

.cf7-exit-popup-form .wpcf7-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Induct & Train Modal */
.cf7-exit-popup-modal:has([data-wpcf7-id="26510"]) {
  background-image: linear-gradient(to right, #04a6ae, #005e62);
}

/* Read & Sign Modal */
.cf7-exit-popup-modal:has([data-wpcf7-id="26511"]) {
  background-image: linear-gradient(to right, #2d415c, #1b232f);
}

/* Combined Modal */
.cf7-exit-popup-modal:has([data-wpcf7-id="26512"]) {
  background-image: linear-gradient(180deg, #04a6ae, #ffffff);

  .cf7-exit-popup-content h2,
  .cf7-exit-popup-content p {
    color: #000000;
  }
}

/* Responsive Design */
@media (min-width: 800px) {
  .cf7-exit-popup-modal {
    width: 90%;
  }

  .cf7-exit-popup-content {
    padding: 40px 30px 30px 30px;
  }

  .cf7-exit-popup-content h2 {
    font-size: 28px;
  }

  .cf7-exit-popup-close {
    top: 15px;
    right: 15px;
    font-size: 32px;
    width: 40px;
    height: 40px;
  }
}
