/* TND Popup Pro — Styles */

/* Overlay */
.tnd-popup-overlay {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex !important;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(4px);
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

.tnd-popup-overlay.tnd-visible {
  opacity: 1;
  pointer-events: all;
}

/* Modal */
.tnd-popup-modal {
  position: relative;
  width: 100%;
  max-width: 400px;
  border-radius: 20px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2), 0 4px 16px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  transform: translateY(30px) scale(0.96);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.35s ease;
  opacity: 0;
}

.tnd-popup-overlay.tnd-visible .tnd-popup-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}

/* Close Button */
.tnd-popup-close {
  position: absolute;
  top: 14px;
  right: 16px;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: rgba(0, 0, 0, 0.08);
  color: #555;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 10;
}

.tnd-popup-close:hover {
  background: rgba(0, 0, 0, 0.15);
  transform: rotate(90deg);
}

/* Inner Content */
.tnd-popup-inner {
  padding: 40px 32px 36px;
  text-align: center;
}

.tnd-popup-icon {
  font-size: 36px;
  margin-bottom: 12px;
  display: inline-block;
  animation: tnd-bounce 1.2s ease infinite alternate;
}

@keyframes tnd-bounce {
  from { transform: translateY(0); }
  to   { transform: translateY(-5px); }
}

.tnd-popup-headline {
  margin: 0 0 4px;
  font-size: 15px;
  color: #666;
  font-weight: 400;
  font-family: inherit;
}

.tnd-popup-subheadline {
  margin: 0 0 28px;
  font-size: 32px;
  font-weight: 900;
  color: #111;
  line-height: 1.1;
  letter-spacing: -0.5px;
  font-family: inherit;
}

/* Input */
.tnd-input-wrap {
  position: relative;
  margin-bottom: 12px;
}

.tnd-input-icon {
  position: absolute;
  left: 16px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 16px;
  color: #aaa;
  pointer-events: none;
}

#tnd-email-input {
  width: 100%;
  box-sizing: border-box;
  padding: 14px 16px 14px 44px;
  border: 2px solid #e8e8e8;
  border-radius: 12px;
  font-size: 14px;
  color: #333;
  outline: none;
  background: #fafafa;
  transition: border-color 0.2s, box-shadow 0.2s;
  font-family: inherit;
}

#tnd-email-input:focus {
  border-color: #2BBF8F;
  box-shadow: 0 0 0 4px rgba(43, 191, 143, 0.12);
  background: #fff;
}

#tnd-email-input::placeholder { color: #bbb; }

/* Submit Button */
#tnd-submit-btn {
  width: 100%;
  padding: 15px;
  border: none;
  border-radius: 12px;
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.2px;
  position: relative;
  overflow: hidden;
  transition: filter 0.2s, transform 0.15s;
  font-family: inherit;
  margin-bottom: 4px;
}

#tnd-submit-btn:hover {
  filter: brightness(1.06);
  transform: translateY(-1px);
}

#tnd-submit-btn:active {
  transform: translateY(0);
}

#tnd-submit-btn::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(255,255,255,0);
  transition: background 0.2s;
}

#tnd-submit-btn:hover::after { background: rgba(255,255,255,0.08); }

.tnd-btn-loader {
  letter-spacing: 4px;
  animation: tnd-pulse 0.8s ease-in-out infinite;
}

@keyframes tnd-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

/* Error */
.tnd-popup-error {
  color: #e74c3c;
  font-size: 13px;
  margin-top: 6px;
  min-height: 18px;
  text-align: left;
}

/* Privacy */
.tnd-popup-privacy {
  margin: 10px 0 0;
  font-size: 12px;
  color: #aaa;
}

/* Success State */
.tnd-popup-success {
  text-align: center;
  padding: 8px 0;
}

.tnd-success-icon {
  font-size: 52px;
  margin-bottom: 12px;
  animation: tnd-pop 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes tnd-pop {
  from { transform: scale(0); }
  to   { transform: scale(1); }
}

.tnd-success-headline {
  margin: 0 0 8px;
  font-size: 24px;
  font-weight: 800;
  color: #111;
  font-family: inherit;
}

.tnd-success-msg {
  margin: 0 0 20px;
  font-size: 14px;
  color: #666;
}

/* Coupon Box */
.tnd-coupon-reveal {
  background: #f8f9fa;
  border-radius: 12px;
  padding: 20px;
  margin-top: 8px;
}

.tnd-coupon-label {
  margin: 0 0 8px;
  font-size: 13px;
  color: #888;
}

.tnd-coupon-box {
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 4px;
  color: #111;
  font-family: 'Courier New', monospace;
  background: #fff;
  border: 2px dashed #2BBF8F;
  border-radius: 8px;
  padding: 12px 20px;
  margin-bottom: 14px;
  word-break: break-all;
}

.tnd-copy-btn {
  border: none;
  color: #fff;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: filter 0.2s;
  font-family: inherit;
}

.tnd-copy-btn:hover { filter: brightness(1.08); }

/* Elementor trigger button */
.tnd-elementor-trigger {
  border-radius: 50px;
  padding: 14px 32px;
  font-size: 15px;
  font-weight: 700;
  transition: transform 0.2s, filter 0.2s;
}

.tnd-elementor-trigger:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

/* Mobile */
@media (max-width: 480px) {
  .tnd-popup-inner { padding: 32px 20px 28px; }
  .tnd-popup-subheadline { font-size: 26px; }
}
