/* ========================================
   Email Capture Modal - Custom Addition
   For Whitepaper Gated Downloads
   ======================================== */

.email-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.email-modal-overlay.active {
  display: flex;
}

.email-modal {
  background: #ffffff;
  border-radius: 16px;
  max-width: 500px;
  width: 100%;
  padding: 40px;
  position: relative;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
  animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.email-modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  background: none;
  border: none;
  font-size: 24px;
  color: #666;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background 0.2s ease;
}

.email-modal-close:hover {
  background: #f5f5f5;
}

.email-modal-header {
  margin-bottom: 24px;
}

.email-modal-header h3 {
  font-weight: 700;
  color: #000;
  margin-bottom: 8px;
  font-size: 24px;
}

.email-modal-header p {
  color: #666;
  line-height: 1.6;
}

.email-modal-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.email-modal-input {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-family: inherit;
  font-size: 16px;
  transition: border-color 0.2s ease;
}

.email-modal-input:focus {
  outline: none;
  border-color: #000;
}

.email-modal-input.error {
  border-color: #e74c3c;
}

.email-modal-error {
  color: #e74c3c;
  font-size: 14px;
  margin-top: -8px;
  display: none;
}

.email-modal-error.show {
  display: block;
}

.email-modal-submit {
  padding: 14px 24px;
  background: #000;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-weight: 600;
  font-family: inherit;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.email-modal-submit:hover {
  background: #222;
}

.email-modal-submit:disabled {
  background: #999;
  cursor: not-allowed;
}

.email-modal-privacy {
  font-size: 12px;
  color: #666;
  line-height: 1.5;
  margin-top: 8px;
}

.email-modal-privacy a {
  color: #000;
  text-decoration: underline;
}

/* Checkboxes */
.email-modal-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: -4px;
}

.email-modal-checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: #444;
  line-height: 1.5;
  cursor: pointer;
  font-weight: 400;
}

.email-modal-checkbox-label input[type="checkbox"] {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: #000;
  cursor: pointer;
}

.email-modal-checkbox-label a {
  color: #000;
  text-decoration: underline;
}

.email-modal-req {
  color: #e74c3c;
  font-weight: 700;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .email-modal {
    padding: 30px 20px;
  }
  
  .email-modal-header h3 {
    font-size: 20px;
  }
}
