/**
 * Email Capture System Styles
 * Styles for email forms, popups, and related elements
 */

/* Base Email Form Styles */
.email-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  background-color: white;
  border-radius: 2rem;
  padding: 0.5rem;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
  position: relative;
  overflow: hidden;
  max-width: 600px;
  margin: 0 auto;
  border: 1px solid #e2e8f0;
}

.email-form input[type="text"],
.email-form input[type="email"] {
  flex: 1;
  min-width: 200px;
  padding: 1rem 1.5rem;
  border: none;
  border-radius: 1.5rem;
  font-size: 1rem;
  background-color: #f8fafc;
  transition: all 0.3s ease;
}

.email-form input[type="email"]:focus,
.email-form input[type="text"]:focus {
  outline: none;
  background-color: white;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.email-form button {
  background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
  color: white;
  border: none;
  border-radius: 1.5rem;
  padding: 1rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.email-form button:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 15px rgba(37, 99, 235, 0.2);
}

.email-form button:active {
  transform: translateY(-1px);
}

.email-form button i {
  font-size: 0.875rem;
  transition: transform 0.3s ease;
}

.email-form button:hover i {
  transform: translateX(3px);
}

.form-disclaimer {
  width: 100%;
  text-align: center;
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 0.75rem;
  padding: 0 1rem;
}

.subscriber-counter {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  margin-top: 1.5rem;
  color: #64748b;
  font-size: 0.9rem;
}

.subscriber-counter i {
  color: #3b82f6;
}

.email-capture-section {
  background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
  border-radius: 2rem;
  margin: 2rem 0;
  padding: 3rem 1rem;
  box-shadow: 0 10px 25px -5px rgba(0,0,0,0.05);
}

.email-capture-content {
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

.email-capture-content h2 {
  font-size: 2rem;
  margin-bottom: 1rem;
  color: #1e293b;
}

.email-capture-content p {
  font-size: 1.1rem;
  margin-bottom: 2rem;
  color: #64748b;
}

/* Responsive adjustments */
@media (max-width: 640px) {
  .email-form {
    flex-direction: column;
    padding: 1rem;
  }
  
  .email-form input[type="email"],
  .email-form input[type="text"] {
    width: 100%;
  }
  
  .email-form button {
    width: 100%;
    justify-content: center;
  }
}

.form-error {
  color: var(--error-color);
  font-size: 0.85rem;
  margin-top: 0.75rem;
  display: none;
  background-color: rgba(239, 68, 68, 0.1);
  padding: 0.75rem;
  border-radius: 0.375rem;
  border-left: 3px solid var(--error-color);
}

.form-success {
  display: none;
  text-align: center;
  padding: 2rem 1rem;
}

.form-success p {
  color: var(--success-color);
  font-weight: 600;
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.download-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background-color: var(--success-color);
  color: white;
  font-weight: 600;
  padding: 0.75rem 1.5rem;
  border-radius: 0.5rem;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 4px 6px rgba(16, 185, 129, 0.15);
}

.download-button:hover {
  background-color: #059669;
  transform: translateY(-2px);
  box-shadow: 0 6px 12px rgba(16, 185, 129, 0.2);
}

.privacy-note {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--light-text);
  text-align: center;
}

/* Inline Form Styles */
.email-form[data-form-type="inline"] {
  margin: 3rem 0;
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
}

/* Sidebar Form Styles */
.email-form[data-form-type="sidebar"] {
  padding: 1.5rem;
}

/* Popup Styles */
.popup-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(5px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.popup-container.active {
  opacity: 1;
  visibility: visible;
}

.popup-content {
  background-color: var(--background-color);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
  width: 90%;
  max-width: 550px;
  position: relative;
  overflow: hidden;
  transform: translateY(30px);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
}

.popup-container.active .popup-content {
  transform: translateY(0);
  opacity: 1;
}

.popup-header {
  padding: 1.5rem 2rem;
  border-bottom: 1px solid var(--border-color);
  text-align: center;
}

.popup-header h3 {
  margin: 0;
  color: var(--secondary-color);
  font-size: 1.5rem;
}

.popup-body {
  padding: 2rem;
}

.close-popup {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 30px;
  height: 30px;
  background-color: rgba(241, 245, 249, 0.8);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--secondary-color);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1;
}

.close-popup:hover {
  background-color: var(--light-gray);
  transform: rotate(90deg);
}

.popup-form {
  padding: 0;
  box-shadow: none;
  background-color: transparent;
}

.popup-form:before {
  display: none;
}

.incentive-preview {
  text-align: center;
  margin-bottom: 1.5rem;
}

.incentive-preview img {
  max-width: 150px;
  margin: 0 auto 1rem;
  border-radius: 0.5rem;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.incentive-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--secondary-color);
  margin-bottom: 1rem;
}

@media (max-width: 768px) {
  .popup-content {
    width: 95%;
  }
  
  .popup-header h3 {
    font-size: 1.25rem;
  }
  
  .popup-body {
    padding: 1.5rem;
  }
}

/* Floating Newsletter */
.floating-newsletter {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 320px;
  background-color: var(--background-color);
  border-radius: var(--border-radius-lg);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
  z-index: 100;
  transform: translateY(150%);
  opacity: 0;
  transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
  overflow: hidden;
}

.floating-newsletter.active {
  transform: translateY(0);
  opacity: 1;
}

.floating-newsletter .email-form {
  margin: 0;
  box-shadow: none;
  border-radius: 0;
}

.float-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 25px;
  height: 25px;
  background-color: rgba(241, 245, 249, 0.8);
  border: none;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--secondary-color);
  cursor: pointer;
  transition: all 0.2s ease;
  z-index: 1;
}

.float-close:hover {
  background-color: var(--light-gray);
}

/* Sidebar Form */
.sidebar .email-form {
  margin-bottom: 2rem;
} 