/* Homepage lead popup — premium, wide, no scroll */

.gt-popup {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
}

.gt-popup[hidden] {
  display: none !important;
}

.gt-popup.is-visible {
  display: flex;
}

.gt-popup__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(74, 63, 26, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Card — wide, auto height, NO scrollbar */
.gt-popup__card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(74, 63, 26, 0.22);
  border: 1px solid rgba(255, 255, 255, 0.8);
}

.gt-popup__close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 5;
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #64748b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.gt-popup__panel {
  padding: 22px 24px 18px;
}

.gt-popup__panel[hidden] {
  display: none !important;
}

/* Form panel */
.gt-popup__panel--form {
  background: linear-gradient(165deg, #f0f9ff 0%, #fdf2d8 55%, #f8fbfe 100%);
}

.gt-popup__title {
  margin: 0 32px 12px 0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #5a4d22;
  text-align: center;
}

.gt-popup__promo {
  margin: 0 0 14px;
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 2px 12px rgba(74, 63, 26, 0.06);
}

.gt-popup__promo img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 110px;
  object-position: center;
  box-sizing: border-box;
}

.gt-popup__form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.gt-popup__field {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid #d1dde8;
  border-radius: 8px;
  font-family: 'Inter', 'Poppins', sans-serif;
  font-size: 0.88rem;
  font-weight: 400;
  color: #5a4d22;
  background: #fff;
  box-sizing: border-box;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.gt-popup__field::placeholder {
  color: #94a3b8;
  font-weight: 400;
}

.gt-popup__field:focus {
  outline: none;
  border-color: #e0c060;
  box-shadow: 0 0 0 3px rgba(126, 184, 232, 0.2);
}

.gt-popup__submit {
  position: relative;
  width: 100%;
  margin-top: 4px;
  padding: 12px 16px;
  border: none;
  border-radius: 8px;
  background: #d32f2f;
  color: #fff;
  font-family: 'Poppins', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  min-height: 44px;
  transition: background 0.15s ease, opacity 0.15s ease;
}

.gt-popup__submit:hover:not(:disabled) {
  background: #c62828;
}

.gt-popup__submit:disabled {
  cursor: wait;
  opacity: 0.92;
}

.gt-popup__submit-label {
  display: inline-block;
  transition: opacity 0.2s ease;
}

.gt-popup__submit.is-loading .gt-popup__submit-label {
  opacity: 0;
}

.gt-popup__submit-loader {
  display: none;
  position: absolute;
  left: 50%;
  top: 50%;
  width: 20px;
  height: 20px;
  margin: -10px 0 0 -10px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: gt-popup-spin 0.65s linear infinite;
}

.gt-popup__submit.is-loading .gt-popup__submit-loader {
  display: block;
}

@keyframes gt-popup-spin {
  to { transform: rotate(360deg); }
}

.gt-popup__legal {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.62rem;
  font-weight: 500;
  color: #94a3b8;
  letter-spacing: 0.02em;
}

/* Thank you — only this panel visible */
.gt-popup__panel--thanks {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 28px 32px;
  min-height: 200px;
  background: linear-gradient(165deg, #f0f9ff 0%, #fef8ea 100%);
}

.gt-popup__thanks-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #22c55e;
  color: #fff;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 48px;
  margin-bottom: 14px;
  animation: gt-popup-pop 0.35s ease;
}

@keyframes gt-popup-pop {
  from { transform: scale(0.6); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.gt-popup__thanks-img {
  max-width: 180px;
  max-height: 90px;
  object-fit: contain;
  margin-bottom: 12px;
}

.gt-popup__thanks-msg {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-size: 0.92rem;
  font-weight: 500;
  color: #5a4d22;
  line-height: 1.45;
}

/* Mobile bottom sheet */
@media (max-width: 575.98px) {
  .gt-popup {
    align-items: flex-end;
    padding: 0;
  }

  .gt-popup__card {
    max-width: 100%;
    border-radius: 16px 16px 0 0;
  }

  .gt-popup__panel--form {
    padding-bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  }
}
