/* Auto Popup E-book - Comercial UP */
.ebook-auto-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 10000;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.ebook-auto-popup.show {
  opacity: 1;
  visibility: visible;
}

.popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(5px);
}

.popup-container {
  position: relative;
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  margin: 5vh auto;
  background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
  transform: scale(0.8);
  transition: transform 0.3s ease;
}

.ebook-auto-popup.show .popup-container {
  transform: scale(1);
}

.popup-close {
  position: absolute;
  top: 15px;
  right: 15px;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  border-radius: 50%;
  color: white;
  font-size: 18px;
  cursor: pointer;
  z-index: 10;
  transition: all 0.3s ease;
}

.popup-close:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: scale(1.1);
}

.popup-content {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  min-height: 500px;
}

.popup-left {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px;
  background: linear-gradient(45deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
}

.ebook-cover-container {
  position: relative;
}

.ebook-cover {
  position: relative;
  width: 200px;
  height: 260px;
  transform: perspective(1000px) rotateY(-15deg);
  transition: transform 0.3s ease;
}

.ebook-cover:hover {
  transform: perspective(1000px) rotateY(-10deg) scale(1.05);
}

.ebook-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.cover-glow {
  position: absolute;
  top: -10px;
  left: -10px;
  right: -10px;
  bottom: -10px;
  background: linear-gradient(45deg, #60a5fa, #3b82f6, #1d4ed8);
  border-radius: 15px;
  z-index: -1;
  opacity: 0.6;
  animation: glow 2s ease-in-out infinite alternate;
}

@keyframes glow {
  from {
    opacity: 0.6;
    transform: scale(1);
  }
  to {
    opacity: 0.8;
    transform: scale(1.02);
  }
}

.floating-elements {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  pointer-events: none;
}

.floating-icon {
  position: absolute;
  width: 40px;
  height: 40px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 18px;
  animation: float 3s ease-in-out infinite;
}

.floating-icon.icon-1 {
  top: 20%;
  right: -20px;
  animation-delay: 0s;
}

.floating-icon.icon-2 {
  bottom: 30%;
  left: -20px;
  animation-delay: 1s;
}

.floating-icon.icon-3 {
  top: 60%;
  right: -30px;
  animation-delay: 2s;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-10px);
  }
}

.popup-right {
  padding: 40px;
  color: white;
  overflow-y: auto;
}

.urgency-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #ef4444;
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 20px;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.8;
  }
}

.popup-header h2 {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 15px;
}

.highlight {
  background: linear-gradient(45deg, #60a5fa, #34d399);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.subtitle {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 25px;
  line-height: 1.5;
}

.benefits-list {
  margin-bottom: 30px;
}

.benefit-item {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 15px;
}

.benefit-item i {
  color: #34d399;
  font-size: 16px;
}

.popup-form {
  margin-bottom: 25px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
  margin-bottom: 20px;
}

.form-group input {
  width: 100%;
  padding: 15px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: white;
  font-size: 16px;
  transition: all 0.3s ease;
}

.form-group input::placeholder {
  color: rgba(255, 255, 255, 0.7);
}

.form-group input:focus {
  outline: none;
  border-color: #60a5fa;
  background: rgba(255, 255, 255, 0.15);
}

.download-btn {
  width: 100%;
  padding: 18px;
  background: linear-gradient(45deg, #34d399, #10b981);
  border: none;
  border-radius: 12px;
  color: white;
  font-size: 18px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.download-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(52, 211, 153, 0.4);
}

.download-btn.loading .btn-text {
  opacity: 0;
}

.download-btn.loading .btn-loading {
  opacity: 1;
}

.btn-loading {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.form-note {
  text-align: center;
  font-size: 14px;
  opacity: 0.8;
  margin-top: 15px;
}

.social-proof {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 14px;
}

.proof-avatars {
  display: flex;
  gap: -5px;
}

.avatar {
  width: 35px;
  height: 35px;
  background: linear-gradient(45deg, #60a5fa, #3b82f6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  border: 2px solid white;
  margin-left: -5px;
}

.popup-footer {
  background: rgba(0, 0, 0, 0.2);
  padding: 15px 40px;
  text-align: center;
  color: white;
  font-size: 14px;
}

.success-message {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 40px;
  height: 100%;
}

.success-icon {
  font-size: 60px;
  color: #34d399;
  margin-bottom: 20px;
}

.success-message h3 {
  font-size: 24px;
  margin-bottom: 15px;
}

.success-message p {
  font-size: 16px;
  opacity: 0.9;
  margin-bottom: 30px;
}

.btn-close-success {
  padding: 15px 30px;
  background: #34d399;
  border: none;
  border-radius: 10px;
  color: white;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.btn-close-success:hover {
  background: #10b981;
  transform: translateY(-2px);
}

/* Responsividade */
@media (max-width: 768px) {
  .popup-container {
    width: 95%;
    margin: 2.5vh auto;
    max-height: 95vh;
  }

  .popup-content {
    grid-template-columns: 1fr;
  }

  .popup-left {
    padding: 30px 20px 20px;
  }

  .ebook-cover {
    width: 150px;
    height: 195px;
  }

  .popup-right {
    padding: 20px 30px 30px;
  }

  .popup-header h2 {
    font-size: 24px;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 15px;
  }

  .floating-icon {
    display: none;
  }

  .popup-footer {
    padding: 15px 20px;
  }
}

@media (max-width: 480px) {
  .popup-container {
    width: 98%;
    margin: 1vh auto;
    border-radius: 15px;
  }

  .popup-right {
    padding: 20px;
  }

  .popup-header h2 {
    font-size: 22px;
  }

  .download-btn {
    font-size: 16px;
    padding: 16px;
  }
}
