/* =========================================================
   Tin Can Smartphone — Exit-intent newsletter popup
   Brand: cyan #54B4E0 / ink #141414 / Nunito Sans / Space Mono
   ========================================================= */

/* ----- Overlay ----- */
.tc-exit-intent {
  position: fixed;
  inset: 0;
  z-index: 10050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(20, 20, 20, 0.72);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.tc-exit-intent[hidden] {
  display: none !important;
}

/* Scroll-lock when open */
html.tc-exit-intent-open {
  overflow: hidden;
}

/* ----- Backdrop dismiss target ----- */
.tc-exit-intent__backdrop {
  position: absolute;
  inset: 0;
  cursor: pointer;
}

/* ----- Dialog card ----- */
.tc-exit-intent__dialog {
  position: relative;
  background: #fff;
  border-radius: 12px;
  width: min(100%, 520px);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
  /* Cyan top accent bar */
  border-top: 4px solid #54B4E0;
}

/* ----- Close button ----- */
.tc-exit-intent__close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  color: #6b7280;
  border-radius: 4px;
  transition: color 0.15s, background 0.15s;
}
.tc-exit-intent__close:hover {
  color: #141414;
  background: #f3f4f6;
}
.tc-exit-intent__close svg {
  display: block;
  width: 20px;
  height: 20px;
}

/* ----- Body ----- */
.tc-exit-intent__body {
  padding: 2rem 1.75rem 1.75rem;
}

/* ----- View toggle ----- */
.tc-exit-intent__view { display: none; }
.tc-exit-intent__view.is-active { display: block; }

/* ----- Heading / lead ----- */
.tc-exit-intent__eyebrow {
  font-family: 'Space Mono', monospace;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #54B4E0;
  margin: 0 0 0.5rem;
}
.tc-exit-intent__title {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.25;
  color: #141414;
  margin: 0 0 0.75rem;
}
.tc-exit-intent__lead {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.95rem;
  color: #4b5563;
  line-height: 1.55;
  margin: 0 0 1rem;
}

/* ----- Benefits ----- */
.tc-exit-intent__benefits {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.tc-exit-intent__benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.9rem;
  line-height: 1.4;
  color: #374151;
}
.tc-exit-intent__check {
  flex-shrink: 0;
  width: 1.15rem;
  height: 1.15rem;
  margin-top: 0.1rem;
  border-radius: 999px;
  background: rgba(84, 180, 224, 0.18);
  color: #0e7490;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tc-exit-intent__check svg {
  width: 0.7rem;
  height: 0.7rem;
}

/* ----- Form ----- */
.tc-exit-intent__form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.tc-exit-intent__email-wrap {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.tc-exit-intent__email {
  flex: 1 1 180px;
  height: 2.75rem;
  padding: 0 0.875rem;
  border: 1.5px solid #d1d5db;
  border-radius: 6px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.95rem;
  color: #141414;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
  outline: none;
}
.tc-exit-intent__email:focus {
  border-color: #54B4E0;
  box-shadow: 0 0 0 3px rgba(84, 180, 224, 0.25);
}
.tc-exit-intent__email.is-invalid {
  border-color: #ef4444;
}
.tc-exit-intent__submit {
  height: 2.75rem;
  padding: 0 1.25rem;
  background: #141414;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
  flex-shrink: 0;
}
.tc-exit-intent__submit:hover {
  background: #54B4E0;
}
.tc-exit-intent__submit:disabled {
  opacity: 0.6;
  cursor: wait;
}

/* ----- Consent checkboxes ----- */
.tc-exit-intent__consents {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.tc-exit-intent__consent-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.8rem;
  line-height: 1.4;
  color: #6b7280;
  cursor: pointer;
}
.tc-exit-intent__consent-label input[type="checkbox"] {
  flex-shrink: 0;
  margin-top: 0.15rem;
  accent-color: #54B4E0;
  width: 1rem;
  height: 1rem;
}
.tc-exit-intent__consent-label a {
  color: #54B4E0;
  text-decoration: underline;
}
.tc-exit-intent__consent-label.is-invalid {
  color: #ef4444;
}

/* ----- Status / error messages ----- */
.tc-exit-intent__error {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.8rem;
  color: #ef4444;
  min-height: 1.1em;
  margin: 0;
}
.tc-exit-intent__status {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.85rem;
  color: #4b5563;
  min-height: 1.2em;
  margin: 0;
  text-align: center;
}
.tc-exit-intent__helper {
  display: flex;
  align-items: flex-start;
  gap: 0.45rem;
  margin: 0.15rem 0 0;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.78rem;
  line-height: 1.45;
  color: #6b7280;
}
.tc-exit-intent__helper-icon {
  flex-shrink: 0;
  width: 0.95rem;
  height: 0.95rem;
  margin-top: 0.1rem;
  color: #54B4E0;
}
.tc-exit-intent__success-note {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.85rem;
  line-height: 1.5;
  color: #6b7280;
  margin: 0 0 1rem;
  padding: 0.75rem 0.85rem;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 8px;
}

/* ----- Math challenge panel ----- */
.visitor-email-challenge {
  background: #f0f9ff;
  border: 1.5px solid #bae6fd;
  border-radius: 8px;
  padding: 1rem;
}
.visitor-email-challenge[hidden] { display: none; }
.visitor-email-challenge__lead {
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.85rem;
  color: #0369a1;
  margin: 0 0 0.5rem;
}
.visitor-email-challenge__field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.85rem;
  color: #141414;
}
.visitor-email-challenge__input {
  width: 120px;
  height: 2.25rem;
  padding: 0 0.75rem;
  border: 1.5px solid #7dd3fc;
  border-radius: 5px;
  font-family: 'Nunito Sans', sans-serif;
  font-size: 0.95rem;
  color: #141414;
}
.visitor-email-challenge__input:focus {
  outline: none;
  border-color: #54B4E0;
  box-shadow: 0 0 0 2px rgba(84, 180, 224, 0.25);
}

/* ----- Visually-hidden honeypot ----- */
.aa-honeypot,
[name="hp_confirm_uri"],
[name="website_url"] {
  position: absolute;
  left: -9999px;
  height: 0;
  width: 0;
  opacity: 0;
  pointer-events: none;
}

/* ----- Success view ----- */
.tc-exit-intent__success-icon {
  width: 2.5rem;
  height: 2.5rem;
  background: #54B4E0;
  color: #fff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 0 1rem;
}
.tc-exit-intent__success-icon svg {
  width: 1.25rem;
  height: 1.25rem;
}

/* ---- Mobile ---- */
@media (max-width: 480px) {
  .tc-exit-intent__body {
    padding: 1.5rem 1.25rem 1.25rem;
  }
  .tc-exit-intent__title { font-size: 1.25rem; }
  .tc-exit-intent__email-wrap {
    flex-direction: column;
  }
  .tc-exit-intent__email,
  .tc-exit-intent__submit {
    width: 100%;
    flex: none;
  }
}
