/**
 * Email Capture Styles for HouseOfWeebs
 *
 * Styles for:
 * - Exit-intent popup
 * - Sticky footer bar
 * - Inline email capture
 */

/* ============================================================================
   CSS VARIABLES
   ============================================================================ */

:root {
  --how-popup-bg: #ffffff;
  --how-popup-text: #1a1a1a;
  --how-popup-muted: #666666;
  --how-popup-accent: #ff6b6b;
  --how-popup-overlay: rgba(0, 0, 0, 0.6);
  --how-popup-radius: 12px;
  --how-popup-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   SHARED FORM STYLES
   ============================================================================ */

.how-email-form {
  display: flex;
  gap: 0.5rem;
  max-width: 400px;
}

.how-email-form input[type='email'] {
  flex: 1;
  padding: 0.75rem 1rem;
  border: 2px solid #e0e0e0;
  border-radius: 6px;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.how-email-form input[type='email']:focus {
  outline: none;
  border-color: var(--how-popup-accent);
}

.how-email-form button[type='submit'] {
  padding: 0.75rem 1.5rem;
  background: var(--how-popup-accent);
  color: white;
  border: none;
  border-radius: 6px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  white-space: nowrap;
}

.how-email-form button[type='submit']:hover {
  background: #e55b5b;
}

.how-email-form button[type='submit']:active {
  transform: scale(0.98);
}

.how-email-form button[type='submit']:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.how-form-error {
  color: #dc3545;
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.how-form-success {
  color: #28a745;
  font-size: 1rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.how-success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  background: #28a745;
  color: white;
  border-radius: 50%;
  font-size: 14px;
}

.how-form-note {
  font-size: 0.75rem;
  color: var(--how-popup-muted);
  margin-top: 0.5rem;
}

/* ============================================================================
   EXIT INTENT POPUP
   ============================================================================ */

.how-popup {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.how-popup-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--how-popup-overlay);
  animation: fadeIn 0.3s ease;
}

.how-popup-content {
  position: relative;
  background: var(--how-popup-bg);
  padding: 2.5rem;
  border-radius: var(--how-popup-radius);
  box-shadow: var(--how-popup-shadow);
  max-width: 500px;
  width: 100%;
  text-align: center;
  animation: slideUp 0.4s ease;
}

.how-popup-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--how-popup-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s;
}

.how-popup-close:hover {
  background: #f0f0f0;
}

.how-popup-content h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--how-popup-text);
  margin: 0 0 0.75rem;
}

.how-popup-content > p {
  color: var(--how-popup-muted);
  margin: 0 0 1.5rem;
  font-size: 1rem;
  line-height: 1.6;
}

.how-popup-content .how-email-form {
  margin: 0 auto;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ============================================================================
   STICKY FOOTER BAR
   ============================================================================ */

.how-sticky-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: var(--how-popup-text);
  color: white;
  padding: 0.75rem 1rem;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
  animation: slideUpBar 0.4s ease;
}

.how-sticky-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.how-sticky-text {
  font-size: 0.9rem;
}

.how-sticky-bar .how-email-form {
  max-width: 320px;
}

.how-sticky-bar .how-email-form input[type='email'] {
  padding: 0.5rem 0.75rem;
  border: none;
}

.how-sticky-bar .how-email-form button[type='submit'] {
  padding: 0.5rem 1rem;
}

.how-sticky-close {
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  margin-left: 0.5rem;
}

.how-sticky-close:hover {
  color: white;
}

@keyframes slideUpBar {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* ============================================================================
   INLINE EMAIL CAPTURE
   ============================================================================ */

.how-inline-capture {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
  color: white;
  padding: 2rem;
  border-radius: var(--how-popup-radius);
  margin: 2rem 0;
}

.how-inline-content {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.how-inline-capture h3 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
}

.how-inline-capture > .how-inline-content > p {
  color: rgba(255, 255, 255, 0.8);
  margin: 0 0 1.25rem;
}

.how-inline-capture .how-email-form {
  margin: 0 auto;
}

.how-inline-capture .how-email-form input[type='email'] {
  border: none;
}

.how-form-bonus {
  font-size: 0.875rem;
  color: var(--how-popup-accent);
  margin-top: 0.75rem;
  font-weight: 500;
}

/* ============================================================================
   RESPONSIVE
   ============================================================================ */

@media (max-width: 640px) {
  .how-popup-content {
    padding: 2rem 1.5rem;
  }

  .how-popup-content h2 {
    font-size: 1.5rem;
  }

  .how-email-form {
    flex-direction: column;
  }

  .how-email-form button[type='submit'] {
    width: 100%;
  }

  .how-sticky-content {
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }

  .how-sticky-bar .how-email-form {
    width: 100%;
    max-width: none;
  }

  .how-sticky-close {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
  }

  .how-inline-capture {
    padding: 1.5rem;
  }
}
