/* ==========================================================================
   Exit-intent demo popup (homepage only)
   Self-contained, namespaced under .tk-exit-* so it can't affect site styles.
   Brand: dark green #00413c, light green #9ddca2, teal #1aa99d, Lato font.
   ========================================================================== */

.tk-exit-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2000;
  align-items: flex-start;
  justify-content: center;
  padding: 15vh 20px 20px; /* modal sits 15% down from the top */
  background: rgba(0, 25, 22, 0.6);
  font-family: 'Lato', Arial, sans-serif;
}

.tk-exit-overlay.is-open {
  display: flex;
  animation: tkExitFade 0.25s ease-out;
}

body.tk-exit-open {
  overflow: hidden;
}

.tk-exit-modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(85vh - 40px); /* fits in the space below the 15vh top offset */
  overflow-y: auto;
  padding: 44px 40px 36px;
  text-align: center;
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 20, 18, 0.35);
  animation: tkExitPop 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.tk-exit-close {
  position: absolute;
  top: 12px;
  right: 14px;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #9aa5a2;
  font-size: 30px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.tk-exit-close:hover {
  color: #00413c;
}

.tk-exit-eyebrow {
  margin: 0 0 10px;
  color: #1aa99d;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.tk-exit-title {
  margin: 0 0 12px;
  color: #00413c;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.tk-exit-sub {
  margin: 0 0 24px;
  color: #5a6562;
  font-size: 16px;
  line-height: 1.5;
}

.tk-exit-form {
  margin: 0;
  text-align: left;
}

.tk-exit-input {
  display: block;
  width: 100%;
  height: 50px;
  margin: 0 0 14px;
  padding: 10px 18px;
  color: #00413c;
  font-family: inherit;
  font-size: 15px;
  background: #fff;
  border: 1px solid #d8dee3;
  border-radius: 10px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tk-exit-input::placeholder {
  color: #9aa5a2;
}

.tk-exit-input:focus {
  border-color: #1aa99d;
  box-shadow: 0 0 0 3px rgba(26, 169, 157, 0.15);
}

.tk-exit-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 54px;
  margin-top: 6px;
  padding: 10px 30px;
  color: #00413c;
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  background: #9ddca2;
  border: 2px solid #9ddca2;
  border-radius: 50px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
}

.tk-exit-submit:hover {
  background: #fff;
  border-color: #00886d;
  color: #00413c;
}

.tk-exit-submit:disabled {
  opacity: 0.6;
  cursor: default;
}

.tk-exit-error {
  display: none;
  margin: 14px 0 0;
  color: #c0392b;
  font-size: 14px;
  text-align: center;
}

.tk-exit-form.has-error .tk-exit-error {
  display: block;
}

.tk-exit-dismiss {
  margin: 18px 0 0;
  padding: 0;
  color: #9aa5a2;
  font-family: inherit;
  font-size: 14px;
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 0.2s ease;
}

.tk-exit-dismiss:hover {
  color: #5a6562;
  text-decoration: underline;
}

/* --- Success step ------------------------------------------------------- */

.tk-exit-step--success {
  display: none;
}

.tk-exit-modal.is-success .tk-exit-step--form {
  display: none;
}

.tk-exit-modal.is-success .tk-exit-step--success {
  display: block;
}

.tk-exit-check {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin: 4px auto 20px;
  color: #00413c;
  font-size: 32px;
  font-weight: 700;
  background: #9ddca2;
  border-radius: 50%;
}

.tk-exit-step--success .tk-exit-submit {
  max-width: 200px;
  margin: 22px auto 0;
}

/* --- Animations --------------------------------------------------------- */

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

@keyframes tkExitPop {
  from { opacity: 0; transform: translateY(16px) scale(0.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
  .tk-exit-overlay.is-open,
  .tk-exit-modal {
    animation: none;
  }
}

/* --- Responsive --------------------------------------------------------- */

@media (max-width: 575px) {
  .tk-exit-modal {
    padding: 40px 24px 28px;
    border-radius: 14px;
  }
  .tk-exit-title {
    font-size: 24px;
  }
  .tk-exit-sub {
    font-size: 15px;
  }
}
