/**
 * Email Capture Frontend Styles
 */

/* Popup Styles */
.dec-email-popup {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
}

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

.dec-popup-content {
  position: relative;
  background: #fff;
  border-radius: 16px;
  max-width: 500px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: dec-popup-slide-in 0.4s ease-out;
}

@keyframes dec-popup-slide-in {
  from {
    opacity: 0;
    transform: translateY(-30px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

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

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

.dec-popup-inner {
  padding: 50px 40px 40px;
  text-align: center;
}

.dec-popup-icon {
  font-size: 60px;
  margin-bottom: 20px;
  animation: dec-bounce 1s infinite alternate;
}

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

.dec-popup-title {
  font-size: 28px;
  font-weight: 700;
  color: #5a7a4a;
  margin: 0 0 15px;
  font-family: 'Montserrat', sans-serif;
}

.dec-popup-description {
  font-size: 16px;
  color: #666;
  line-height: 1.6;
  margin: 0 0 30px;
}

.dec-popup-privacy {
  font-size: 13px;
  color: #999;
  margin: 15px 0 0;
}

/* Form Styles */
.dec-email-form {
  margin: 0;
}

.dec-input {
  width: 100%;
  padding: 15px 20px;
  font-size: 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  margin-bottom: 12px;
  transition: all 0.3s;
  font-family: 'Lato', sans-serif;
}

.dec-input:focus {
  outline: none;
  border-color: #5a7a4a;
  box-shadow: 0 0 0 3px rgba(90, 122, 74, 0.1);
}

.dec-submit-btn {
  width: 100%;
  padding: 16px;
  font-size: 17px;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, #5a7a4a 0%, #6a8a5a 100%);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s;
  font-family: 'Montserrat', sans-serif;
  box-shadow: 0 4px 12px rgba(90, 122, 74, 0.3);
}

.dec-submit-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(90, 122, 74, 0.4);
  background: linear-gradient(135deg, #6a8a5a 0%, #7a9a6a 100%);
}

.dec-submit-btn:active {
  transform: translateY(0);
}

.dec-submit-btn.loading {
  opacity: 0.7;
  pointer-events: none;
}

.dec-form-message {
  margin-top: 15px;
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
}

.dec-form-message.success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.dec-form-message.error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Inline Form Styles */
.dec-inline-form {
  background: linear-gradient(135deg, #f5f1e8 0%, #fafaf7 100%);
  border: 2px solid #5a7a4a;
  border-radius: 12px;
  padding: 30px;
  margin: 30px 0;
  max-width: 600px;
}

.dec-form-header {
  text-align: center;
  margin-bottom: 25px;
}

.dec-form-title {
  font-size: 24px;
  font-weight: 700;
  color: #5a7a4a;
  margin: 0 0 10px;
  font-family: 'Montserrat', sans-serif;
}

.dec-form-description {
  font-size: 15px;
  color: #666;
  margin: 0;
}

/* Compact Form */
.dec-inline-form.dec-compact {
  padding: 15px;
  background: #fff;
  border: 1px solid #e0e0e0;
}

.dec-form-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.dec-compact .dec-input {
  margin-bottom: 0;
  flex: 1;
}

.dec-compact .dec-submit-btn {
  width: auto;
  padding: 15px 30px;
  white-space: nowrap;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .dec-popup-inner {
    padding: 40px 25px 30px;
  }
  
  .dec-popup-title {
    font-size: 24px;
  }
  
  .dec-popup-description {
    font-size: 15px;
  }
  
  .dec-inline-form {
    padding: 20px;
  }
  
  .dec-form-row {
    flex-direction: column;
  }
  
  .dec-compact .dec-submit-btn {
    width: 100%;
  }
}

/* Cookie consent integration */
body.dec-subscribed .dec-email-popup {
  display: none !important;
}
