/* ============================================================
   The Turn Group: Sitewide Form Success/Error Popup
   v126 (r61)
   Used by all forms: connect, estimate, quick-quote,
   submit-testimonial, referral-program.
   ============================================================ */

.tg-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 14, 22, 0.72);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .22s ease;
}

.tg-popup.is-open {
  display: flex;
  opacity: 1;
}

.tg-popup__card {
  position: relative;
  width: min(520px, 100%);
  background: #fff;
  border-radius: 14px;
  padding: 36px 32px 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .28), 0 6px 18px rgba(0,0,0,.12);
  transform: translateY(12px) scale(.98);
  transition: transform .26s cubic-bezier(.2,.7,.2,1);
  text-align: center;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tg-popup.is-open .tg-popup__card { transform: translateY(0) scale(1); }

.tg-popup__close {
  position: absolute;
  top: 10px;
  right: 12px;
  width: 36px;
  height: 36px;
  border: 0;
  background: transparent;
  color: #6b7280;
  cursor: pointer;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, color .15s ease;
}
.tg-popup__close:hover,
.tg-popup__close:focus-visible {
  background: #f1f3f6;
  color: #0a0e16;
  outline: none;
}
.tg-popup__close svg { width: 18px; height: 18px; }

.tg-popup__icon {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.tg-popup__icon svg { width: 34px; height: 34px; }

.tg-popup--success .tg-popup__icon {
  background: #e8f6ee;
  color: #1a7a3b;
}
.tg-popup--error .tg-popup__icon {
  background: #fdecec;
  color: #b3261e;
}

.tg-popup__title {
  margin: 0 0 10px;
  font-size: 22px;
  line-height: 1.25;
  font-weight: 700;
  color: #0a0e16;
  letter-spacing: -0.01em;
}

.tg-popup__msg {
  margin: 0 0 22px;
  font-size: 15px;
  line-height: 1.55;
  color: #3b4252;
}
.tg-popup__msg strong { color: #0a0e16; font-weight: 600; }

.tg-popup__actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}
.tg-popup__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 132px;
  height: 44px;
  padding: 0 22px;
  border: 0;
  border-radius: 6px;
  font: 600 14px/1 'Inter', sans-serif;
  letter-spacing: .01em;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}
.tg-popup__btn--primary {
  background: #0a0e16;
  color: #fff !important;
}
.tg-popup__btn--primary:hover { background: #1c2230; }
.tg-popup__btn--primary:active { transform: translateY(1px); }
.tg-popup__btn--ghost {
  background: #f1f3f6;
  color: #0a0e16;
}
.tg-popup__btn--ghost:hover { background: #e6e9ee; }

/* Loading button state used by AJAX forms */
.tg-form-busy { opacity: .65; pointer-events: none; }

@media (max-width: 520px) {
  .tg-popup__card { padding: 30px 22px 24px; border-radius: 12px; }
  .tg-popup__title { font-size: 20px; }
  .tg-popup__msg { font-size: 14px; }
}
