
/* ===== Marketing Popup Styles ===== */

.popup-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.popup-overlay.active {
  opacity: 1;
}

.popup-container {
  background: white;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 500px;
  width: 100%;
  position: relative;
  max-height: 90vh;
  overflow-y: auto;
}

.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  background: transparent;
  border: none;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  color: #666;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  z-index: 10;
}

.popup-close:hover {
  background: #f3f4f6;
  color: #000;
  transform: rotate(90deg);
}

.popup-content {
  padding: 40px 30px 30px;
}

.popup-heading {
  font-size: 28px;
  font-weight: 700;
  margin: 0 0 12px;
  color: #1f2937;
  line-height: 1.3;
}

.popup-subtitle {
  font-size: 16px;
  color: #6b7280;
  margin: 0 0 24px;
  line-height: 1.5;
}

.popup-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.popup-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.popup-field label {
  font-size: 14px;
  font-weight: 600;
  color: #374151;
}

.popup-field input,
.popup-field textarea {
  padding: 12px 16px;
  border: 2px solid #e5e7eb;
  border-radius: 8px;
  font-size: 15px;
  transition: all 0.2s ease;
  font-family: inherit;
}

.popup-field input:focus,
.popup-field textarea:focus {
  outline: none;
  border-color: #3b82f6;
  box-shadow: 0 0 0 3px #3b82f620;
}

.popup-field textarea {
  resize: vertical;
  min-height: 80px;
}

.popup-privacy {
  margin-top: 8px;
}

.privacy-checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: #6b7280;
  cursor: pointer;
}

.privacy-checkbox input[type="checkbox"] {
  margin-top: 2px;
  cursor: pointer;
}

.privacy-checkbox a {
  color: #3b82f6;
  text-decoration: underline;
}

.popup-cta {
  padding: 14px 24px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-top: 8px;
}

.popup-cta:hover {
  background: #3178ec;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px #3b82f640;
}

.popup-cta:active {
  transform: translateY(0);
}

.popup-decline {
  background: transparent;
  border: none;
  color: #9ca3af;
  font-size: 14px;
  cursor: pointer;
  padding: 8px;
  transition: color 0.2s ease;
}

.popup-decline:hover {
  color: #6b7280;
}

.popup-success {
  text-align: center;
  padding: 20px 0;
}

.success-icon {
  width: 64px;
  height: 64px;
  background: #3b82f6;
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  margin: 0 auto 16px;
  animation: successPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.success-message {
  font-size: 16px;
  color: #374151;
  margin: 0;
  line-height: 1.5;
}

@keyframes successPop {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  50% {
    transform: scale(1.1);
  }
  100% {
    transform: scale(1);
    opacity: 1;
  }
}

/* Download Popup Specific Styles */
.popup-download {
  text-align: center;
}

.download-badge {
  display: inline-block;
  background: #f59e0b;
  color: white;
  padding: 6px 16px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 16px;
  letter-spacing: 0.5px;
}

.benefits-list {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  text-align: left;
}

.benefit-item {
  padding: 10px 0;
  color: #374151;
  font-size: 15px;
  border-bottom: 1px solid #f3f4f6;
}

.benefit-item:last-child {
  border-bottom: none;
}

.popup-guarantee {
  font-size: 13px;
  color: #059669;
  margin: 12px 0 0;
  font-weight: 600;
}

/* Chatbot Popup Specific Styles */
.popup-chatbot {
  max-width: 380px;
}

.chatbot-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid #f3f4f6;
}

.chatbot-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #3b82f6, #10b981);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}

.chatbot-info {
  flex: 1;
  min-width: 0;
}

.chatbot-info .popup-heading {
  font-size: 18px;
  margin: 0 0 4px;
}

.chatbot-status {
  font-size: 13px;
  color: #059669;
  margin: 0;
}

.chatbot-messages {
  min-height: 120px;
  margin-bottom: 16px;
}

.chat-message {
  background: #f3f4f6;
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 12px;
  max-width: 85%;
}

.chat-message p {
  margin: 0;
  font-size: 14px;
  color: #374151;
  line-height: 1.5;
}

.quick-replies {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-reply-btn {
  padding: 10px 16px;
  background: white;
  border: 2px solid #3b82f6;
  color: #3b82f6;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
}

.quick-reply-btn:hover {
  background: #3b82f6;
  color: white;
  transform: translateX(4px);
}

.chatbot-typing {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: #f3f4f6;
  border-radius: 12px;
  width: fit-content;
  margin-bottom: 12px;
}

.chatbot-typing span {
  width: 8px;
  height: 8px;
  background: #9ca3af;
  border-radius: 50%;
  animation: typing 1.4s infinite;
}

.chatbot-typing span:nth-child(2) {
  animation-delay: 0.2s;
}

.chatbot-typing span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.5;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

.chatbot-form {
  display: flex;
  gap: 8px;
}

.chatbot-form .popup-field {
  flex: 1;
}

.chatbot-form .popup-cta {
  margin-top: 0;
  padding: 12px 20px;
}

/* Calculator Popup Specific Styles */
.popup-calculator .popup-content {
  text-align: center;
}

.calculator-icon {
  font-size: 48px;
  margin-bottom: 16px;
}

.calculator-field {
  text-align: left;
}

.calculator-result {
  margin-top: 24px;
  padding: 24px;
  background: linear-gradient(135deg, #3b82f610, #10b98110);
  border-radius: 12px;
  border: 2px solid #3b82f630;
}

.result-value {
  font-size: 32px;
  font-weight: 700;
  color: #3b82f6;
  margin-bottom: 12px;
}

.result-prefix {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: #6b7280;
  margin-bottom: 8px;
}

.result-amount {
  display: block;
}

.result-message {
  font-size: 14px;
  color: #6b7280;
  margin: 0 0 16px;
}

.contact-cta {
  padding: 12px 24px;
  background: #10b981;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.contact-cta:hover {
  background: #06af77;
  transform: translateY(-1px);
}

/* Animation Styles */

.popup-animation-bounce {
  animation: bounceIn 0.7s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes bounceIn {
  0% {
    opacity: 0;
    transform: scale(0) rotate(-5deg);
  }
  50% {
    transform: scale(1.05) rotate(2deg);
  }
  100% {
    opacity: 1;
    transform: scale(1) rotate(0deg);
  }
}

/* Responsive Styles */
@media (max-width: 640px) {
  .popup-overlay {
    padding: 10px;
  }

  .popup-container {
    max-height: 95vh;
  }

  .popup-content {
    padding: 35px 20px 20px;
  }

  .popup-heading {
    font-size: 24px;
  }

  .popup-subtitle {
    font-size: 15px;
  }

  .popup-field input,
  .popup-field textarea {
    font-size: 16px;
  }
}
