.tpl-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.tpl-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.tpl-popup {
  background: #fff;
  max-width: 420px;
  width: 100%;
  padding: 2rem 2rem 1.75rem;
  position: relative;
}

.tpl-popup__close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  padding: 0.25rem;
  cursor: pointer;
  color: #888;
}

.tpl-popup__close:hover { color: #000; }

.tpl-popup h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
  color: #111;
}

.tpl-popup p {
  font-size: 0.9rem;
  color: #555;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.tpl-popup input[type="text"],
.tpl-popup input[type="email"] {
  display: block;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid #ccc;
  padding: 0.65rem 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  margin-bottom: 0.75rem;
  outline: none;
  border-radius: 0;
}

.tpl-popup input[type="text"]:focus,
.tpl-popup input[type="email"]:focus { border-color: #000; }

.tpl-popup button[type="submit"] {
  display: block;
  width: 100%;
  background: #000;
  color: #fff;
  border: none;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s;
}

.tpl-popup button[type="submit"]:hover    { background: #222; }
.tpl-popup button[type="submit"]:disabled { background: #888; cursor: not-allowed; }

.tpl-popup__legal {
  font-size: 0.75rem;
  color: #aaa;
  text-align: center;
  margin: 0.6rem 0 0 !important;
}

.tpl-popup__success p { color: #2a7a2a; font-size: 0.9rem; margin: 0; }
.tpl-popup__error   p { color: #c0392b; font-size: 0.9rem; margin: 0; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
